|
@@ -29,10 +29,10 @@
|
|
|
<cover-image class="img" src="/static/img/index-call.png"></cover-image>
|
|
|
<cover-view>联系客服</cover-view>
|
|
|
</cover-view>
|
|
|
- <cover-view @click="scanCoupon" class="flex-item">
|
|
|
+ <!-- <cover-view @click="scanCoupon" class="flex-item">
|
|
|
<cover-image class="img" src="/static/img/index-discount.png"></cover-image>
|
|
|
<cover-view>优惠活动</cover-view>
|
|
|
- </cover-view>
|
|
|
+ </cover-view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 地图移动后返回原位置控件 -->
|
|
@@ -298,52 +298,24 @@
|
|
|
phoneNumber: '18237162131'
|
|
|
})
|
|
|
},
|
|
|
- // 扫描领取优惠卷
|
|
|
- scanCoupon(){
|
|
|
- uni.scanCode({
|
|
|
- success: function (res) {
|
|
|
- if(res.scanType == 'WX_CODE'){
|
|
|
- console.log(res.path)
|
|
|
- uni.navigateTo({
|
|
|
- url: '/'+res.path
|
|
|
- })
|
|
|
- }else{
|
|
|
- _this.toashMsg("无法识别此二维码")
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
// 扫码洗车
|
|
|
scanCode () {
|
|
|
let _this = this
|
|
|
- uni.showLoading({
|
|
|
- title: "正在加载..."
|
|
|
- })
|
|
|
// 检验是否登录或登录是否过期
|
|
|
- checkLogin().then(res => {
|
|
|
- console.log(res)
|
|
|
- uni.hideLoading()
|
|
|
- if (res.status == '200') {
|
|
|
- uni.scanCode({
|
|
|
- success: function (res) {
|
|
|
- console.log(res);
|
|
|
- if(res.scanType == 'WX_CODE'){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/'+res.path
|
|
|
- })
|
|
|
- }else{
|
|
|
- _this.toashMsg("无法识别此二维码")
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- } else if (res.status == '9001') {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
|
|
|
- })
|
|
|
- } else if (res.status == '6000'){
|
|
|
- this.toashMsg(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
+ uni.scanCode({
|
|
|
+ success: function (res) {
|
|
|
+ console.log(res);
|
|
|
+ if(res.scanType != 'WX_CODE'){
|
|
|
+ setTimeout(()=>{
|
|
|
+ _this.toashMsg("无法识别此二维码")
|
|
|
+ },1000)
|
|
|
+ }else{
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/'+res.path
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 创建标记点 设备状态 USING :使用中 PAUSE:暂停 ON_LINE:在线
|
|
|
createMarker(point) {
|