修改小程序bug

This commit is contained in:
邓洁
2023-02-27 00:46:01 +08:00
parent b0d3372b7c
commit fd3b8347a4
8 changed files with 45 additions and 18 deletions

View File

@@ -14,6 +14,9 @@
<view class="xwD_content">
<u-parse :content="detailList.content" @preview="preview" @navigate="navigate"></u-parse>
</view>
<!-- <u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
<rich-text :nodes="content"></rich-text>
</u-modal> -->
</view>
</template>
@@ -25,7 +28,9 @@
data() {
return {
id: '',
detailList: []
detailList: [],
// showM: false,
// content: `该新闻已下架!`,
}
},
onLoad(option) {
@@ -36,15 +41,24 @@
//获取行业新闻详情
getNewsDetail() {
this.$apiServe.getNewsDetail(this.id).then(res => {
console.log('新闻详情', res.data);
if (res.data.code == 0 || res.data.msg == "该新闻已下架!") {
this.$toast.warn('该新闻已下架!')
// this.showM = true
}
if (res.data.data) {
let detail = res.data.data
detail.pub_time = dateFormatXwDetail(detail.pub_time)
this.detailList = res.data.data
} else {
this.$toast.warn('没有更多详情了')
}
}).finally(_ => {})
}
},
// confirm() {
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }
}
}
</script>