zsk 1 year ago
parent ba05c104d1
commit 3946f1f19a

@ -70,7 +70,7 @@ if (envVersion === 'develop') {
// baseUrl = "https://test.renminshitang.com.cn/zhuchangtong/api_dev" // baseUrl = "https://test.renminshitang.com.cn/zhuchangtong/api_dev"
that.globalData.ip = 'https://test.renminshitang.com.cn/daotian/api_dev' that.globalData.ip = 'https://test.renminshitang.com.cn/daotian/api_dev'
// that.globalData.ip = 'https://daotian.matripe.com.cn' // that.globalData.ip = 'https://daotian.matripe.com.cn'
// that.globalData.ip = 'https://daotian.matripe.com.cn' that.globalData.ip = 'https://daotian.matripe.com.cn'
} else if (envVersion === 'trial') { } else if (envVersion === 'trial') {
console.log('当前是体验环境'); console.log('当前是体验环境');
that.globalData.ip = "https://test.renminshitang.com.cn/daotian/api_dev" that.globalData.ip = "https://test.renminshitang.com.cn/daotian/api_dev"

@ -67,7 +67,7 @@
</view> </view>
<view class="fw400" hover-class="none" hover-stop-propagation="false">{{item.pubTime}}</view> <view class="fw400" hover-class="none" hover-stop-propagation="false">{{item.pubTime}}</view>
</view> </view>
<view class="f14 c9 oelps" style="width:100%">{{item.remark}}</view> <view class="f14 c9 oelps" style="width:100%">{{item.remark || '[图片]'}}</view>
</view> </view>
<view class wx:if="{{infoList.length <= 0}}" style="text-align:center" hover-class="none" hover-stop-propagation="false"> <view class wx:if="{{infoList.length <= 0}}" style="text-align:center" hover-class="none" hover-stop-propagation="false">
<view class="t-icon t-icon-zanwu" style="width:80px;height:80px;margin:60px auto 20px;"></view> <view class="t-icon t-icon-zanwu" style="width:80px;height:80px;margin:60px auto 20px;"></view>

@ -9,7 +9,8 @@ Page({
serviceInfo: {}, serviceInfo: {},
pageType: null, pageType: null,
currentId: null, currentId: null,
currentInfo: {}, currentInfo: {},
showText:"",
tagStyle: { tagStyle: {
p: "margin-top: 0; margin-bottom: 0;line-height: 1.8; white-space:pre-wrap;", p: "margin-top: 0; margin-bottom: 0;line-height: 1.8; white-space:pre-wrap;",
body: " margin: 0; color: #333; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-variant: tabular-nums; line-height: 1.8; -webkit-font-feature-settings: 'tnum'; font-feature-settings: 'tnum';", body: " margin: 0; color: #333; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-variant: tabular-nums; line-height: 1.8; -webkit-font-feature-settings: 'tnum'; font-feature-settings: 'tnum';",
@ -102,10 +103,13 @@ Page({
if (res.data.status == 200) { if (res.data.status == 200) {
setTimeout(() => { setTimeout(() => {
// let reg = /<a[^>]*href=['"]([^"]*)['"][^>]*>(.*?)<\/a>/g.exec(res.data.data.content); // let reg = /<a[^>]*href=['"]([^"]*)['"][^>]*>(.*?)<\/a>/g.exec(res.data.data.content);
// console.log(reg); // console.log(reg);
var s = res.data.data.content.replace(/<img/g, '<img style="max-width:100% !important;height:auto !important;margin-top:10px;"')
console.log(s)
that.setData({ that.setData({
currentInfo: res.data.data, currentInfo: res.data.data,
showText:s,
html: res.data.data.content.replace(/<!doctype html>/g, ""), html: res.data.data.content.replace(/<!doctype html>/g, ""),
}); });
wx.hideLoading(); wx.hideLoading();

@ -61,6 +61,5 @@
</view> </view>
<view class="content" wx:else hover-class="none" hover-stop-propagation="false"> <view class="content" wx:else hover-class="none" hover-stop-propagation="false">
<view class="title f18 fw500">{{currentInfo.title}}</view> <view class="title f18 fw500">{{currentInfo.title}}</view>
<!-- <mp-html content="{{html}}" tag-style="{{tagStyle}}" container-style="font-size:14px;color:#333" scroll-table="true"/> --> <rich-text class="info f14" space='nbsp' nodes="{{showText}}"></rich-text>
<!-- <rich-text class="info f14" space='nbsp'>{{currentInfo.content}}</rich-text> -->
</view> </view>

Loading…
Cancel
Save