richtext.vue
730 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!-- 富文本 -->
<template>
<view class="rich-wrap">
<view class="content_box"><u-parse :html="richText.content"></u-parse></view>
</view>
</template>
<script>
import Auth from '@/shopro/permission/index.js';
export default {
components: {},
data() {
return {
richText: ''
};
},
computed: {},
onLoad() {
this.$Route.query.id && this.getRichText();
},
methods: {
getRichText() {
this.$http('common.richText', {
id: this.$Route.query.id
}).then(res => {
if (res.code === 1) {
this.richText = res.data;
uni.setNavigationBarTitle({
title: res.data.title
});
}
});
}
}
};
</script>
<style lang="scss">
.content_box {
background: #fff;
padding: 30rpx;
}
</style>