Commit 221789f0 authored by 刘用法's avatar 刘用法
parents a20957cd 8db0041d
...@@ -145,8 +145,12 @@ export default { ...@@ -145,8 +145,12 @@ export default {
wxAppNo: that.globalData.wxAppNo, // 自营平台小程序 wxAppNo: that.globalData.wxAppNo, // 自营平台小程序
}; };
let result = await that.$u.api.loginWechatAuth(params) 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); that.setUserData(result.data);
} else {
uni.navigateTo({
url: "pages/login/index"
})
} }
} else { } else {
uni.showModal({ uni.showModal({
......
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
export default { export default {
name:"complete-check", name:"complete-check",
props: { props: {
show: {
type: Boolean,
default: true
},
pass: { pass: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -81,7 +85,6 @@ ...@@ -81,7 +85,6 @@
}, },
data() { data() {
return { return {
show: true,
}; };
}, },
computed: { computed: {
......
...@@ -99,15 +99,15 @@ export default { ...@@ -99,15 +99,15 @@ export default {
return login.authorization(params); return login.authorization(params);
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res) { if (res && res.code == 200 && res.data && res.data.token) {
that.setUserData(res.data) that.setUserData(res.data)
that.goBackPage() that.goBackPage()
} else { } else {
this.setLoginStatus() that.setLoginStatus()
} }
}).catch(res => { }).catch(res => {
uni.hideLoading() 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