修改联系人图片

master
suixy 3 weeks ago
parent acbf9043b4
commit 8f6d311c5b

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

@ -44,6 +44,13 @@
<div> <div>
</div> </div>
</div> </div>
<div v-if="i.type===3" class="message">
<div class="userInfo">{{ i.userName }} {{ formatTime(i.time) }}</div>
<div class="info failInfo">
<div>{{ i.content }}</div>
<img class="wxQrcode" :src="wxQRcode" alt="微信二维码" @click="imgUrl = wxQRcode">
</div>
</div>
</template> </template>
</div> </div>
<div class="chatBox"> <div class="chatBox">
@ -66,6 +73,7 @@
</template> </template>
<script> <script>
import customerService from '@/assets/icon/customerService.png' import customerService from '@/assets/icon/customerService.png'
import wxQRcode from '@/assets/image/wxQRcode.png'
import { aiChat } from '@/api/aiChat' import { aiChat } from '@/api/aiChat'
export default { export default {
@ -74,6 +82,7 @@ export default {
return { return {
imgUrl: '', imgUrl: '',
customerService, customerService,
wxQRcode,
textarea: '', textarea: '',
isChat: false, isChat: false,
isLoading: false, isLoading: false,
@ -214,20 +223,10 @@ export default {
userName: '海威物联', userName: '海威物联',
}) })
} else { } else {
this.chatInfo.splice(loadingIndex, 1, { this.showBusyMessage(loadingIndex)
type: 0,
content: (res && res.msg) || 'AI 服务暂时不可用,请稍后重试。',
time: new Date().getTime(),
userName: '海威物联',
})
} }
} catch (err) { } catch (err) {
this.chatInfo.splice(loadingIndex, 1, { this.showBusyMessage(loadingIndex)
type: 0,
content: '网络连接异常,请稍后重试。',
time: new Date().getTime(),
userName: '海威物联',
})
} finally { } finally {
this.isLoading = false this.isLoading = false
this.$nextTick(() => { this.$nextTick(() => {
@ -235,6 +234,14 @@ export default {
}) })
} }
}, },
showBusyMessage(index) {
this.chatInfo.splice(index, 1, {
type: 3,
content: '当前访问人数过多,请稍后重试或添加联系人微信:',
time: new Date().getTime(),
userName: '海威物联',
})
},
busy(e) { busy(e) {
if (e === 1) { if (e === 1) {
this.chatInfo.push({ this.chatInfo.push({
@ -454,6 +461,19 @@ export default {
white-space: pre-wrap; white-space: pre-wrap;
line-height: 1.6; line-height: 1.6;
} }
.failInfo {
line-height: 1.6;
.wxQrcode {
display: block;
width: 120px;
height: 120px;
margin-top: 8px;
object-fit: contain;
cursor: pointer;
}
}
} }
.message1 { .message1 {

Loading…
Cancel
Save