123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <view class="system">
- <view><nav-bar title="none" icon="none" background="transparent" border-color="transparent" ></nav-bar></view>
- <view class="content">
- <view class="title bold">{{title}}</view>
- <view class="time">{{sendTime}}</view>
- <view class="text">{{msg}}</view>
- </view>
- </view>
- </template>
- <script>
- import { getMsgDetail } from '@/apis/news.js'
- export default {
- data(){
- return{
- id:'',
- title:'',
- sendTime:'',
- msg:'',
- }
- },
- onLoad(params){
- this.id = params.id
- this.getDetail()
- },
- // onShow(){
-
- // },
- methods: {
- // 获取信息详情
- async getDetail () {
- const res = await getMsgDetail({msgId:this.id})
- if(res){
- const { title,sendTime,msg } = res
- this.title = title
- this.sendTime = sendTime
- this.msg = msg
- }
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .system{
- background: #fff;
- height: 100%;
- .content{
- .title{
- font-size: 32rpx;
- }
- padding: 32rpx 48rpx;
- .time{
- margin: 20rpx 0;
- font-weight: 500;
- font-size: 26rpx;
- color: #989897;
- }
- .text{
- font-size: 28rpx;
- }
- }
- }
- </style>
|