diff --git a/index.html b/index.html
index 6cfea56..5b88c34 100644
--- a/index.html
+++ b/index.html
@@ -139,7 +139,7 @@
{{currentCity.cityName}}
- - {{city.cityName}}
+ - {{city.cityName}}
@@ -291,6 +291,7 @@
showPhotos: false,
signaturePad: null,
+ debug: false,
};
},
created() {
@@ -306,23 +307,27 @@
for (const param of urlParams) {
this.param[param[0]] = param[1];
}
+ this.debug = this.param.debug || false;
this.resultPage = !isEmpty(this.param.r);
- var urlPath = window.location.pathname.replace('/customerfeedback/', '').split('-').filter(s => s);
+ var urlPath = window.location.pathname.replace('/customerfeedback/', '').split('-'); // .filter(s => s);
urlPath = urlPath.length >= 3 ? urlPath : window.location.pathname.replace('/customerfeedback/', '').split('/');
if (urlPath.length > 0 && isEmpty(this.param.g)) {
this.param.g = urlPath[0];
this.param.v = urlPath[1];
this.param.l = urlPath[2] || 1;
this.resultPage = !isEmpty(urlPath[3]);
+
+ this.debug = !isEmpty(urlPath[4]);
+ this.resultPage = !isEmpty(urlPath[4]) ? false : !isEmpty(urlPath[3]);
}
- console.log(this.param);
+ console.log(this.param, 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(this.resultPage);
this.getCityList();
},
getCityList() {
@@ -458,11 +463,18 @@
// 已经填写过了
// that.isFilled = !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
that.isFilled = that.currentCity.feedback_Filled || !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
- that.cityListPage = that.resultPage ? false : that.isFilled;
+ that.cityListPage = (that.debug) ? false : (that.resultPage ? false : that.isFilled);
if (that.resultPage || that.isFilled) {
// that.signaturePad.fromDataURL(that.feedbackEvaluation.signatureDataUrl);
} else {
- that.initSignature();
+ setTimeout(() => {
+ that.initSignature();
+ }, 100);
+ }
+ if (that.debug) {
+ setTimeout(() => {
+ that.initSignature();
+ }, 100);
}
that.showPhotos = res.group[0].inTheEnd;
@@ -474,7 +486,7 @@
const that = this;
event.preventDefault();
- if (that.signaturePad?.isEmpty()) {
+ if (that.signaturePad && that.signaturePad.isEmpty()) {
alert("Please provide a signature first.");
} else {
that.loading = true;
@@ -507,11 +519,11 @@
VEI_SN: that.currentCity.VEI_SN,
// country_id:,
// tour_guide_id: that.currentCity.tourGuideId,
- tour_guide_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0]?.tourGuideId || undefined,
+ tour_guide_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0] ? that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0].tourGuideId : undefined,
city_sn: iterator,
use_the_photos: formValues.photo_permission || -1,
other_comments: formValues.comments,
- feedback_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0]?.feedbackId || undefined,
+ feedback_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0] ? that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0].feedbackId : undefined,
service_item_answer: JSON.stringify(rateArr),
signature_data_url: formValues.signature,
},