123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <view class="container" v-if="isShow">
- <view class="contentBox">
- <view class="headerBox">
- <view class="title">{{NoticeTitle}}</view>
- <view class="timecenter">{{NoticeDate}}</view>
- </view>
- <view class="article">
- <bctos-rich-text :nodes="NoticeContent"></bctos-rich-text>
- </view>
- <view class="bottomBox" style="display:none;">
- <view class="author">{{NoticeBMName}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var that;
- export default {
- data() {
- return {
- isShow: false,
- helpID: '',
- NoticeTitle: "",
- NoticeDate: "",
- NoticeContent: '',
- NoticeBMName: '',
- }
- },
- onLoad(option) {
- that = this;
- that.helpID = decodeURIComponent(option.helpID)
- that.getData();
- },
- methods: {
- getData() {
- that.$admin.reqDirect({
- method: 'GET',
- url: '/api/v1/Snapshot/bulletions/' + that.helpID
- }).then(res => {
- if (res) {
- that.NoticeTitle = res.title;
- that.NoticeDate = res.creationTime ? that.$util.formatTime(new Date(res.creationTime)) : '';
- that.NoticeContent = res.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, reSrc) {
- var strImg = '<img src="' + reSrc + '" style="width:100%;" />';
- return strImg;
- });
- that.NoticeBMName = '';
- }
- that.isShow = true;
- }, err => {
- that.$util.msg(err);
- })
- },
- onBackTo() {
- uni.navigateBack();
- }
- }
- }
- </script>
- <style lang="less">
- .contentBox {
- height: calc(100% - 30rpx);
- padding: 0 20rpx 30rpx;
- overflow-y: auto;
- }
- .headerBox {
- border-bottom: 1px #d2d2d2 solid;
- padding: 40rpx 0 20rpx;
- }
- .title {
- font-size: 44rpx;
- font-weight: bold;
- margin-bottom: 20rpx;
- text-align: center;
- line-height: 50rpx;
- }
- .time {
- font-size: 36rpx;
- color: #666666;
- text-align: right;
- }
- .timecenter {
- font-size: 36rpx;
- color: #666666;
- text-align: center;
- }
- .article {
- font-size: 36rpx;
- background-color: #FFFFFF;
- color: #777;
- padding: 30rpx 0;
- line-height: 2.5;
- }
- .bottomBox {
- padding-bottom: 20rpx;
- }
- .author {
- text-align: right;
- }
- </style>
|