12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <template>
- <view class="detail">
- <view class="dtop">
- <view class="tit">{{datainfo.noticeTitle}}</view>
- <view class="txts flexcc">
- <view>{{datainfo.releaseTime||datainfo.createTime}}</view>
- </view>
- </view>
- <view class="richs ql-editor">
- <rich-text :nodes="infoContent"></rich-text>
- </view>
- <loading></loading>
- </view>
- </template>
- <script>
- import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
- import {getNoticeQuery} from "@/api/common.js"
- import {formatRichText} from '@/utils/common'
- export default {
- components:{},
- data(){
- return{
- look:require('@/static/images/home/look.png'),
- datainfo:'',
- infoContent:'',
- id:'',
- }
- },
- onShow() {
-
- },
- onLoad: function(e) {
- this.id=e.id;
- if(e.type==1){
- uni.setNavigationBarTitle({
- title:"系统通知"
- })
- }else{
- uni.setNavigationBarTitle({
- title:"系统公告"
- })
- }
- this.getDataFn()
- },
- methods:{
- checkPermi,checkRole,
- getDataFn(){
- getNoticeQuery(this.id).then(res=>{
- if(res.code==200){
- this.datainfo=res.data;
- if(res.data.noticeContent){
- this.infoContent=formatRichText(res.data.noticeContent)
- }
- }
- })
-
- },
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .detail{padding: 0 26rpx;
- .dtop{padding: 24rpx 20rpx 30rpx;border-bottom: 2rpx dashed #E6E6E6;
- .tit{font-size: 32rpx;text-align: center;font-weight: bold;color: #000000;line-height: 54rpx;margin-bottom: 26rpx;}
- .txts{font-weight: 500;font-size: 24rpx;color: #949695;}
- .num{
- image{margin-right: 4rpx;width: 24rpx;height: 16rpx;}
- }
- }
- .richs{padding: 32rpx 0;font-size: 26rpx;
- color: #000000;
- line-height: 27px;}
- }
- </style>
|