details.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="phone-tongzhi-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="goUpPage" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">{{tzData.name}}</text>
  6. </view>
  7. <view class="tongzhi-body-box">
  8. <!-- <view class="tongzhi-name">{{tzData.name}}</view> -->
  9. <view class="tongzhi-time">{{tzData.time}}</view>
  10. <rich-text :nodes="tzData.content" class="tongzhi-content"></rich-text>
  11. </view>
  12. </view>
  13. </template>
  14. <script setup>
  15. import {onLoad,onShow} from '@dcloudio/uni-app';
  16. import {getAppNoticeInfo} from '@/api/shouye.js'
  17. import {ref,reactive} from "vue"
  18. const tzData = reactive({
  19. name: '',
  20. time: '',
  21. content: '',
  22. })
  23. onLoad((options) => {
  24. initPage(options);
  25. })
  26. function goUpPage(){
  27. uni.redirectTo({
  28. url: '/pages/admin/tongzhi/list'
  29. })
  30. }
  31. function initPage(options) {
  32. const opt = {
  33. noticeId: options.noticeId,
  34. }
  35. getAppNoticeInfo(opt).then(res => {
  36. tzData.name = res.data.name;
  37. tzData.time = res.data.createTime;
  38. tzData.content = res.data.content;
  39. })
  40. }
  41. </script>
  42. <style>
  43. </style>