|
|
@@ -23,8 +23,9 @@
|
|
|
<view class="da_content">
|
|
|
<template v-if="item.think">
|
|
|
<view class="dac_think adfac">
|
|
|
- <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/07/07/13c5dd16-2032-464a-8b1c-2722d201cfe2.gif"></image>
|
|
|
- <text>正在思考中</text>
|
|
|
+ <image src="https://oss.familydaf.cn/sxsnfile/20260129/ce681f9923134f5bbf43654234e15367.gif"></image>
|
|
|
+ <text v-if="!item.fail">让我思考一下,请稍等~</text>
|
|
|
+ <text v-else>{{item.errMsg}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
@@ -161,10 +162,9 @@
|
|
|
const decoder = new TextEncoding.TextDecoder("utf-8");
|
|
|
const decodedString = decoder.decode(uint8Array);
|
|
|
if(decodedString.indexOf('"code":500')>-1){
|
|
|
+ this.$set(this.dialogList[this.dialogList.length-1],'fail',true);
|
|
|
const dsJson = JSON.parse(decodedString);
|
|
|
- if(dsJson){
|
|
|
- return this.$showModal(dsJson.msg||'')
|
|
|
- }
|
|
|
+ this.$set(this.dialogList[this.dialogList.length-1],'errMsg',dsJson?(dsJson.msg||'很抱歉,当前网络异常,请稍后再试~'):'很抱歉,当前网络异常,请稍后再试~');
|
|
|
}
|
|
|
try {
|
|
|
let newtext = decodedString.replaceAll('data:','').replaceAll(':keepAlive','');
|
|
|
@@ -182,6 +182,8 @@
|
|
|
this.$set(this.dialogList[this.dialogList.length-1],'message_id',nj.message_id);
|
|
|
this.$set(this.dialogList[this.dialogList.length-1],'conversation_id',nj.conversation_id);
|
|
|
this.$set(this.dialogList[this.dialogList.length-1],'think',false);
|
|
|
+ this.$set(this.dialogList[this.dialogList.length-1],'fail',false);
|
|
|
+ this.$set(this.dialogList[this.dialogList.length-1],'errMsg','');
|
|
|
}
|
|
|
})
|
|
|
setTimeout(()=>{
|
|
|
@@ -234,7 +236,9 @@
|
|
|
upvote:false,
|
|
|
comment:'',
|
|
|
share:false,
|
|
|
- think:true
|
|
|
+ think:true,
|
|
|
+ fail:false,
|
|
|
+ errMsg:''
|
|
|
}
|
|
|
this.dialogList = [...this.dialogList,...[qa]];
|
|
|
this.$nextTick(()=>{
|
|
|
@@ -359,12 +363,16 @@
|
|
|
border-radius: 4rpx 24rpx 24rpx 24rpx;
|
|
|
.dac_think{
|
|
|
image{
|
|
|
- width: 60rpx;
|
|
|
- height: 60rpx;
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
}
|
|
|
text{
|
|
|
- font-size: 30rpx;
|
|
|
- margin-left: 10rpx;
|
|
|
+ font-family: PingFangSC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #002846;
|
|
|
+ line-height: 54rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
.dc_btns{
|