Commit 209ec858 by 李伟康

refactor(common): 优化接待详情页面功能

- 修改 Quality 组件中禁用状态下的提示逻辑,增加对 disabledText 的非空判断
- 在 getAiagent 方法中添加 loading 状态显示,提升用户体验
- 在 handlerMessage 方法中添加隐藏 loading 状态,保持页面流畅
1 parent 38c1d8f6
...@@ -129,8 +129,8 @@ export default { ...@@ -129,8 +129,8 @@ export default {
}, },
tabClick (item, index) { tabClick (item, index) {
if (this.activeIndex == index) return if (this.activeIndex == index) return
if (this.disabled) return uni.showToast({ if (this.disabled && this.disabledText) return uni.showToast({
title: this.disabledText || '', title: this.disabledText,
icon: 'none', icon: 'none',
mask: true, mask: true,
duration: 2e3 duration: 2e3
......
...@@ -374,6 +374,9 @@ export default { ...@@ -374,6 +374,9 @@ export default {
}, },
async getAiagent (item) { async getAiagent (item) {
if (item) { if (item) {
uni.showLoading({
mask: true
})
const { phone } = uni.$storage.get('userInfo'), const { phone } = uni.$storage.get('userInfo'),
[data] = await uni.$api.sceneMarketApi.getAiagent({ [data] = await uni.$api.sceneMarketApi.getAiagent({
ownerShipType: 1, ownerShipType: 1,
...@@ -444,6 +447,7 @@ export default { ...@@ -444,6 +447,7 @@ export default {
} }
}, },
handlerMessage ({ detail }) { handlerMessage ({ detail }) {
uni.hideLoading()
let [data] = detail.data let [data] = detail.data
if (typeof data.isResponding == 'boolean') this.isResponding = data.isResponding if (typeof data.isResponding == 'boolean') this.isResponding = data.isResponding
if (typeof data.isRecording == 'boolean') this.isRecording = data.isRecording if (typeof data.isRecording == 'boolean') this.isRecording = data.isRecording
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!