|
|
@@ -153,7 +153,8 @@ export default {
|
|
|
assets: [],
|
|
|
distances: [0, 0, 0, 0],
|
|
|
swiperRef: null,
|
|
|
- inApp
|
|
|
+ inApp,
|
|
|
+ isEdit: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -203,15 +204,11 @@ export default {
|
|
|
}
|
|
|
this.emitter.on('setIntroduction', e => {
|
|
|
this.info.introduction = e;
|
|
|
+ this.isEdit = true;
|
|
|
});
|
|
|
this.emitter.on('setAssets', assets => {
|
|
|
- console.log(assets);
|
|
|
this.assets = assets;
|
|
|
- setTimeout(() => {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.swiperRef.updateSlides();
|
|
|
- });
|
|
|
- }, 500);
|
|
|
+ this.isEdit = true;
|
|
|
});
|
|
|
},
|
|
|
beforeRouteEnter(to, from) {
|
|
|
@@ -288,6 +285,7 @@ export default {
|
|
|
back() {
|
|
|
let _this = this;
|
|
|
this.$dialog.confirm({ title: '提示', message: '确定要退出展馆吗?' }).then(() => {
|
|
|
+ this.isEdit = false;
|
|
|
if (_this.isMine) {
|
|
|
_this.backPage();
|
|
|
} else {
|
|
|
@@ -378,12 +376,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
- if (!to.meta.isHall) {
|
|
|
- this.setKeeps(['Hall'], false);
|
|
|
+ if (to.path === '/store' && this.isEdit) {
|
|
|
+ next(false);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.back();
|
|
|
+ }, 100);
|
|
|
} else {
|
|
|
- this.setKeeps(['Hall']);
|
|
|
+ if (!to.meta.isHall) {
|
|
|
+ this.setKeeps(['Hall'], false);
|
|
|
+ } else {
|
|
|
+ this.setKeeps(['Hall']);
|
|
|
+ }
|
|
|
+ next();
|
|
|
}
|
|
|
- next();
|
|
|
}
|
|
|
};
|
|
|
</script>
|