Commit 58c5a92a authored by 肖健's avatar 肖健

导航栏扫一扫需要登录

parent 0cfced19
...@@ -56,11 +56,12 @@ export default { ...@@ -56,11 +56,12 @@ export default {
this.tab = 'moveCar' this.tab = 'moveCar'
break; break;
case 2: case 2:
let token = uni.getStorageSync('userToken');
if(token) {
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
let path = res.path let path = res.path
let token = uni.getStorageSync('userToken');
if(token){
let opts = { url: '/app/user/info', method: 'get' } let opts = { url: '/app/user/info', method: 'get' }
that.http.httpTokenRequest(opts, {}).then(res => { that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
...@@ -99,14 +100,13 @@ export default { ...@@ -99,14 +100,13 @@ export default {
} }
} }
}) })
}
});
} else { } else {
uni.showToast({ uni.navigateTo({
title: '扫码失败', url: '/pages/binding/index'
icon: 'none',
}) })
} }
}
});
break; break;
case 3: case 3:
this.tab = 'shop' this.tab = 'shop'
......
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