axolotle 2 лет назад
Родитель
Сommit
e173ec64b8
2 измененных файлов с 13 добавлено и 1 удалено
  1. 11 0
      src/pages/Gallery.vue
  2. 2 1
      src/store/modules/pages.js

+ 11 - 0
src/pages/Gallery.vue

@@ -28,6 +28,8 @@
 
     <side-view id="gallery-index" right>
       <template #default="{ hide }">
+        <div class="gallery-intro" v-html="intro" />
+
         <ul v-if="creations">
           <li v-for="crea in creations" :key="crea.id">
             <node-view-title
@@ -84,6 +86,12 @@ export default {
     id: { type: [Number, String], default: undefined }
   },
 
+  data () {
+    return {
+      intro: ''
+    }
+  },
+
   computed: {
     ...mapGetters(['creations', 'creation'])
   },
@@ -107,6 +115,9 @@ export default {
 
   created () {
     this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
+    this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
+      this.intro = page.content
+    })
   }
 }
 </script>

+ 2 - 1
src/store/modules/pages.js

@@ -10,7 +10,8 @@ export default {
     ids: {
       welcome: 263,
       intro: 264,
-      kit: 265
+      kit: 265,
+      gallery: 349
     },
     visited: localStorage.getItem('visited') === 'true'
   },