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.
lxwx_front/pages/my/richText.vue

68 lines
1.0 KiB

2 years ago
<template>
<view class="rich">
2 years ago
<view class="status_bar"><!-- 这里是状态栏 --></view>
2 years ago
<u-navbar height="50" :autoBack="true">
<view
class="u-nav-slot"
slot="left"
>
<u-icon
name="arrow-left"
size="19"
></u-icon>
<view class="title">
{{title}}
</view>
</view>
</u-navbar>
<view class="text">
<u-parse :content="content"></u-parse>
</view>
</view>
</template>
<script>
import {getRichText} from '@/common/api.js'
export default{
data(){
return{
title:"",
content: ""
}
},
onLoad(options) {
this.getRichTextHandle(options.id)
},
methods:{
getRichTextHandle(id){
getRichText({ids:id}).then(res => {
console.log(res)
this.title = res.title
this.content = res.content
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/.u-nav-slot{
display: flex;
align-items: center;
.title{
font-size: 36upx;
color: #222222;
}
}
.rich{
min-height: calc(100vh);
background-color: #ffffff;
.text{
border-top:1px solid transparent;
margin:120upx 24upx 24upx 24upx;
}
}
</style>