101 lines
2.2 KiB
Vue
101 lines
2.2 KiB
Vue
<template>
|
|||
|
|
<view class="content">
|
||
|
|
<TopSafe></TopSafe>
|
||
|
|
<Header title="系统公告" :isReturn="true" @return="onReturnClick" />
|
||
|
|
<view class="setting-view">
|
||
|
|
<view class="name-box-title">
|
||
|
|
<view class="value">{{ newsDetail.title }}</view>
|
||
|
|
<view class="name-box-time">{{ formatDate(newsDetail.ctdate) }}</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="name-box">
|
||
|
|
<view class="value" v-html="newsDetail.content"></view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<up-toast ref="uToastRef"></up-toast>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import Header from "@/components/common/header.vue";
|
||
|
|
import TopSafe from "@/components/common/top-safe.nvue";
|
||
|
|
import { getNewsDetail } from "@/api/news.js";
|
||
|
|
import { formatDate } from "@/utils/index.js";
|
||
|
|
|
||
|
|
export default {
|
||
|
|
components: { Header, TopSafe },
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
newsDetail: {},
|
||
|
|
};
|
||
|
|
},
|
||
|
|
onShow() {},
|
||
|
|
onLoad(option) {
|
||
|
|
if (option && option.id) {
|
||
|
|
this.getNewsDetail(Number(option.id));
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
formatDate,
|
||
|
|
async getNewsDetail(id) {
|
||
|
|
const params = {
|
||
|
|
id,
|
||
|
|
};
|
||
|
|
const resp = await getNewsDetail(params);
|
||
|
|
if (resp && resp.bizcode === 100) {
|
||
|
|
this.newsDetail = resp.data || {};
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onReturnClick() {
|
||
|
|
uni.navigateTo({url:"/pages/login_package/announcement/announcement"});
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.bottom-btn {
|
||
|
|
width: 100%;
|
||
|
|
margin-bottom: 92rpx;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
padding: 0 32rpx;
|
||
|
|
box-sizing: border-box;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
.setting-view {
|
||
|
|
width: 100%;
|
||
|
|
height: calc(100% - 88rpx - var(--status-bar-height));
|
||
|
|
overflow-y: auto;
|
||
|
|
padding: 0 32rpx;
|
||
|
|
box-sizing: border-box;
|
||
|
|
position: relative;
|
||
|
|
background-color: #fff;
|
||
|
|
.name-box-title {
|
||
|
|
border-bottom: 1rpx solid #eaeaea;
|
||
|
|
padding-bottom: 20rpx;
|
||
|
|
margin-bottom: 20rpx;
|
||
|
|
.value {
|
||
|
|
font-weight: 500;
|
||
|
|
font-size: 40rpx;
|
||
|
|
color: #333333;
|
||
|
|
}
|
||
|
|
.name-box-time {
|
||
|
|
font-size: 28rpx;
|
||
|
|
color: #666666;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
.name-box {
|
||
|
|
width: 100%;
|
||
|
|
border-radius: 16rpx;
|
||
|
|
overflow-y: auto;
|
||
|
|
display: flex;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-content: flex-start;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|