fix: 登录优化

main
wx-jincw 1 week ago
parent 623c9333de
commit 3081b11b7f

@ -217,3 +217,12 @@ export function getAdminInfoByUid() {
);
}
// 绑定微信(对应后台 api/front/bindingWx
export function bindingWx(data) {
return request.post('bindingWx', data, { useAdminUrl: true });
}
// 解绑微信(对应后台 api/front/unbindWx
export function unbindWx(data) {
return request.post('unbindWx', data, { useAdminUrl: true });
}

@ -324,7 +324,7 @@ export default new AuthWechat();
*/
export function wxGZHAuth() {
return new Promise((resolve, reject) => {
const redirectUri = encodeURIComponent('https://www.fjyfzh.com/gzh-mp/gzh-login');
const redirectUri = encodeURIComponent('https://fzbfwy.com/login');
const url =
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx49d7d3aba9479a85&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`;
uni.navigateTo({

@ -49,7 +49,7 @@
<div class="logon" @click="loginMobile" v-if="current !== 0"></div>
<div class="logon" @click="submit" v-if="current === 0"></div>
<!-- #ifdef MP-WEIXIN -->
<div class="logon logon-wechat" v-if="current === 0" @click="mpGzhWechatLogin"></div>
<div class="logon logon-wechat" v-if="current === 0" @click="goWechatLogin"></div>
<!-- #endif -->
<div class="tips">
<!-- <div v-if="current==0" @click="current = 1"></div> -->
@ -470,6 +470,11 @@
});
});
},
goWechatLogin() {
uni.navigateTo({
url: "/pages/users/wechat_login/index"
});
},
getUserInfo(data){
this.$store.commit("SETUID", data.uid);
getUserInfo().then(res => {
@ -493,9 +498,13 @@
if (!backUrl.startsWith('/')) {
backUrl = '/' + backUrl;
}
// uni.reLaunch({
// url: backUrl
// });
uni.reLaunch({
url: backUrl
url: "/pages/index/index"
});
})
}
}

Loading…
Cancel
Save