index.vue 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="page-view f-30 p-40 flex-dir-column flex-x-center">
  3. <view class="title">{{detailVO.name}}</view>
  4. <view class="col-info-d t-c m-b-30">
  5. <u-parse :content="detailVO.content"></u-parse>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
  11. export default {
  12. mixins: [themeMixins],
  13. data() {
  14. return {
  15. detailVO: {},
  16. }
  17. },
  18. methods: {
  19. getDetail(id) {
  20. this.$u.api.getSnacksDetail(id).then(res => {
  21. if (res.data.content) {
  22. res.data.content = decodeURIComponent(res.data.content);
  23. }
  24. this.detailVO = res.data || {}
  25. })
  26. }
  27. },
  28. onLoad(options) {
  29. this.getDetail(options.id);
  30. },
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .title {
  35. width: 100%;
  36. text-align: center;
  37. font-size: 25px;
  38. color: #65371b;
  39. margin-bottom: 20px;
  40. }
  41. </style>