zhwl-miniapp/pages/notice/detail.vue
2025-06-26 12:38:35 +08:00

40 lines
1.3 KiB
Vue

<template>
<view class="waper">
<u-navbar :autoBack="true" :placeholder="true" bgColor="#fff">
<view slot='center' class="navbar_title">详情</view>
</u-navbar>
<view class="waper_box" v-if="detail">
<view class="title">{{detail.title}}</view>
<view class="time">{{$utils.formatDate('Y-M-D h:m', detail.publishtime * 1000)}}</view>
<view class="content">
<u-parse :content="detail.params.content"></u-parse>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
detail: null
};
},
async onLoad (options) {
let info = await this.$http.archieveDetail({ id: options.id });
info.data.params.content = this.$utils.replaceImg(info.data.params.content);
this.detail = info.data;
}
}
</script>
<style lang="scss">
page{ background: #fff; }
.waper_box{
width: 100%; box-sizing: border-box; padding: 0 32rpx;
.title{ line-height: 58rpx; color: #333; font-size: 40rpx; color: #333; }
.time{ margin-top: 24rpx; line-height: 38rpx; color: #666; font-size: 28rpx; }
.content{ width: 100%; margin-top: 32rpx; color: #666; font-size: 28rpx; line-height: 40rpx; }
}
</style>