Commit 49bee694 by 李伟康

commit 提交

1 parent d5ab4eda
...@@ -34,9 +34,9 @@ export default { ...@@ -34,9 +34,9 @@ export default {
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime) value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value }) this.$store.dispatch("setReceptionTrack", { key, value })
if(keyName == 'id' && key == 1) { if (keyName == 'id' && key == 1) {
let [receptionRef] = this.$refs.media1 let [receptionRef] = this.$refs.media1
receptionRef.previewLeave(receptionRef.currentItem) receptionRef.previewLeave && receptionRef.previewLeave(receptionRef.currentItem)
} }
} }
......
...@@ -153,9 +153,7 @@ export default { ...@@ -153,9 +153,7 @@ export default {
}, },
back () { back () {
this.$refs?.toolRef?.hide(); this.$refs?.toolRef?.hide();
let [receptionRef] = this.$refs.media1 this.$emit("back");
if (this.id == 1 && receptionRef.currentImgUrl) receptionRef.showPicture(false)
else this.$emit("back");
}, },
done (e) { done (e) {
this.$refs.toolRef.hide(); this.$refs.toolRef.hide();
...@@ -236,12 +234,26 @@ export default { ...@@ -236,12 +234,26 @@ export default {
}, },
onPreviewBack () { onPreviewBack () {
this.showPreview = false this.showPreview = false
if (this.type == 'preview') return if (this.type == 'preview') return this.mediaObject = null
const { materialFormat, id } = this.mediaObject, const { materialFormat, id } = this.mediaObject,
key = `case-${materialFormat}-${id}`, key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime) value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value }) 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 { ...@@ -247,7 +247,7 @@ export default {
{ key: 'films', configIndex: 1 }, { key: 'films', configIndex: 1 },
{ key: 'products', configIndex: 2 } { key: 'products', configIndex: 2 }
] ]
if(!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 }) if (!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 })
configItems.map(item => { configItems.map(item => {
boutiqueMediaConfig[e.carModelName].push({ boutiqueMediaConfig[e.carModelName].push({
...defaultConfig[item.configIndex], ...defaultConfig[item.configIndex],
...@@ -286,8 +286,16 @@ export default { ...@@ -286,8 +286,16 @@ export default {
}, },
back () { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
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(); if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome(); this.backHome();
}
}, },
backHome () { backHome () {
if (this.recording) this.$refs.home.stopAudio(true); 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!