Commit eaf46cf5 by Lin

feat(HomeFrame): 增强客户资料获取逻辑以提升用户体验

- 在 HomeFrame 组件中,添加了对客户资料组信息的获取逻辑,确保在切换标签时及时更新数据。
- 优化了 handleHomeContentTabClick 和 changeTab 方法,增强了用户交互的流畅性。
1 parent 131b0412
...@@ -520,6 +520,7 @@ export default { ...@@ -520,6 +520,7 @@ export default {
methods: { methods: {
handleHomeContentTabClick(index) { handleHomeContentTabClick(index) {
this.homeContentTabIndex = index this.homeContentTabIndex = index
this.getCustomerProfileGroupInfo()
}, },
_syncShowFloatLog() { _syncShowFloatLog() {
this.showFloatLog = FloatLogConfig.isLogBallVisible() this.showFloatLog = FloatLogConfig.isLogBallVisible()
...@@ -708,7 +709,10 @@ export default { ...@@ -708,7 +709,10 @@ export default {
} }
}, },
async changeTab({ item, index }) { async changeTab({ item, index }) {
if (index == 0) this.$refs.messageRef.getMessageSummary() if (index == 0) {
this.$refs.messageRef.getMessageSummary()
this.getCustomerProfileGroupInfo()
}
this.previewOff = index != 0 this.previewOff = index != 0
this.$emit('changeTab', index) this.$emit('changeTab', index)
console.log(this.$refs.leftBox.hasPopupOpen) console.log(this.$refs.leftBox.hasPopupOpen)
...@@ -792,6 +796,7 @@ export default { ...@@ -792,6 +796,7 @@ export default {
try { try {
const res = await uni.$api.customerApi.getCustomerProfileGroupInfoAPI({ merchantId }) const res = await uni.$api.customerApi.getCustomerProfileGroupInfoAPI({ merchantId })
console.log('getCustomerProfileListInfo***')
this.customerProfileList = Array.isArray(res) ? res : [] this.customerProfileList = Array.isArray(res) ? res : []
} catch (error) { } catch (error) {
console.error('查询客户建档分组信息失败:', error) console.error('查询客户建档分组信息失败:', error)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!