whitefang 1 год назад
Родитель
Сommit
efc917c556
1 измененных файлов с 35 добавлено и 15 удалено
  1. 35 15
      public/agent/company_h5/index.html

+ 35 - 15
public/agent/company_h5/index.html

@@ -55,7 +55,7 @@
 						<p>提交成功!</p>
 						<p>客服将在10分钟内与您取得联系,请注意及时接听来电。<span>如超出工作时间下单,将在次日与您取得联系。</span></p>
 						<p>(工作时间09:00-18:00)</p>
-						<div @click="sure1">好的</div>
+						<div @click="cancel">好的</div>
 					</div>
 				</div>
 			</div>
@@ -76,7 +76,8 @@
 						param1: {},
 						show: false,
 						show1: false,
-						content: '请完善填写信息'
+						content: '请完善填写信息',
+						isLoading: false
 					}
 				},
 				mounted() {
@@ -89,7 +90,35 @@
 					sure() {
 						this.show = false
 					},
-					sure1() {
+					// sure1() {
+					// 	axios({
+					// 		method: 'post',
+					// 		url: 'https://weixiu.zhongdunzhizhao.com/api/property/orderByQrcode',
+					// 		data: this.param
+					// 	}).then(res => {
+					// 		this.param = {
+					// 			property_head_id: '',
+					// 			remark: '',
+					// 			householder_name: '',
+					// 			householder_mobile: '',
+					// 			address: ''
+					// 		}
+					// 		this.show1 = false
+					// 		this.content = '提交成功'
+					// 		this.show = true
+					// 	})
+					// },
+					submit() {
+						if (!this.param.householder_name || !this.param.householder_mobile || !this.param.address) {
+							this.content = '请完善填写信息'
+							this.show = true
+							return
+						}
+						this.param.property_head_id = this.param1.id
+
+						if (this.isLoading) return
+						else this.isLoading = true
+
 						axios({
 							method: 'post',
 							url: 'https://weixiu.zhongdunzhizhao.com/api/property/orderByQrcode',
@@ -102,20 +131,11 @@
 								householder_mobile: '',
 								address: ''
 							}
-							this.show1 = false
-							this.content = '提交成功'
-							this.show = true
+							this.show1 = true
+						}).finally(() => {
+							this.isLoading = false
 						})
 					},
-					submit() {
-						if (!this.param.householder_name || !this.param.householder_mobile || !this.param.address) {
-							this.content = '请完善填写信息'
-							this.show = true
-							return
-						}
-						this.param.property_head_id = this.param1.id
-						this.show1 = true
-					},
 					getQueryString(name) {
 						const paramsStr = window.location.search || 'https://www.baidu.com?property_name=融侨华府&id=1'
 						// const paramsStr = 'https://www.baidu.com?property_name=融侨华府&id=1'