-
4. Would you give Asia Highlights permission to use photos taken by your tour guide(s) that contain your picture?
@@ -757,7 +745,7 @@
},
});
const defaultHeaders = { mode: 'no-cors', 'Sec-Fetch-Mode': 'no-cors' };
- const HOST100 = ''; // `http://202.103.68.144:890/service-CooperateSOA`;
+ const HOST100 = `http://202.103.68.144:890/service-CooperateSOA`;
const HOST = HOST100 || `https://p9axztuwd7x8a7.mycht.cn/service-CooperateSOA`;
const index = new Vue({
el: '#app',
@@ -770,6 +758,7 @@
return {
timer: null,
error: false,
+ errorMsg: '',
webcode: 'ah',
param: {},
@@ -804,6 +793,7 @@
}
if (!(this.param.v && this.param.g)) {
this.error = true;
+ this.errorMsg = 'Invalid URL';
return false;
}
this.loading = true;
@@ -823,6 +813,7 @@
that.loading = false;
that.cityList = res.cityList;
that.error = res.cityList.length === 0;
+ that.errorMsg = 'No city found';
});
},
selectCity(city) {
@@ -831,8 +822,6 @@
const _param = {
GRI_SN: this.param.g,
VEI_SN: this.param.v,
- // EOI_SN: this.param.e,
- EOI_SN: city.cii_sn === 1186 ? 245176 : 245988, // debug: 接口未返回
CITY_SN: city.cii_sn,
lgc: 1
};
@@ -868,6 +857,10 @@
{ headers: { ...{} } }
).then((res) => {
that.loading = false;
+ if (res.errcode !== 0) {
+ that.error = true;
+ that.errorMsg = 'Data error.';
+ }
const itemGroup = groupBy(res.feedbackItemList, ele => ele.type);
that.feedbackItem.guide = itemGroup.W ? itemGroup.W : [];
that.feedbackItem.driver = itemGroup.Y ? itemGroup.Y : [];
@@ -895,13 +888,14 @@
that.tourGuideList = res.tourGuideList;
that.feedbackEvaluation = res.feedbackEvaluation[0];
that.group = res.group[0];
- that.webcode = that.group.webcode ? that.group.webcode : that.webcode;
+ that.webcode = that.group.webcode ? that.group.webcode.toLowerCase() : that.webcode; // todo:
// that.signaturePad.fromDataURL(that.feedbackEvaluation.signatureDataUrl); // debug: -1
- that.isFilled = isEmpty(res.feedbackEvaluation[0].feedbackId); // debug: !isEmpty
+ // that.isFilled = isEmpty(res.feedbackEvaluation[0].feedbackId); // debug: !isEmpty
+ that.isFilled = false;
that.showPhotos = res.group[0].inTheEnd;
- // alert("Thank you for completing the Feedback Evaluation. Once submitted the tour guide would not be able to view your comments. "); // debug: 1
+ // alert("Thank you for completing the Feedback Evaluation. Once submitted the tour guide would not be able to view your comments. ");
that.initSignature();
});
@@ -938,16 +932,17 @@
postForm(
`${HOST}/save_feedback`,
{
- EOI_SN: that.currentCity.EOI_SN,
+ EOI_SN: that.group.EOI_SN,
GRI_SN: that.currentCity.GRI_SN,
VEI_SN: that.currentCity.VEI_SN,
// country_id:,
- city_id: that.currentCity.cii_sn,
+ city_sn: that.currentCity.cii_sn,
tour_guide_id: that.currentCity.tourGuideId,
- use_the_photos: formValues.photo_permission || -1, // todo: 没有更新成功
+ use_the_photos: formValues.photo_permission || -1,
other_comments: formValues.comments,
service_item_answer: JSON.stringify(rateArr),
- signature_data_url: formValues.signature, // todo: 没有更新成功
+ signature_data_url: formValues.signature,
+ feedback_id: that.feedbackEvaluation.feedbackId || undefined,
},
{ headers: { ...{} } }
).then(res => {