Commit 99025b29 authored by 肖健's avatar 肖健

扫一扫联系车主完善

parent f2c6a2d1
...@@ -62,23 +62,65 @@ export default { ...@@ -62,23 +62,65 @@ export default {
}, },
methods: { methods: {
goUrl(vo) { goUrl(vo) {
const that = this
if (vo.title != "扫一扫联系车主") { if (vo.title != "扫一扫联系车主") {
uni.navigateTo({ uni.navigateTo({
url: vo.url url: vo.url
}) })
} else { } else {
//跳转绑定页面 //跳转绑定页面
uni.navigateTo({ // uni.navigateTo({
url: vo.url // url: vo.url
}) // })
//扫码 //扫码
uni.scanCode({ uni.scanCode({
success: (res) => { success: function (res) {
console.log(res); let path = res.path
if(path) {
let xcxIndexPath = uni.getStorageSync('xcxIndexPath')
if(xcxIndexPath) {
xcxIndexPath = path.replace(xcxIndexPath, '').replace("?", '')
if(xcxIndexPath.indexOf('scene') >= 0 ) {
let scene = xcxIndexPath.replace('scene=', '')
let param = {code : scene}
let opts = { url: '/app/index/check/move/code', method: 'post' }
that.http.httpTokenRequest(opts, param).then(res => {
console.info(res)
if (res.data.code == 200) {
if(res.data.data.bindFlag) {
that.gotoMoveCar(scene)
} else {
that.gotoBindMoveCar(scene)
}
}
})
}
} }
}) } else {
uni.showToast({
title:'扫码失败',
icon:'none',
})
}
}
});
} }
} },
//跳转到挪车页面
gotoMoveCar(s) {
let that = this;
uni.navigateTo({
url: '/pagesB/pages/move-car/oneMoveCar?scene=' + s
});
},
//跳转到绑定页面
gotoBindMoveCar(s) {
let that = this;
uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + s
});
},
}, },
}; };
......
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