| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <view class="container">
- <!-- 公告详情 -->
- <view class="title">{{ noticeDetail.title }}</view>
- <view class="time" v-if="noticeDetail">
- <span>
- <span>作者:{{noticeDetail.author || '茶付宝'}}</span>
- </span>
- <span :style="{'margin-left':'20rpx'}">
- 时间: {{ $day(noticeDetail.add_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
- </span></view
- >
- <mp-html :content="noticeDetail.content" class="mar_t50"></mp-html>
- <!-- 公告详情-end -->
- </view>
- </template>
- <script>
- import { post } from "@/request/api.js";
- import mpHtml from "@/uni_modules/mp-html/components/mp-html/mp-html.vue"
- export default {
- data() {
- return {
- content: "",
- noticeDetail: {},
- };
- },
- onLoad(da) {
- this.loadData(da.id)
- },
- methods: {
- loadData(id) {
- let data = {
- article_id: id,
- };
- post("v1/notice", data).then((res) => {
- if (res.code == 0) {
- this.noticeDetail = res.data.data;
- }
- });
- },
- },
- components: {
- mpHtml,
- },
- };
- </script>
- <style lang="scss" scoped>
- // 用户须知
- .container {
- border-top: 20rpx solid #f5f5f5;
- padding: 0 20rpx;
- box-sizing: border-box;
- .title {
- margin-top: 20rpx;
- font-size: 48rpx;
- font-weight: bold;
- }
- .time {
- margin-top: 10rpx;
- font-size: 20rpx;
- color: #666363;
- }
- }
- // 用户须知-end
- </style>
|