diff --git a/api/member/auth.js b/api/member/auth.js index 65bf5e70..2a4da767 100644 --- a/api/member/auth.js +++ b/api/member/auth.js @@ -50,10 +50,11 @@ export function socialLogin(type, code, state) { } // 微信小程序的一键登录登录 -export function weixinMiniAppLogin(phoneCode, loginCode) { +export function weixinMiniAppLogin(phoneCode, loginCode,state) { return request.post('app-api/member/auth/weixin-mini-app-login', { phoneCode, - loginCode + loginCode, + state }, { noAuth: true // TODO 芋艿:后续要做调整 }); diff --git a/pages/users/wechat_login/index.vue b/pages/users/wechat_login/index.vue index 0042dbc4..6722c999 100644 --- a/pages/users/wechat_login/index.vue +++ b/pages/users/wechat_login/index.vue @@ -187,7 +187,7 @@ } // 情况二:允许授权手机号码 const loginCode = await Routine.getCode() - AuthApi.weixinMiniAppLogin(phoneCode, loginCode).then(res => { + AuthApi.weixinMiniAppLogin(phoneCode, loginCode,'default').then(res => { const data = res.data; // TODO 芋艿:refreshToken 机制 this.$store.commit("LOGIN", {