修改搜索中心loading问题
This commit is contained in:
@@ -674,7 +674,7 @@
|
|||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
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
|
this.total = res.result.total
|
||||||
|
|||||||
+1
-1
@@ -202,7 +202,7 @@
|
|||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
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
|
this.total = res.result.total
|
||||||
|
|||||||
@@ -254,8 +254,8 @@
|
|||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
this.conList.forEach(val => {
|
||||||
val.content = val.content.replace(/<img .*?>/g, '')
|
val.content = val.content ? val.content.replace(/<img .*?>/g, '') : ''
|
||||||
val.content = val.content.replace(/<\/?p[^>]*>/gi, '')
|
val.content = val.content ? val.content.replace(/<\/?p[^>]*>/gi, '') : ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getText(str) {
|
getText(str) {
|
||||||
let words = str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') //这里是去除标签
|
let words = str ? str.replace(/<[^<>]+>/g, '').replace(/ /gi, '') : ''//这里是去除标签
|
||||||
//.replace(/\s/g, '') //这里是去除空格
|
//.replace(/\s/g, '') //这里是去除空格
|
||||||
return words
|
return words
|
||||||
},
|
},
|
||||||
@@ -234,8 +234,8 @@ export default {
|
|||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
if (this.conList && this.conList.length > 0) {
|
if (this.conList && this.conList.length > 0) {
|
||||||
this.conList.forEach(val => {
|
this.conList.forEach(val => {
|
||||||
val.content = val.content.replace(/<img .*?>/g, '')
|
val.content = val.content ? val.content.replace(/<img .*?>/g, '') :''
|
||||||
val.content = val.content.replace(/<\/?p[^>]*>/gi, '')
|
val.content = val.content ? val.content.replace(/<\/?p[^>]*>/gi, '') : ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
|||||||
Reference in New Issue
Block a user