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.
 
 
 
 

68 lines
1.3 KiB

<template>
<view class="wrap">
<view class="stabar"></view>
<!-- <view class="secbar"><label class="back" @click="back()"></label></view> -->
<navigation></navigation>
<view class="mainwrap2" style="top: 73rpx;">
<view class="title">{{title}}</view>
<view class="timetop">{{createTime}}</view>
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
<script>
import navigation from "@/components/navigation/navigation.vue";
export default {
components: {navigation},
data() {
return {
content:"",
guid:"",
title:"",
createTime:""
};
},
onLoad(options) {
this.guid = options.guid;
this.getContent();
},
methods:{
async getContent() {
const {
data: res
} = await uni.$http.post('/small/library/getById',{guid:this.guid})
if (!res.success) return uni.$showMsg()
this.content = res.data.content
this.title = res.data.title
this.createTime = res.data.createTime
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.mainwrap2 .title {
margin: 0 3% 3%;
text-align: left;
}
.timetop {
margin: 0 3% 3%;
color: #999;
font-size: 0.9rem;
}
.subwrap {
height: calc(100% - 200rpx);
}
</style>