From 0a91b85c24de8fc566f34c6b6201cd9913cfd8f2 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 30 Jul 2024 10:54:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=AD=89=E5=BE=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 13f9211..743f8d8 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@
-
+
@@ -269,6 +269,12 @@ drawWidth() { return window.innerWidth < 768 ? Math.floor(window.innerWidth-40) : 760; // Adjust the threshold as needed }, + isEmptyData() { + return this.feedbackItem.guide.length === 0 + || this.feedbackItem.driver.length === 0 + || this.feedbackItem.experience.length === 0 + || this.feedbackItem.hotel.length === 0; + }, }, data() { return { @@ -303,6 +309,7 @@ }; }, created() { + console.clear(); console.log('invoke vue', typeof this); this.initData(); }, @@ -328,14 +335,14 @@ this.debug = !isEmpty(urlPath[4]); this.resultPage = !isEmpty(urlPath[4]) ? false : !isEmpty(urlPath[3]); } - console.log(this.param, this.debug); + console.log(this.param, 'debug', this.debug); if (!(this.param.v && this.param.g)) { this.error = true; this.errorMsg = 'Invalid URL'; return false; } this.loading = true; - console.log(this.resultPage); + console.log('resultPage', this.resultPage); this.getCityList(); }, getCityList() { @@ -368,7 +375,7 @@ } return r.concat(mergeCity[tgid]); }, []); - // console.log(mergeCityA); + // console.log(mergeCityA, that.error); that.cityList = mergeCityA; if (mergeCityA.length === 1) { that.selectCity(mergeCityA[0]); @@ -397,18 +404,20 @@ for (const iterator of selectedCity.cii_sn_arr) { this.getData(Object.assign({}, _param, { CITY_SN: iterator }), true); } - if (this.feedbackItem.guide.length === 0 - && this.feedbackItem.driver.length === 0 - && this.feedbackItem.experience.length === 0 - && this.feedbackItem.hotel.length === 0 - ) { - this.error = true; - this.errorMsg = 'Data error.'; - return false; - } } else { this.getData(Object.assign({}, _param, { CITY_SN: selectedCity.cii_sn })); } + // setTimeout(() => { + // if (this.feedbackItem.guide.length === 0 + // && this.feedbackItem.driver.length === 0 + // && this.feedbackItem.experience.length === 0 + // && this.feedbackItem.hotel.length === 0 + // ) { + // this.error = true; + // this.errorMsg = 'Data error.'; + // return false; + // } + // }, 1000); }, initSignature() { var canvas = document.getElementById('signature-pad');