Commit 74926935 authored by Facius's avatar Facius

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 2078f707 3da3e2cc
...@@ -801,6 +801,7 @@ export default { ...@@ -801,6 +801,7 @@ export default {
var news = { var news = {
body: e.body, body: e.body,
title: e.title, title: e.title,
create_at: e.create_at,
}; };
let that = this; let that = this;
wx.navigateTo({ wx.navigateTo({
......
<template> <template>
<view> <view class="news-wrap">
<u-navbar <u-navbar
back-icon-color="#000000" back-icon-color="#000000"
:background="background" :background="background"
...@@ -9,8 +9,11 @@ ...@@ -9,8 +9,11 @@
<view class="title"> <view class="title">
{{ title }} {{ title }}
</view> </view>
<view class="time-txt">
{{time | datefmt('YYYY.MM.DD HH:mm:ss')}}
</view>
<view class="u-content"> <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>
</view> </view>
</template> </template>
...@@ -20,7 +23,20 @@ ...@@ -20,7 +23,20 @@
data() { data() {
return { return {
title: '', title: '',
body: '' body: '',
time: '',
style: {
// 字符串的形式
p: `
color: #666666;
font-size: 24rpx;
letter-spacing: 0.03rpx;
`,
span: 'font-size: 26rpx',
img: `
padding: 40rpx 0;
`,
},
} }
}, },
onLoad() { onLoad() {
...@@ -30,25 +46,35 @@ ...@@ -30,25 +46,35 @@
eventChannel.on('acceptDataFromLearn', function(data) { eventChannel.on('acceptDataFromLearn', function(data) {
that.title = data.title; that.title = data.title;
that.body = data.body; that.body = data.body;
that.time = data.create_at
}) })
this.$u.mpShare.path = '' this.$u.mpShare.path = ''
}, },
} }
</script> </script>
<style> <style>
.news-wrap {
background-color: #FFFFFF;
height: 100vh;
}
.title{ .title{
font-size: 32rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
margin-left: 30rpx; margin: 20rpx 30rpx;
margin-top: 30rpx; }
} .time-txt {
margin: 0 30rpx;
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 24rpx;
}
.u-content{ .u-content{
font-size: 24rpx; font-size: 24rpx;
line-height: 36rpx; line-height: 36rpx;
color: #666666; color: #666666;
margin-left: 30rpx; margin-left: 30rpx;
margin-top: 30rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
</style> </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