detail.vue 944 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="layout-page" :style="themeStyle">
  3. <v-header :title="$t('help.a0')"></v-header>
  4. <div class="layout-main">
  5. <div class="p-md border-b">
  6. <div class="title fn-18 color-light m-b-xs">{{detail.title}}</div>
  7. <div class="fn-sm">{{detail.created_at}}</div>
  8. </div>
  9. <div class="edit-content p-md" v-html="detail.body"></div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. import College from "@/api/college";
  15. import { mapGetters } from "vuex";
  16. export default {
  17. name: "collegeDetail",
  18. data() {
  19. return {
  20. detail: {},
  21. query:{}
  22. };
  23. },
  24. computed: {
  25. ...mapGetters(['themeStyle'])
  26. },
  27. methods: {
  28. getArticleDetail() {
  29. let data = {
  30. id: this.query.id,
  31. };
  32. College.getArticleDetail(data).then((res) => {
  33. this.detail = res.data;
  34. });
  35. },
  36. },
  37. onLoad(query) {
  38. this.query = query
  39. this.getArticleDetail();
  40. },
  41. };
  42. </script>