Przeglądaj źródła

下单流程优化

shish 7 miesięcy temu
rodzic
commit
9f6ec742b2

+ 10 - 0
mallApp/src/pages/billing/affirmGhs.vue

@@ -683,6 +683,16 @@ export default {
 			console.log('selectDelivery -- isFreeDelivery: ',isFreeDelivery)
 			console.log('selectDelivery -- isFreeDelivery: ',isFreeDelivery)
 		},
 		},
 		confirmForm(){
 		confirmForm(){
+
+			let hdId = this.option.hdId ? this.option.hdId : 0
+			let account = this.option.account ? this.option.account : 0
+			if(Number(hdId)<=0 || Number(account)<=0){
+				this.$util.confirmModal({content:'网络异常,请重新提交'},() => {
+					uni.reLaunch({url:'/pages/home/recent'})
+				})
+				return false
+			}
+
 			if(this.form.sendType == 0 || this.form.sendType == 2){
 			if(this.form.sendType == 0 || this.form.sendType == 2){
 				if(this.$util.isEmpty(this.form.receiveMobile)){
 				if(this.$util.isEmpty(this.form.receiveMobile)){
 					this.$msg('请填写收花人手机号')
 					this.$msg('请填写收花人手机号')

+ 10 - 3
mallApp/src/pages/order/buy.vue

@@ -200,6 +200,16 @@ export default {
       this.createOrderFn()
       this.createOrderFn()
     },
     },
     createOrderFn() {
     createOrderFn() {
+      let hdId = this.option.hdId?this.option.hdId:0
+      let account = this.option.account?this.option.account:0
+
+		if(Number(hdId)<=0 || Number(account)<=0){
+			this.$util.confirmModal({content:'网络异常,请重新提交'},() => {
+				uni.reLaunch({url:'/pages/home/recent'})
+			})
+			return false
+		}
+
       let form = {}
       let form = {}
       if (this.form.sendType == 2) {
       if (this.form.sendType == 2) {
         if(this.form.hasMap == 0 || this.openIntraCity == 2) {
         if(this.form.hasMap == 0 || this.openIntraCity == 2) {
@@ -229,9 +239,6 @@ export default {
         }
         }
       }
       }
       uni.showLoading({mask:true})
       uni.showLoading({mask:true})
-      let hdId = this.option.hdId?this.option.hdId:0
-      let account = this.option.account?this.option.account:0
-      
       const params = {
       const params = {
         ...form,
         ...form,
         ...this.form,
         ...this.form,