|
@@ -266,22 +266,36 @@ export default {
|
|
} else {
|
|
} else {
|
|
return ''
|
|
return ''
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ init() {
|
|
|
|
+ //预览是否开启
|
|
|
|
+ // let previewUrl = location.href.split('?')[1]
|
|
|
|
+ // if (previewUrl) {
|
|
|
|
+ // previewUrl = Boolean(previewUrl.split('=')[1])
|
|
|
|
+ // this.$store.commit('SETISPREVIEW', previewUrl)
|
|
|
|
+ // }
|
|
|
|
+ let previewUrl = this.$route.query.previewUrl,
|
|
|
|
+ plazaId = this.$route.query.plazaId
|
|
|
|
+ if (previewUrl != '') {
|
|
|
|
+ console.log(previewUrl)
|
|
|
|
+ this.$store.commit('SETISPREVIEW', previewUrl)
|
|
|
|
+ }
|
|
|
|
+ if (plazaId) {
|
|
|
|
+ localStorage.setItem('PLAZAID', plazaId)
|
|
|
|
+ this.$store.commit('STOREPLAZAID', plazaId)
|
|
|
|
+ }
|
|
|
|
+ // let previewUrl = location.href.split('=')[1] ? location.href.split('=')[1].split('&')[0] : false,
|
|
|
|
+ // plazaId = location.href.split('=')[2] ? location.href.split('=')[2] : '1000423'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- //预览是否开启
|
|
|
|
- // let previewUrl = location.href.split('?')[1]
|
|
|
|
- // if (previewUrl) {
|
|
|
|
- // previewUrl = Boolean(previewUrl.split('=')[1])
|
|
|
|
- // this.$store.commit('SETISPREVIEW', previewUrl)
|
|
|
|
- // }
|
|
|
|
- let previewUrl = location.href.split('=')[1] ? location.href.split('=')[1].split('&')[0] : false,
|
|
|
|
- plazaId = location.href.split('=')[2] ? location.href.split('=')[2] : '1000423'
|
|
|
|
- this.$store.commit('SETISPREVIEW', previewUrl)
|
|
|
|
this.query()
|
|
this.query()
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.init()
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['isPreview', 'pic'])
|
|
|
|
|
|
+ ...mapGetters(['isPreview', 'pic', 'plazaId'])
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
PicModal
|
|
PicModal
|