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.
62 lines
1.4 KiB
62 lines
1.4 KiB
<template>
|
|
<view>
|
|
<!-- <view>id:{{noticeDetail.id}}</view>
|
|
<view>标题:{{noticeDetail.title}}</view>
|
|
<view>内容:{{noticeDetail.content}}</view>
|
|
<view>图片:{{noticeDetail.img}}</view>
|
|
<view>创建时间:{{noticeDetail.createTime}}</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:20px;
|
|
}
|
|
</style>
|
|
|