Commit 632eb1db authored by 肖健's avatar 肖健

扫码逻辑调整

parent cc64f8b0
......@@ -59,10 +59,12 @@ export default {
uni.scanCode({
success: function (res) {
let path = res.path
console.log(path+ "123")
if (path) {
let xcxIndexPath = uni.getStorageSync('xcxIndexPath')
console.info(xcxIndexPath);
let token = uni.getStorageSync('userToken');
if(token){
let opts = { url: '/app/user/info', method: 'get' }
that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
let xcxIndexPath = res.data.data.xcxIndexPath
if (xcxIndexPath) {
xcxIndexPath = path.replace(xcxIndexPath, '').replace("?", '')
if (xcxIndexPath.indexOf('scene') >= 0) {
......@@ -74,9 +76,7 @@ export default {
url: '/app/user/check/move/code',
method: 'post'
}
console.log(param);
that.http.httpTokenRequest(opts, param).then(res => {
console.info(res)
if (res.data.code == 200) {
if (res.data.data.bindFlag) {
that.gotoMoveCar(scene)
......@@ -85,8 +85,20 @@ export default {
}
}
})
} else {
uni.showToast({
title: '扫码失败',
icon: 'none',
})
}
} else {
uni.showToast({
title: '扫码失败',
icon: 'none',
})
}
}
})
} else {
uni.showToast({
title: '扫码失败',
......
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