|
|
|
|
@ -10,6 +10,7 @@ Page({
|
|
|
|
|
pageType: null,
|
|
|
|
|
currentId: null,
|
|
|
|
|
currentInfo: {},
|
|
|
|
|
showText:"",
|
|
|
|
|
tagStyle: {
|
|
|
|
|
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';",
|
|
|
|
|
@ -104,8 +105,11 @@ Page({
|
|
|
|
|
// let reg = /<a[^>]*href=['"]([^"]*)['"][^>]*>(.*?)<\/a>/g.exec(res.data.data.content);
|
|
|
|
|
// 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({
|
|
|
|
|
currentInfo: res.data.data,
|
|
|
|
|
showText:s,
|
|
|
|
|
html: res.data.data.content.replace(/<!doctype html>/g, ""),
|
|
|
|
|
});
|
|
|
|
|
wx.hideLoading();
|
|
|
|
|
|