球星卡微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
735 B

<template>
<view>
<u-parse :content="article"></u-parse>
</view>
</template>
<script>
import uParse from '@/components/u-parse/u-parse.vue'
export default {
components: {
uParse
},
data(){
return {
id: '',
title: '',
article: ''
}
},
onLoad(options){
// 富文本解析文档:https://ext.dcloud.net.cn/plugin?id=183
this.id = options.id || '';
this.title = options.title || '';
// todo 此处根据文章id获取
this.id && this.getDetail();
},
onReady(){
uni.setNavigationBarTitle({
title: this.title
})
},
methods: {
getDetail(){
console.log("this.id", this.id);
}
}
}
</script>
<style>
@import url("@/components/u-parse/u-parse.css");
</style>