Browse Source

报名时添加乐团编号,支付获取授权修改

lex 1 year ago
parent
commit
b0a3122de0
2 changed files with 5 additions and 4 deletions
  1. 3 3
      src/state.ts
  2. 2 1
      src/student/music-group/layout/login.tsx

+ 3 - 3
src/state.ts

@@ -107,10 +107,10 @@ const goAuth = (wxAppId: string, urlString?: string) => {
 export const goAliAuth = (alipayAppId: string, urlString?: string) => {
   // 支付宝授权
   const urlNow = encodeURIComponent(urlString || window.location.href)
-  const appid = alipayAppId || '2021004100630808'
+  const appid = alipayAppId || '2021004113639386'
   // 开发环境
   if (import.meta.env.DEV) {
-    const url = `https://kt.colexiu.com/getAliCode?app_id=${appid}&state=STATE&redirect_uri=${urlNow}`
+    const url = `https://online.lexiaoya.cn/getAliCode?app_id=${appid}&state=STATE&redirect_uri=${urlNow}`
     window.location.replace(url)
   }
 
@@ -124,7 +124,7 @@ const alipayAuth = (alipayAppId: string, urlString?: string) => {
   // 用户授权
   const urlNow = encodeURIComponent(urlString || window.location.href)
   const scope = 'auth_base' //snsapi_userinfo   //静默授权 用户无感知
-  const appid = alipayAppId || '2021004100630808'
+  const appid = alipayAppId || '2021004113639386'
   // 判断是否是线上
   const url = `https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${appid}&redirect_uri=${urlNow}&response_type=auth_code&scope=${scope}&state=STATE`
   window.location.replace(url)

+ 2 - 1
src/student/music-group/layout/login.tsx

@@ -161,7 +161,8 @@ export default defineComponent({
           autoRegister: true,
           password: this.smsCode,
           loginType: 'SMS',
-          grant_type: 'password'
+          grant_type: 'password',
+          extra: this.$route.query.id
         }
 
         const { data } = await request.post('/api-oauth/userlogin', {