diff --git a/yudao-ui-app/App.vue b/yudao-ui-app/App.vue index 90948cb41..124bad61b 100644 --- a/yudao-ui-app/App.vue +++ b/yudao-ui-app/App.vue @@ -9,7 +9,9 @@ fetchMemberChangeSpreadId } from "@/api/api"; import { - HTTP_REQUEST_URL + HTTP_REQUEST_URL, + SPREAD_LINK, + WX_APP_ID } from './config/app'; import Auth from './libs/wechat.js'; import Routine from './libs/routine.js'; @@ -211,9 +213,9 @@ if (redirectUrl) { const tenantId = this.$route.query.tenantId || '' const spreadId = this.$route.query.spreadId || '' - const wechatUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7e503d9cded34c07' + const wechatUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + WX_APP_ID location.href = - `${wechatUrl}&redirect_uri=${redirectUrl}/pages/member_application/index?tenantId=${tenantId}&spreadId=${spreadId}&response_type=code&scope=snsapi_base#wechat_redirect` + `${wechatUrl}&redirect_uri=${redirectUrl}${SPREAD_LINK}?tenantId=${tenantId}&spreadId=${spreadId}&response_type=code&scope=snsapi_base#wechat_redirect` } }, // 是否扫物业二维码 diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index 628415493..5e8ad7275 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -40,4 +40,14 @@ module.exports = { // #endif // 推广码生成访问H5链接地址 SPREAD_LINK: '/pages/member_application/index', + // 公众号APPID + // #ifdef DEV + WX_APP_ID: 'wx3b3b17449cc13a8a', + // #endif + // #ifdef TEST + WX_APP_ID: 'wx3b3b17449cc13a8a', + // #endif + // #ifdef PROD + WX_APP_ID: 'wx7e503d9cded34c07', + // #endif };