roamfuding-xcx/page_user/wenhua/wenhuaxq.vue
2026-03-16 10:00:58 +08:00

80 lines
1.7 KiB
Vue

<template>
<view class="page">
<u-navbar title=" " :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='36' id="navbar" :custom-back="btnfh">
</u-navbar>
<image class="bj" src="https://api.ccttiot.com/smartmeter/img/static/uIbfdkJXiSARjf8d86DK" mode=""></image>
<u-parse :html="obj.content" style="width: 660rpx;margin: auto;padding: 20rpx;border-radius: 14rpx;"></u-parse>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: " ",
},
id:'',
obj:{},
fanhui:''
}
},
onLoad(option) {
console.log(option)
this.id = option.id
this.getxq()
if(option && option.fanhui){
this.fanhui = option.fanhui
}
},
// 分享到好友(会话)
onShareAppMessage: function() {
return {
title: '玩转福鼎',
path: '/page_user/wenhua/wenhuaxq?id=' + this.id + '&fanhui=1'
}
},
// 分享到朋友圈
onShareTimeline: function() {
return {
title: '玩转福鼎',
query: '',
path: '/page_user/wenhua/wenhuaxq?id=' + this.id + '&fanhui=1'
}
},
methods: {
btnfh(){
if(this.fanhui == 1){
uni.reLaunch({
url:'/pages/index/index'
})
}else{
uni.navigateBack()
}
},
// 请求文化详情
getxq(){
this.$u.get(`/app/article/detail/${this.id}`).then((res) => {
if(res.code == 200){
this.obj = res.data
}
})
},
}
}
</script>
<style lang="scss">
page {
background: #fff;
}
.bj{
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: -1;
}
</style>