mesPage.vue 866 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="phone-mes-page">
  3. <view class="mes-box">
  4. <view class="mes-name">{{mesPageData.name}}</view>
  5. <text class="mes-time">{{mesPageData.createTime}}</text>
  6. <view class="fwb-box" v-html="mesPageData.content"></view>
  7. </view>
  8. </view>
  9. </template>
  10. <script setup>
  11. import {reactive,ref} from "vue";
  12. import {onLoad,onShow} from '@dcloudio/uni-app';
  13. import {getNoticeInfo} from '@/api/my.js'
  14. let mesPageData = reactive({
  15. name: '',
  16. createTime: '',
  17. content: '',
  18. });
  19. let pageId = ref('');
  20. onLoad((options) => {
  21. pageId.value = options.noticeId;
  22. getMesInit()
  23. });
  24. function getMesInit(){
  25. getNoticeInfo({noticeId:pageId.value}).then(res => {
  26. mesPageData.name= res.data.name;
  27. mesPageData.createTime = res.data.createTime;
  28. mesPageData.content = res.data.content;
  29. })
  30. }
  31. </script>
  32. <style>
  33. </style>