details.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <!-- <icon class="tongzhi-down-icon" @click="downBtn"></icon> -->
  7. </view>
  8. <view class="tongzhi-body-box">
  9. <!-- <view class="tongzhi-name">{{tzData.name}}</view> -->
  10. <view class="tongzhi-time">{{tzData.time}}</view>
  11. <rich-text :nodes="tzData.content" class="tongzhi-content"></rich-text>
  12. </view>
  13. </view>
  14. </template>
  15. <script setup>
  16. import {onLoad,onShow} from '@dcloudio/uni-app';
  17. import {getAppNoticeInfo} from '@/api/shouye.js'
  18. import {ref,reactive} from "vue"
  19. const tzData = reactive({
  20. name: '',
  21. time: '',
  22. content: '',
  23. downUrl: '',
  24. })
  25. onLoad((options) => {
  26. initPage(options);
  27. })
  28. function goUpPage(){
  29. uni.redirectTo({
  30. url: '/pages/admin/tongzhi/list'
  31. })
  32. }
  33. // 下载
  34. function downBtn(){
  35. //downUrl
  36. }
  37. function initPage(options) {
  38. const opt = {
  39. noticeId: options.noticeId,
  40. }
  41. getAppNoticeInfo(opt).then(res => {
  42. tzData.name = res.data.name;
  43. tzData.time = res.data.createTime;
  44. tzData.content = res.data.content;
  45. tzData.downUrl = res.data.content;
  46. })
  47. }
  48. </script>
  49. <style>
  50. </style>