Commit 221789f0 authored by 刘用法's avatar 刘用法
parents a20957cd 8db0041d
......@@ -145,8 +145,12 @@ export default {
wxAppNo: that.globalData.wxAppNo, // 自营平台小程序
};
let result = await that.$u.api.loginWechatAuth(params)
if (result && result.code == 200 && result.data) {
if (result && result.code == 200 && result.data && result.data.token) {
that.setUserData(result.data);
} else {
uni.navigateTo({
url: "pages/login/index"
})
}
} else {
uni.showModal({
......
......@@ -64,6 +64,10 @@
export default {
name:"complete-check",
props: {
show: {
type: Boolean,
default: true
},
pass: {
type: Boolean,
default: false
......@@ -81,7 +85,6 @@
},
data() {
return {
show: true,
};
},
computed: {
......
......@@ -99,15 +99,15 @@ export default {
return login.authorization(params);
}).then(res => {
uni.hideLoading();
if (res) {
if (res && res.code == 200 && res.data && res.data.token) {
that.setUserData(res.data)
that.goBackPage()
} else {
this.setLoginStatus()
that.setLoginStatus()
}
}).catch(res => {
uni.hideLoading()
this.setLoginStatus()
that.setLoginStatus()
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment