1004749546@qq.com пре 4 година
родитељ
комит
b7506daffd
3 измењених фајлова са 28 додато и 0 уклоњено
  1. 7 0
      pages/order/order.vue
  2. 7 0
      pages/order/orderDetail.vue
  3. 14 0
      pages/toOrder/index.vue

+ 7 - 0
pages/order/order.vue

@@ -333,6 +333,13 @@
 			},
 			// 支付
 			toPayOrder() {
+				if (this.password === '') {
+					uni.showToast({
+						title: '请先输入支付密码',
+						icon: 'none'
+					})
+					return false
+				}
 				let params = {
 					payPwd: this.password,
 					id: this.orderId

+ 7 - 0
pages/order/orderDetail.vue

@@ -197,6 +197,13 @@
 			},
 			// 支付
 			toPayOrder() {
+				if (this.password === '') {
+					uni.showToast({
+						title: '请先输入支付密码',
+						icon: 'none'
+					})
+					return false
+				}
 				let id = this.orderInfo.id
 				let params = {
 					payPwd: this.password,

+ 14 - 0
pages/toOrder/index.vue

@@ -210,6 +210,13 @@
 			},
 			// 支付  保存订单
 			toSaveOrder () {
+				if (!this.userInfo.receiveAddress) {
+					uni.showToast({
+						title: '请先输入收货地址',
+						icon: 'none'
+					})
+					return false
+				}
 				// 已生成订单
 				if(this.orderId) {
 					// 校验用户是否设置过支付密码
@@ -247,6 +254,13 @@
 			},
 			// 支付
 			toPay() {
+				if (this.password === '') {
+					uni.showToast({
+						title: '请先输入支付密码',
+						icon: 'none'
+					})
+					return false
+				}
 				let params = {
 					payPwd: this.password,
 					id: this.orderId