|
@@ -275,43 +275,31 @@
|
|
|
// 扫码洗车
|
|
|
scanCode () {
|
|
|
let _this = this
|
|
|
- uni.scanCode({
|
|
|
- success: function (res) {
|
|
|
- console.log('条码类型:' + res.scanType);
|
|
|
- console.log('条码内容:' + res.result);
|
|
|
- if(res.scanType !== 'WX_CODE'){
|
|
|
- _this.toashMsg("无法识别此二维码")
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: res.result
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
// 检验是否登录或登录是否过期
|
|
|
- // checkLogin().then(res => {
|
|
|
- // if (res.status == '200') {
|
|
|
- // uni.scanCode({
|
|
|
- // success: function (res) {
|
|
|
- // console.log('条码类型:' + res.scanType);
|
|
|
- // console.log('条码内容:' + res.result);
|
|
|
- // if(res.scanType !== 'WX_CODE'){
|
|
|
- // _this.toashMsg("无法识别此二维码")
|
|
|
- // }
|
|
|
- // uni.navigateTo({
|
|
|
- // url: res.result
|
|
|
- // })
|
|
|
- // }
|
|
|
- // });
|
|
|
+ checkLogin().then(res => {
|
|
|
+ if (res.status == '200') {
|
|
|
+ uni.scanCode({
|
|
|
+ success: function (res) {
|
|
|
+ console.log('条码类型:' + res.scanType);
|
|
|
+ console.log('条码内容:' + res.result);
|
|
|
+ // if(res.scanType !== 'WX_CODE'){
|
|
|
+ // _this.toashMsg("无法识别此二维码")
|
|
|
+ // }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: res.result
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- // // uni.navigateTo({
|
|
|
- // // url: `/pages/getOrder/getOrder?scene=100037,9998`
|
|
|
- // // })
|
|
|
- // } else if (res.status == '9001') {
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages/getOrder/getOrder?scene=100037,9998`
|
|
|
+ // })
|
|
|
+ } else if (res.status == '9001') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 创建标记点 OPEN :正常营业 CLOSED:暂停营业 TO_BE_OPENED:待开业
|
|
|
createMarker(point) {
|