|
@@ -184,7 +184,7 @@
|
|
|
<script>
|
|
|
import PicModal from './picModal'
|
|
|
import { queryFact } from '@/api/overview'
|
|
|
-import {mapGetter} from 'vuex'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -236,12 +236,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- let previewUrl = location.href.split('?')[1].toString().split('=')[1]
|
|
|
- this.$store.commit('SETISPREVIEW',previewUrl)
|
|
|
+ //预览是否开启
|
|
|
+ let previewUrl = location.href.split('?')[1]
|
|
|
+ if (previewUrl) {
|
|
|
+ previewUrl = Boolean(previewUrl.split('=')[1])
|
|
|
+ this.$store.commit('SETISPREVIEW', previewUrl)
|
|
|
+ }
|
|
|
this.query()
|
|
|
},
|
|
|
- computed:{
|
|
|
- ...mapGetter(['isPreview'])
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['isPreview'])
|
|
|
},
|
|
|
components: {
|
|
|
PicModal
|