detail.vue 909 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <page-loading :loading="loading" class="ProductDetail">
  3. <u-parse :content="info.detail" />
  4. </page-loading>
  5. </template>
  6. <script>
  7. import { mapState } from 'vuex'
  8. import PageLoading from '@/components/PageLoading'
  9. export default {
  10. name: 'CaseDetail',
  11. components: { PageLoading },
  12. data() {
  13. return {
  14. id: '',
  15. loading: true,
  16. intoView: '',
  17. info: {},
  18. specs: []
  19. }
  20. },
  21. computed: {
  22. ...mapState({
  23. userInfo: seate => seate.user.info
  24. })
  25. },
  26. methods: {
  27. getDetail() {
  28. this.$api.cases.detail(this.id).then(res => {
  29. this.loading = false
  30. this.info = res.data
  31. })
  32. },
  33. viewer() {
  34. this.$api.cases.viewer(this.id).then(res => {
  35. })
  36. }
  37. },
  38. onLoad(options) {
  39. this.id = options.id
  40. this.getDetail()
  41. this.viewer()
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .ProductDetail {
  47. }
  48. </style>