mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化代码
This commit is contained in:
parent
8bbe18e4a0
commit
4c74974cfc
@ -35,6 +35,7 @@ export function replaceImgSrc(_content, _url) {
|
|||||||
if (isEmpty(_content)) {
|
if (isEmpty(_content)) {
|
||||||
return _content;
|
return _content;
|
||||||
}
|
}
|
||||||
|
_content = _content.replaceAll("&","&")
|
||||||
// a 为富文本的字符串内容,为了测试,只写了img标签
|
// a 为富文本的字符串内容,为了测试,只写了img标签
|
||||||
let b = /<img [^>]*src=['"]([^'"]+)[^>]*>/g; // img 标签取src里面内容的正则
|
let b = /<img [^>]*src=['"]([^'"]+)[^>]*>/g; // img 标签取src里面内容的正则
|
||||||
let s = _content.match(b); // 取到所有img标签 放到数组 s里面
|
let s = _content.match(b); // 取到所有img标签 放到数组 s里面
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
let _tmpStartTime = new Date(_startTime);
|
let _tmpStartTime = new Date(_startTime);
|
||||||
|
|
||||||
// _item.startTime = _that.java110Util.date.formatDate(_tmpStartTime);
|
// _item.startTime = _that.java110Util.date.formatDate(_tmpStartTime);
|
||||||
_item.context = replaceImgSrc(_item.context,conf.baseUrl);
|
_item.context = replaceImgSrc(_item.context,conf.commonBaseUrl);
|
||||||
_that.activity = _item;
|
_that.activity = _item;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user