Browse Source

帮助中心

ouxq 8 năm trước cách đây
mục cha
commit
d1fe217ce2
1 tập tin đã thay đổi với 66 bổ sung0 xóa
  1. 66 0
      pages/help/helpList/_id.vue

+ 66 - 0
pages/help/helpList/_id.vue

@@ -0,0 +1,66 @@
+<template>
+  <div>
+    <help-header></help-header>
+  <div id="main">
+    <div class="container" style="padding: 0; width: 1190px;">
+      <div style="display: inline-block; width: 100%; margin: 0 auto">
+        <div class="left">
+          <left></left>
+        </div>
+        <div class="right">
+          <div class="help-center">
+            <div class="help-head"><img src="/images/help/help-title.png"></div>
+            <div class="help-center-title">
+              <a v-bind:href="'/help/help'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></a>
+              <span>
+                <nuxt-link :to="`/help/help`" class="box" style="font-size: 16px"><span>{{helpTitle.item}}</span><i class="fa fa-close"></i></nuxt-link>
+              </span>
+            </div>
+            <!-- 文章列表-->
+            <div class="help-center-list">
+              <h4>问题知识列表</h4>
+              <ul>
+                <li v-for="list in helpList">
+                  <em></em>
+                  <nuxt-link :to="`/help/helpDetail/${list.num}`" v-text="list.title"></nuxt-link>
+                </li>
+                <li v-if="helpList.length == 0" style="color: #999;">暂无数据!</li>
+              </ul>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+</template>
+<script>
+  import left from '~components/help/left'
+  import helpHeader from '~components/help/helpHeader'
+  export default {
+    name: 'help',
+    components: {
+      left,
+      helpHeader
+    },
+    fetch ({ store, route }) {
+      console.log(route.params)
+      return Promise.all([
+        store.dispatch('loadHelpSnapsho', { parentId: 0 }),
+        store.dispatch('loadHelpList', { navId: route.params.id }),
+        store.dispatch('loadHelpTitle', route.params)
+      ])
+    },
+    computed: {
+      helpTitle () {
+        return this.$store.state.help.title.data
+      },
+      helpList () {
+        return this.$store.state.help.helplist.data
+      }
+    }
+  }
+</script>
+<style>
+  @import '~assets/scss/help.css';
+</style>