123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <template>
- <view class="box">
- <u-navbar is-back :border-bottom="false" :title="title"></u-navbar>
- <view class="content_msg">
- <text class="text1">{{msg.title}}</text>
- <text class="text2">{{msg.created_at}}</text>
- <view class="content">
- <u-parse :html="msg.content || '' "></u-parse>
- </view>
- </view>
- <view class="mim-view-list"></view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- title: '',
- msg: {},
- form: {
- id: '',
- }
- };
- },
- onLoad(options) {
- this.form.id = options.id
- switch (options.type) {
- case '2': //罗山新闻
- this.title = "罗山新闻详情"
- break;
- case '3': //罗山县情
- this.title = "罗山县情详情"
- break;
- case '4': //发展动态
- this.title = "发展动态详情"
- break;
- case '5': //营商环境
- this.title = "营商环境详情"
- break;
- case '6': //全域旅游
- this.title = "全域旅游详情"
- break;
- default: //公告版
- this.title = "公告详情"
- break;
- }
- this.infoDetailsFn()
- },
- methods: {
- async infoDetailsFn() {
- const res = await this.$u.api.infoDetails(this.form)
- if (res.status === "success") {
- this.msg = res.data
- }
- },
- }
- }
- </script>
- <style lang="scss">
- .box {
- background: #F7F7F7;
- min-height: 100vh;
- .content_msg {
- /* 去掉内部滚动条 */
- scrollbar-width: none;
- -ms-overflow-style: none;
- /* 兼容webkit内核浏览器 */
- ::-webkit-scrollbar {
- display: none;
- }
- padding: 32rpx;
- box-sizing: border-box;
- margin: 24rpx;
- // width: 91.5%;
- background: white;
- display: flex;
- flex-direction: column;
- border-radius: 12rpx;
- /deep/ .content {
- text-align: justify !important;
- text-justify: distribute-all-lines !important;
- // text-align-last: justify !important;
- }
- .text1 {
- font-size: 32upx;
- font-family: PingFang SC-粗体, PingFang SC;
- font-weight: normal;
- color: #3D3D3D;
- text-align: justify;
- text-justify: distribute-all-lines;
- }
- .text2 {
- padding-top: 16upx;
- padding-bottom: 24upx;
- font-size: 28upx;
- font-family: Arial-Regular, Arial;
- font-weight: 400;
- color: #999999;
- }
- .text3 {
- font-size: 28upx;
- font-family: PingFang SC-中等, PingFang SC;
- font-weight: normal;
- color: #3D3D3D;
- padding-top: 24upx;
- }
- }
- }
- </style>
|