11
This commit is contained in:
parent
d6d60bac0d
commit
e166cdcbfe
|
@ -17,7 +17,7 @@
|
||||||
userinfo: {},
|
userinfo: {},
|
||||||
areaInfo: {},
|
areaInfo: {},
|
||||||
content: '',
|
content: '',
|
||||||
title:''
|
title: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -28,7 +28,9 @@
|
||||||
// 设置数据
|
// 设置数据
|
||||||
this.title = title
|
this.title = title
|
||||||
this.content = content
|
this.content = content
|
||||||
this.insertPhoneNumberAndDate()
|
this.content = this.replaceImgWithImage(this.content);
|
||||||
|
// this.insertPhoneNumberAndDate()
|
||||||
|
console.log(this.content, 'this.contentthis.contentthis.contentthis.content');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -39,7 +41,8 @@
|
||||||
this.$u.get(`/app/article/list?areaId=${id}&tag=agreement`).then((res) => {
|
this.$u.get(`/app/article/list?areaId=${id}&tag=agreement`).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.info = res.rows[0];
|
this.info = res.rows[0];
|
||||||
this.insertPhoneNumberAndDate();
|
this.content = this.replaceImgWithImage(this.info.content);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
@ -50,10 +53,18 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
insertPhoneNumberAndDate() {
|
replaceImgWithImage(content) {
|
||||||
|
|
||||||
// 替换所有的 为 \u00A0
|
// 替换所有的 为 \u00A0
|
||||||
this.content = this.content.replace(/ /g, '\u00A0');
|
content = content.replace(/ /g, '\u00A0');
|
||||||
|
|
||||||
|
// 替换 <img> 标签的宽度和高度样式
|
||||||
|
content = content.replace(/<img([^>]*)>/g, (match, group1) => {
|
||||||
|
// 查找并移除可能存在的尾部斜杠
|
||||||
|
let cleanedGroup = group1.replace(/\s*\/$/, '');
|
||||||
|
return `<img ${cleanedGroup} style="width: 350rpx; height: auto;" />`;
|
||||||
|
});
|
||||||
|
|
||||||
|
return content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,7 +40,7 @@
|
||||||
总营收 <span style="color: #4C97E7;">¥{{info.income.totalIncome}}</span>
|
总营收 <span style="color: #4C97E7;">¥{{info.income.totalIncome}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="info_li">
|
<view class="info_li">
|
||||||
累计待支付 <span style="color: #4C97E7;">¥{{info.income.totalIncome}}</span>
|
累计待支付 <span style="color: #4C97E7;">¥{{info.income.totalUnpaid}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user