tzdetail.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="detail">
  3. <view class="dtop">
  4. <view class="tit">{{datainfo.noticeTitle}}</view>
  5. <view class="txts flexcc">
  6. <view>{{datainfo.releaseTime||datainfo.createTime}}</view>
  7. </view>
  8. </view>
  9. <view class="richs ql-editor">
  10. <rich-text :nodes="infoContent"></rich-text>
  11. </view>
  12. <loading></loading>
  13. </view>
  14. </template>
  15. <script>
  16. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  17. import {getNoticeQuery} from "@/api/common.js"
  18. import {formatRichText} from '@/utils/common'
  19. export default {
  20. components:{},
  21. data(){
  22. return{
  23. look:require('@/static/images/home/look.png'),
  24. datainfo:'',
  25. infoContent:'',
  26. id:'',
  27. }
  28. },
  29. onShow() {
  30. },
  31. onLoad: function(e) {
  32. this.id=e.id;
  33. if(e.type==1){
  34. uni.setNavigationBarTitle({
  35. title:"系统通知"
  36. })
  37. }else{
  38. uni.setNavigationBarTitle({
  39. title:"系统公告"
  40. })
  41. }
  42. this.getDataFn()
  43. },
  44. methods:{
  45. checkPermi,checkRole,
  46. getDataFn(){
  47. getNoticeQuery(this.id).then(res=>{
  48. if(res.code==200){
  49. this.datainfo=res.data;
  50. if(res.data.noticeContent){
  51. this.infoContent=formatRichText(res.data.noticeContent)
  52. }
  53. }
  54. })
  55. },
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .detail{padding: 0 26rpx;
  61. .dtop{padding: 24rpx 20rpx 30rpx;border-bottom: 2rpx dashed #E6E6E6;
  62. .tit{font-size: 32rpx;text-align: center;font-weight: bold;color: #000000;line-height: 54rpx;margin-bottom: 26rpx;}
  63. .txts{font-weight: 500;font-size: 24rpx;color: #949695;}
  64. .num{
  65. image{margin-right: 4rpx;width: 24rpx;height: 16rpx;}
  66. }
  67. }
  68. .richs{padding: 32rpx 0;font-size: 26rpx;
  69. color: #000000;
  70. line-height: 27px;}
  71. }
  72. </style>