1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <view class="system">
- <view class="content">
- <view class="title bold">{{title}}</view>
- <view class="time">{{sendTime}}</view>
- <u-parse :content="msg"></u-parse>
- </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>
|