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');