_id.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div>
  3. <help-header></help-header>
  4. <div id="main">
  5. <div class="container" style="padding: 0; width: 1190px;">
  6. <div style="display: inline-block; width: 100%; margin: 0 auto">
  7. <div class="left">
  8. <left></left>
  9. </div>
  10. <div class="right">
  11. <div class="help-center">
  12. <div class="help-head"><img src="/images/help/help-title.png"></div>
  13. <div class="help-center-title">
  14. <a v-bind:href="'/help/home'" style="font-size: 14px">帮助中心首页<i class="fa fa-angle-right"></i></a>
  15. <span>
  16. <nuxt-link :to="`/help/home`" class="box" style="font-size: 16px">
  17. <span>{{helpTitle.item}}</span><i class="fa fa-close"></i></nuxt-link>
  18. <i class="dot fa fa-angle-right"></i>
  19. </span>
  20. <nuxt-link :to="`/help/helpList/{$helpDetail.navId}`" class="box" style="font-size: 14px"><span v-text="helpDetail.title"></span><i class="fa fa-close"></i></nuxt-link>
  21. </div>
  22. <!--文章详情-->
  23. <div class="help-center-details" style="color: #000">
  24. <div class="ql-container ql-snow" v-html="helpDetail.article"></div>
  25. <div v-if="helpDetail.length == 0" style="color: #999;">暂无数据!</div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. import { left, helpHeader } from '~components/help'
  36. export default {
  37. name: 'help',
  38. components: {
  39. left,
  40. helpHeader
  41. },
  42. fetch ({ store, route }) {
  43. console.log(route.params)
  44. return Promise.all([
  45. store.dispatch('loadHelpSnapsho', { parentId: 0 }),
  46. store.dispatch('loadHelpDetail', route.params)
  47. // store.dispatch('loadHelpTitle', route)
  48. ])
  49. },
  50. computed: {
  51. helpTitle () {
  52. return this.$store.state.help.title.data
  53. },
  54. helpDetail () {
  55. return this.$store.state.help.detail.data
  56. }
  57. }
  58. }
  59. </script>
  60. <style>
  61. @import '~assets/scss/help.css';
  62. .help-center-details .ql-container img {
  63. max-width: 840px;
  64. }
  65. .ql-container.ql-snow{
  66. border: none;
  67. }
  68. .ql-container.ql-snow p{
  69. font-size: 16px;
  70. }
  71. .ql-container.ql-snow .ql-editor{
  72. padding: 0;
  73. }
  74. </style>