Commit 3da3e2cc authored by 高铭波's avatar 高铭波

修改消息通知排版样式

parent 3dc6d0d7
......@@ -801,6 +801,7 @@ export default {
var news = {
body: e.body,
title: e.title,
create_at: e.create_at,
};
let that = this;
wx.navigateTo({
......
<template>
<view>
<view class="news-wrap">
<u-navbar
back-icon-color="#000000"
:background="background"
......@@ -9,8 +9,11 @@
<view class="title">
{{ title }}
</view>
<view class="time-txt">
{{time | datefmt('YYYY.MM.DD HH:mm:ss')}}
</view>
<view class="u-content">
<u-parse :html="body" :tag-style="style"></u-parse>
<u-parse :html="body" :tag-style="style" :selectable="true"></u-parse>
</view>
</view>
</template>
......@@ -20,7 +23,20 @@
data() {
return {
title: '',
body: ''
body: '',
time: '',
style: {
// 字符串的形式
p: `
color: #666666;
font-size: 24rpx;
letter-spacing: 0.03rpx;
`,
span: 'font-size: 26rpx',
img: `
padding: 40rpx 0;
`,
},
}
},
onLoad() {
......@@ -30,25 +46,35 @@
eventChannel.on('acceptDataFromLearn', function(data) {
that.title = data.title;
that.body = data.body;
that.time = data.create_at
})
this.$u.mpShare.path = ''
},
}
</script>
<style>
<style>
.news-wrap {
background-color: #FFFFFF;
height: 100vh;
}
.title{
font-size: 32rpx;
font-size: 36rpx;
font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
}
margin: 20rpx 30rpx;
}
.time-txt {
margin: 0 30rpx;
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 24rpx;
}
.u-content{
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
margin-right: 30rpx;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment