Commit 49bee694 by 李伟康

commit 提交

1 parent d5ab4eda
......@@ -34,9 +34,9 @@ export default {
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
if(keyName == 'id' && key == 1) {
if (keyName == 'id' && key == 1) {
let [receptionRef] = this.$refs.media1
receptionRef.previewLeave(receptionRef.currentItem)
receptionRef.previewLeave && receptionRef.previewLeave(receptionRef.currentItem)
}
}
......
......@@ -153,9 +153,7 @@ export default {
},
back () {
this.$refs?.toolRef?.hide();
let [receptionRef] = this.$refs.media1
if (this.id == 1 && receptionRef.currentImgUrl) receptionRef.showPicture(false)
else this.$emit("back");
this.$emit("back");
},
done (e) {
this.$refs.toolRef.hide();
......@@ -236,12 +234,26 @@ export default {
},
onPreviewBack () {
this.showPreview = false
if (this.type == 'preview') return
if (this.type == 'preview') return this.mediaObject = null
const { materialFormat, id } = this.mediaObject,
key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
this.mediaObject = null
},
hidePicture () {
let [receptionRef] = this.$refs.media1,
flag = false
if (this.id == 1 && receptionRef.currentImgUrl) {
receptionRef.showPicture(false)
flag = true
}
if (this.id == 4 && this.mediaObject) {
this.onPreviewBack()
flag = true
}
return flag
}
},
};
......
......@@ -247,7 +247,7 @@ export default {
{ key: 'films', configIndex: 1 },
{ key: 'products', configIndex: 2 }
]
if(!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 })
if (!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 })
configItems.map(item => {
boutiqueMediaConfig[e.carModelName].push({
...defaultConfig[item.configIndex],
......@@ -286,8 +286,16 @@ export default {
},
back () {
if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome();
else {
if (this.id == 1 || this.id == 4) {
let isPictureView = this.$refs.detail.hidePicture()
console.log(isPictureView)
if (isPictureView) return
}
if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome();
}
},
backHome () {
if (this.recording) this.$refs.home.stopAudio(true);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!