船员公众号
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.

61 lines
1.1 KiB

2 months ago
<template>
<view class="article">
<view class="title" v-if="info.title">{{info.title}}</view>
<view class="time" v-if="info.title">{{info.created_at}}</view>
<view class="content" v-if="info.title" v-html="info.content"></view>
<view class="p" v-if="!info.title">
<u-empty mode="data" text="暂无相关信息">
</u-empty>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type: "",
id: "",
info: {}
}
},
onLoad(options){
this.info = uni.getStorageSync("articleInfo");
this.info.content = this.info.content.replace(/<img src=/g,'<img style="width: 100%;" src=')
uni.setNavigationBarTitle({
title: this.info.title
})
}
}
</script>
<style lang="scss" scoped>
.article{
padding: 20rpx;
overflow: hidden;
// background-color: #fff;
.title{
font-size: 36rpx;
text-align: left;
padding: 30rpx 0;
color: #212121;
line-height: 60rpx;
}
.time{
font-size: 24rpx;
color: #999999;
}
.content{
padding: 30rpx 0;
font-size: 26rpx;
color: #212121;
line-height: 48rpx;
text-align: left;
}
.p{
padding: 200rpx 0 50rpx;
}
}
</style>