|
|
|
@ -512,23 +512,23 @@ |
|
|
|
|
data.reference |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if (JSON.stringify(data.reference) != '{}') { |
|
|
|
|
if (data.reference.content != null && data.reference.title != null) { |
|
|
|
|
this.isShowYindao = true |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.msgList.forEach(item => { |
|
|
|
|
if (item.isOver) { |
|
|
|
|
item.data = item.data + |
|
|
|
|
`<img src=${yindaoPng} width=20px height=20px class=yindao/>` |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.isShowYindao = false |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this.isShowYindao = false |
|
|
|
|
} |
|
|
|
|
// if (JSON.stringify(data.reference) != '{}') { |
|
|
|
|
// if (data.reference.content != null && data.reference.title != null) { |
|
|
|
|
// this.isShowYindao = true |
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
// this.msgList.forEach(item => { |
|
|
|
|
// if (item.isOver) { |
|
|
|
|
// item.data = item.data + |
|
|
|
|
// `<img src=${yindaoPng} width=20px height=20px class=yindao/>` |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }) |
|
|
|
|
// } else { |
|
|
|
|
// this.isShowYindao = false |
|
|
|
|
// } |
|
|
|
|
// } else { |
|
|
|
|
// this.isShowYindao = false |
|
|
|
|
// } |
|
|
|
|
this.loading = false; |
|
|
|
|
if (this.isExpanded) { |
|
|
|
|
this.isExpanded = !this.isExpanded; |
|
|
|
@ -626,10 +626,11 @@ |
|
|
|
|
this.scrollBottom(); |
|
|
|
|
|
|
|
|
|
if (newdata == data) { |
|
|
|
|
this.msgList[this.msgList.length - 1].data += |
|
|
|
|
`<image src="../../static/nav/yindao.png" style="height: 40rpx; width: 40rpx;"></image>` |
|
|
|
|
console.log('this.msgList[this.msgList.length - 1].data', this.msgList[this.msgList |
|
|
|
|
.length - 1].data) |
|
|
|
|
|
|
|
|
|
// this.msgList[this.msgList.length - 1].data += |
|
|
|
|
// `<image src="../../static/nav/yindao.png" style="height: 40rpx; width: 40rpx;"></image>` |
|
|
|
|
// console.log('this.msgList[this.msgList.length - 1].data', this.msgList[this.msgList |
|
|
|
|
// .length - 1].data) |
|
|
|
|
if (optionType == 0 || optionType == 1) { |
|
|
|
|
this.msgList[this.msgList.length - 1].optionType = optionType; |
|
|
|
|
this.msgList[this.msgList.length - 1].answerOptions = |
|
|
|
@ -640,6 +641,29 @@ |
|
|
|
|
} else { |
|
|
|
|
this.msgList[this.msgList.length - 1].options = answerOptions; |
|
|
|
|
} |
|
|
|
|
// this.msgList.forEach(item => { |
|
|
|
|
// if (typeof item.reference === 'object' && item.reference.title && item |
|
|
|
|
// .reference |
|
|
|
|
// .content) { |
|
|
|
|
// if (item.data.includes('\n\n')) { |
|
|
|
|
// const strArr = item.data.split('\n\n') |
|
|
|
|
// console.log(strArr, 'strArr') |
|
|
|
|
// item.data = strArr.reduce((str, item, index) => { |
|
|
|
|
// if (index === 0) { |
|
|
|
|
// str = str + item + |
|
|
|
|
// `<img src=${yindaoPng} width=20 height=20 class=yindao />` + |
|
|
|
|
// '\n\n' |
|
|
|
|
// } else { |
|
|
|
|
// str = str + item + '\n\n' |
|
|
|
|
// } |
|
|
|
|
// return str |
|
|
|
|
// }, '') |
|
|
|
|
// } else { |
|
|
|
|
// item.data = item.data + |
|
|
|
|
// `<img src=${yindaoPng} width=20px height=20px class=yindao/>` |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
clearInterval(timer); |
|
|
|
|
this.msgList[this.msgList.length - 1].isOver = true |
|
|
|
|
} |
|
|
|
@ -655,6 +679,7 @@ |
|
|
|
|
]; |
|
|
|
|
this.scrollBottom(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.msgList.forEach(item => { |
|
|
|
|
delete item.answerOptions |
|
|
|
|
}) |
|
|
|
|