Sprinkler-app/page_user/yinsixq.vue

74 lines
1.2 KiB
Vue

<template>
<view>
<u-navbar :is-back="true" :title='tit' title-color="#000" :border-bottom="false" :background="bgc"
id="navbar">
</u-navbar>
<view class="" v-html="cont">
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
tit:'',
id:'',
cont:''
}
},
// 分享到好友(会话)
onShareAppMessage: function() {
return {
title: '绿小能',
path: '/pages/index/index'
}
},
// 分享到朋友圈
onShareTimeline: function() {
return {
title: '绿小能',
query: '',
path: '/pages/index/index'
}
},
onLoad(option) {
this.tit = option.tit
this.id = option.id
this.getxq()
},
methods:{
// 请求文章详情
getxq() {
this.$u.get(`/app/article/${this.id}`).then((res) => {
if (res.code == 200) {
this.cont = res.data.content
}
})
},
}
}
</script>
<style lang="less">
/deep/ .u-title{
margin-bottom: 22rpx;
}
/deep/ .uicon-nav-back{
margin-bottom: 22rpx;
}
page{
width: 100%;
padding: 20rpx 30rpx;
box-sizing: border-box;
background-color: #fff;
}
</style>