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
44
45
46
47
48
49
50
51
52
53
54
55
| <template>
| <view class="rich-text-page">
| <u-parse :content="content"></u-parse>
| <!-- <view class="rich-content" v-html="content"></view> -->
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| type: '',
| content: ''
| }
| },
| onLoad(options) {
| this.id = options.id
| this.getBannerDetai()
| },
| methods: {
| async getBannerDetai() {
| const res = await this.$u.api.getBannerDetail({ id: this.id })
| if (res.code === 200) {
| this.content = res.data.content || ''
| }
| }
| }
| }
| </script>
|
| <style lang="scss" scoped>
| .rich-text-page {
| min-height: 100vh;
| background: #ffffff;
| padding: 30rpx;
| box-sizing: border-box;
| }
|
| .rich-content {
| width: 100%;
| font-size: 28rpx;
| color: #333333;
| line-height: 1.6;
|
| ::v-deep {
| image {
| max-width: 100% !important;
| height: auto !important;
| }
| p {
| margin-bottom: 20rpx;
| }
| }
| }
| </style>
|
|