2020-06-02 11:42:13 +08:00
|
|
|
<template>
|
2020-06-04 08:21:34 +08:00
|
|
|
<view class="article-details">
|
2020-06-02 11:42:13 +08:00
|
|
|
<rich-text :nodes="nodes"></rich-text>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
nodes: `<p>13268748568645634nfdhf dfvjdfjgdfl vdufhnh1</p>123346<h1>das</h1><h1>das</h1><h1>das1</h1><h2>das2</h2><h3>das3</h3>`
|
|
|
|
}
|
2020-06-04 08:21:34 +08:00
|
|
|
},
|
|
|
|
onLoad(option) {
|
2020-06-19 18:07:11 +08:00
|
|
|
console.log(option);
|
2020-06-04 08:21:34 +08:00
|
|
|
this.setTitle(option.title);
|
2020-06-19 18:07:11 +08:00
|
|
|
this.getUseHelpInfo(option.id);
|
2020-06-04 08:21:34 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
setTitle(title){
|
|
|
|
uni.setNavigationBarTitle({
|
2020-06-08 15:23:23 +08:00
|
|
|
title: title
|
2020-06-04 08:21:34 +08:00
|
|
|
});
|
|
|
|
},
|
2020-06-19 18:07:11 +08:00
|
|
|
unescapeHTML (temp){
|
|
|
|
temp = "" + temp;
|
|
|
|
return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
|
|
|
},
|
|
|
|
getUseHelpInfo(id) {
|
|
|
|
this.$u.api.getUseHelpInfo({
|
|
|
|
launch_id: id,
|
|
|
|
}).then((res)=>{
|
|
|
|
// console.log(res)
|
|
|
|
if (res.errCode == 0) {
|
|
|
|
this.nodes = this.unescapeHTML(res.data.info[0].help_info);
|
|
|
|
this.setTitle(res.data.info[0].help_title);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2020-06-04 08:21:34 +08:00
|
|
|
},
|
2020-06-02 11:42:13 +08:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2020-06-04 08:21:34 +08:00
|
|
|
.article-details {
|
|
|
|
min-height: calc(100vh - var(--window-top));
|
2020-06-02 11:42:13 +08:00
|
|
|
background: #ECECEC;
|
|
|
|
padding: 20rpx 35rpx 0;
|
|
|
|
}
|
|
|
|
</style>
|