修改搜索中心loading问题

This commit is contained in:
高嵩
2023-10-18 15:29:32 +08:00
parent 866305ae2d
commit db1ea6817a
4 changed files with 7 additions and 7 deletions
@@ -674,7 +674,7 @@
this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content ? val.content.replace(/<img .*?>/g, '') : ''
})
}
this.total = res.result.total
@@ -202,7 +202,7 @@
this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content ? val.content.replace(/<img .*?>/g, '') :''
})
}
this.total = res.result.total
@@ -254,8 +254,8 @@
this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content.replace(/<\/?p[^>]*>/gi, '')
val.content = val.content ? val.content.replace(/<img .*?>/g, '') : ''
val.content = val.content ? val.content.replace(/<\/?p[^>]*>/gi, '') : ''
})
}
this.total = res.result.total
@@ -211,7 +211,7 @@ export default {
this.getList()
},
getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
let words = str ? str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') : ''//这里是去除标签
//.replace(/\s/g, '') //这里是去除空格
return words
},
@@ -234,8 +234,8 @@ export default {
this.conList = res.result.records
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
val.content = val.content.replace(/<img .*?>/g, '')
val.content = val.content.replace(/<\/?p[^>]*>/gi, '')
val.content = val.content ? val.content.replace(/<img .*?>/g, '') :''
val.content = val.content ? val.content.replace(/<\/?p[^>]*>/gi, '') : ''
})
}
this.total = res.result.total