Browse Source

bug 修复

lilei 4 năm trước cách đây
mục cha
commit
d6891d0178
2 tập tin đã thay đổi với 19 bổ sung56 xóa
  1. 3 12
      pages/getOrder/getOrder.vue
  2. 16 44
      pages/index/index.vue

+ 3 - 12
pages/getOrder/getOrder.vue

@@ -397,20 +397,11 @@
 			// 付款失败或取消
 			payFail(err){
 				this.$u.vuex('vuex_orderStatus','FAIL')
-				let content = '支付失败,请重新下单'
+				let content = '支付失败,请重'
 				if(err.errMsg.indexOf("cancel")>=0){
-					content = '支付取消,请重新下单'
+					content = '支付取消'
 				}
-				uni.showModal({
-				    title: '提示',
-				    content: content,
-					showCancel: false,
-				    success: function (res) {
-				        if (res.confirm) {
-							uni.navigateBack()
-				        }
-				    }
-				});
+				this.toashMsg(content)
 			}
 		}
 	}

+ 16 - 44
pages/index/index.vue

@@ -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) {