创作者微信小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

57 lines
1.2 KiB

<template>
<view>
<uni-card v-bind:title="noticeDetail.title">
<text class="uni-body">{{noticeDetail.content}}</text></br>
<view class="bottom">
<text>成都次元节点网络科技有限公司</text></br>
<text class="uni-body">{{noticeDetail.createTime}}</text>
</view>
</uni-card>
</view>
</template>
<script>
import {
getNoticeDetails
} from '@/api/userInfo.js'
export default {
data() {
return {
noticeDetail:{
id: 0,
title: '',
content: '',
img: '',
createTime: ''
}
}
},
onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
this.noticeDetail.id = option.id
//console.log('this.id',this.id)
this.getNoticeDetails();
},
methods: {
// 查询公告详情
async getNoticeDetails() {
const res = await getNoticeDetails(this.noticeDetail.id)
console.log('res', res)
if (res.data.code === 200) {
this.noticeDetail = res.data.data
} else {
uni.showModal({
content: '公告详情数据加载失败!',
showCancel: false
});
}
},
}
}
</script>
<style>
.bottom{
margin-top:40rpx;
}
</style>