Bladeren bron

去掉请求else

1004749546@qq.com 4 jaren geleden
bovenliggende
commit
a08c9cd01e

+ 10 - 3
pages/checkOut/checkOut.vue

@@ -31,7 +31,7 @@
 				<text>{{number||0}}</text>
 				<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
 			</view>
-			<u-button  @click="handlePay" type="error" >确认支付</u-button>
+			<u-button :custom-style="btnStyle" @click="handlePay" type="error" >确认支付</u-button>
 		</view>
 		 <!-- 确认支付弹窗 -->
 		 <u-popup mode="center" closeable @close="closeModal" v-model="showPayModal" width="600rpx" >
@@ -63,7 +63,7 @@
 					/>
 				</view>
 				<view class="fot-btn">
-					<u-button  @click="confirm" type="error" >确认支付</u-button>
+					<u-button :custom-style="btnStyle" @click="confirm" type="error" >确认支付</u-button>
 				</view>
 			</view>
 		</u-popup>
@@ -86,6 +86,9 @@
 	export default{
 		data() {
 			return {
+				btnStyle: {
+					backgroundColor : '#07c160'
+				},
 				showSetPswModal: false,
 				store: null, // 门店信息
 				remarks: '', // 备注
@@ -105,6 +108,10 @@
 			sellerFindByPartnerNo({officialPartnerNo: this.partnerNo}).then(res => {
 				if(res.status == 200){
 					this.store = res.data
+				} else {
+					setTimeout(()=>{
+						uni.navigateBack()
+					},500)
 				}
 			})
 		},
@@ -167,7 +174,7 @@
 				sellerReceive(data).then(res => {
 					console.log(res)
 					if(res.status == 200){
-						uni.navigateTo({
+						uni.redirectTo({
 							url: '/pages/checkOut/checkFinish?num='+this.number
 						})
 					} else {

+ 1 - 6
pages/order/LogList.vue

@@ -115,12 +115,7 @@
 							icon: 'none'
 						})
 						this.getRow()
-					} else {
-						uni.showToast({
-							title:res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			

+ 1 - 10
pages/order/order.vue

@@ -360,12 +360,7 @@
 							// 没设置过支付密码,提示设置密码
 							 this.showSetPswModal = true
 						}
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			// 支付
@@ -397,10 +392,6 @@
 						
 					} else{
 						this.password = ''
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
 					}
 				})
 			},

+ 2 - 16
pages/order/orderDetail.vue

@@ -177,12 +177,7 @@
 						if(this.orderInfo.orderState=='WAIT_PAY') {
 							this.leftTimeFun()
 						}
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			// 跳转到设置支付密码页
@@ -229,12 +224,7 @@
 							// 没设置过支付密码,提示设置密码
 							 this.showSetPswModal = true
 						}
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			// 支付
@@ -266,10 +256,6 @@
 						})
 					} else{
 						this.password = ''
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
 					}
 				})
 			},

+ 2 - 20
pages/toOrder/index.vue

@@ -162,10 +162,6 @@
 						 this.userInfo = res.data[0] || {}
 					 } else {
 						 this.userInfo = {}
-						 uni.showToast({
-						 	title: res.message,
-							icon: 'none'
-						 })
 					 }
 				 })
 			},
@@ -216,12 +212,7 @@
 							// 没设置过支付密码,提示设置密码
 							 this.showSetPswModal = true
 						}
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			// 支付  保存订单
@@ -263,12 +254,7 @@
 							this.toCheckPwd()
 							// 刷新购物车
 							uni.$emit('getCartList')
-						} else {
-							uni.showToast({
-								title: res.message,
-								icon: 'none'
-							})
-						}
+						} 
 					})
 				}
 			},
@@ -295,10 +281,6 @@
 						})
 					} else{
 						this.password = ''
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
 					}
 				})
 			}

+ 1 - 6
pages/userCenter/userInfo/changePayPwd.vue

@@ -36,12 +36,7 @@
 							uni.redirectTo({
 								url: `/pages/userCenter/userInfo/paymentPwd?oldPwd=${this.oldPwd}`
 							})
-						} else {
-							uni.showToast({
-								title: res.message,
-								icon: 'none'
-							})
-						}
+						} 
 					})
 					
 				}else{

+ 2 - 12
pages/userCenter/userInfo/paymentPwd.vue

@@ -114,12 +114,7 @@
 							    delta: 1
 							})
 						}, 2000)
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			// 修改密码
@@ -136,12 +131,7 @@
 							    delta: 1
 							})
 						}, 2000)
-					} else {
-						uni.showToast({
-							title: res.message,
-							icon: 'none'
-						})
-					}
+					} 
 				})
 			},
 			//  取消

+ 1 - 6
pages/userCenter/userInfo/smsVerification.vue

@@ -74,12 +74,7 @@
 								uni.redirectTo({
 									url: `/pages/userCenter/userInfo/paymentPwd?code=${this.value}&mobile=${this.phone}`
 								})
-							} else {
-								uni.showToast({
-									title: res.message,
-									icon: 'none'
-								})
-							}
+							} 
 						})
 						
 					}