Commit 8fadcda9 authored by fwz's avatar fwz

Merge remote-tracking branch 'origin/dev_cd' into dev_cd

parents cb60584c 64fe94d3
......@@ -43,6 +43,7 @@ export default {
isCanUse2: false, //默认为true
openid: '',
nc_protocol : false,
scene : "",
}
},
methods: {
......@@ -103,8 +104,13 @@ export default {
duration:1500
})
uni.setStorageSync("userToken", res.data.data.token)
//跳转到绑定页面
this.gotoIndex()
if(this.scene) {
this.gotoMoveCar();
} else {
//跳转到绑定页面
this.gotoIndex()
}
} else {
uni.showToast({
......@@ -126,10 +132,32 @@ export default {
// url: '/pages/binding/binding'
// });
}
},
//调整到挪车页面
gotoMoveCar(scene) {
uni.navigateTo({
url: '/pagesB/pages/move-car/oneMoveCar?scene=' + scene
});
},
},
onLoad() { //默认加载
onLoad(e) { //默认加载
// #ifdef MP-WEIXIN
if(e.query) {
//获取二维码携带的参数
//扫码后得到的参数
let scene = decodeURIComponent(e.query.scene)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
this.scene = scene;
}
this.wechatLogin()
let userToken = uni.getStorageSync('userToken')
if (userToken) {
let that = this
......@@ -137,7 +165,12 @@ export default {
that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.gotoIndex()
if(this.scene) {
this.gotoMoveCar();
} else {
this.gotoIndex()
}
} else {
uni.showToast({
title:'授权失败',
......@@ -149,6 +182,7 @@ export default {
} else {
this.isCanUse2 = true
}
// #endif
}
}
</script>
......
......@@ -101,6 +101,20 @@ export default {
})
},
},
onLoad() {
if(e.query) {
//获取二维码携带的参数
//扫码后得到的参数
let scene = decodeURIComponent(e.query.scene)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
console.log('scene: ' + scene);
}
}
}
</script>
......
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