鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
855 B

  1. <template>
  2. <view class="page__view">
  3. <!-- 导航栏 -->
  4. <navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#FFFFFF" />
  5. <!-- <image class="img" :src="details.details" mode="widthFix"></image> -->
  6. <uv-parse :content="details.details"></uv-parse>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. details: {},
  14. }
  15. },
  16. onLoad({ api, id, idKey }) {
  17. this.getData(api, id, idKey)
  18. },
  19. methods: {
  20. async getData(api, id, idKey) {
  21. try {
  22. this.details = await this.$fetch(api, { [idKey]: id })
  23. } catch (err) {
  24. console.log('err', err)
  25. }
  26. },
  27. },
  28. }
  29. </script>
  30. <style scoped lang="scss">
  31. .page__view {
  32. background: $uni-bg-color;
  33. }
  34. .img {
  35. width: 100vw;
  36. height: auto;
  37. }
  38. </style>