From d14ef1ef05860b9f00057abbd6917f3bd5b994c9 Mon Sep 17 00:00:00 2001 From: "zhonghua.li" Date: Sun, 29 Mar 2026 20:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=20AI=E9=97=AE=E7=AD=94=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 3 +- custom-tab-bar/index.js | 22 +- custom-tab-bar/index.vue | 32 +- .../ai_qa/after_sales_qa/after_sales_qa.vue | 173 ++++++++ .../ai_qa/competitor_qa/competitor_qa.vue | 173 ++++++++ .../ai_qa/decision_qa/decision_qa.vue | 173 ++++++++ .../ai_qa/demand_qa/demand_qa.vue | 173 ++++++++ .../ai_qa/general_qa/general_qa.vue | 173 ++++++++ .../ai_qa/objection_qa/objection_qa.vue | 173 ++++++++ pages-subpackage/ai_qa/price_qa/price_qa.vue | 173 ++++++++ pages-subpackage/ai_qa/sharp_qa/sharp_qa.vue | 173 ++++++++ pages-subpackage/ai_qa/trust_qa/trust_qa.vue | 173 ++++++++ pages.json | 66 +++ pages/ai_qa/ai_qa.vue | 380 ++++++++++++++++++ .../furniture_customer/furniture_customer.vue | 3 +- .../furniture_reception.vue | 3 +- pages/ucenter/ucenter.vue | 5 +- 17 files changed, 2055 insertions(+), 16 deletions(-) create mode 100644 pages-subpackage/ai_qa/after_sales_qa/after_sales_qa.vue create mode 100644 pages-subpackage/ai_qa/competitor_qa/competitor_qa.vue create mode 100644 pages-subpackage/ai_qa/decision_qa/decision_qa.vue create mode 100644 pages-subpackage/ai_qa/demand_qa/demand_qa.vue create mode 100644 pages-subpackage/ai_qa/general_qa/general_qa.vue create mode 100644 pages-subpackage/ai_qa/objection_qa/objection_qa.vue create mode 100644 pages-subpackage/ai_qa/price_qa/price_qa.vue create mode 100644 pages-subpackage/ai_qa/sharp_qa/sharp_qa.vue create mode 100644 pages-subpackage/ai_qa/trust_qa/trust_qa.vue create mode 100644 pages/ai_qa/ai_qa.vue diff --git a/App.vue b/App.vue index 91187f2..80b7750 100644 --- a/App.vue +++ b/App.vue @@ -198,7 +198,8 @@ this.urlPathMap = { 'pages/furniture_customer/furniture_customer': '/customer', 'pages/furniture_reception/furniture_reception': '/reception', - 'pages/furniture_top_sales/furniture_top_sales': '/top-sales', + 'pages/ai_qa/ai_qa': '/ai-qa', + 'pages/ai_analysis/ai_analysis': '/ai-analysis', 'pages/ucenter/ucenter': '/profile' }; diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 103b334..fe90a1c 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -61,6 +61,20 @@ Component({ iconPath: '/static/tabbar/customer.png', selectedIconPath: '/static/tabbar/customer_active.png', }, + { + key: 'ai_qa', + text: 'AI问答', + pagePath: 'pages/ai_qa/ai_qa', + iconPath: '/static/tabbar/expression.png', + selectedIconPath: '/static/tabbar/expression_active.png', + }, + { + key: 'ai_analysis', + text: 'AI分析', + pagePath: 'pages/ai_analysis/ai_analysis', + iconPath: '/static/tabbar/ai_analysis.png', + selectedIconPath: '/static/tabbar/ai_analysis_active.png', + }, { key: 'furniture_top_sales', text: '销冠', @@ -276,6 +290,8 @@ Component({ 'furniture_reception': 'pages/furniture_reception/furniture_reception', 'common_begin_reception': 'pages/furniture_reception/common_begin_reception', 'furniture_customer': 'pages/furniture_customer/furniture_customer', + 'ai_qa': 'pages/ai_qa/ai_qa', + 'ai_analysis': 'pages/ai_analysis/ai_analysis', 'furniture_top_sales': 'pages/furniture_top_sales/furniture_top_sales' }; @@ -503,7 +519,7 @@ Component({ const hasFurnitureRole = roles.includes('furniture'); if (isAdminFurniture || hasFurnitureRole) { - const furnitureTabs = ['furniture_reception', 'furniture_customer', 'furniture_top_sales', 'ucenter']; + const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter']; console.log('[TabBar][allowed] furniture/admin_furniture role ->', furnitureTabs); return furnitureTabs; } @@ -517,7 +533,7 @@ Component({ if (isAdmin) { const all = this.data.allTabs .map((t) => t.key) - .filter((key) => !meetingTabKeys.includes(key) && !['furniture_reception', 'common_begin_reception', 'furniture_customer', 'furniture_top_sales', 'reception', 'customer', ...removedTabKeys].includes(key)); + .filter((key) => !meetingTabKeys.includes(key) && !['furniture_reception', 'common_begin_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'furniture_top_sales', 'reception', 'customer', ...removedTabKeys].includes(key)); console.log('[TabBar][allowed] admin ->', all); return all; } @@ -536,7 +552,7 @@ Component({ const otherTabs = this.data.allTabs .map((t) => t.key) - .filter((key) => !['homework', 'edu', 'voice', 'expression', 'furniture_reception', 'common_begin_reception', 'furniture_customer', 'furniture_top_sales', 'reception', 'customer', ...meetingTabKeys, ...removedTabKeys].includes(key)); + .filter((key) => !['homework', 'edu', 'voice', 'expression', 'furniture_reception', 'common_begin_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'furniture_top_sales', 'reception', 'customer', ...meetingTabKeys, ...removedTabKeys].includes(key)); if (!otherTabs.includes('ucenter')) { otherTabs.push('ucenter'); } diff --git a/custom-tab-bar/index.vue b/custom-tab-bar/index.vue index 7d8ea51..86546e4 100644 --- a/custom-tab-bar/index.vue +++ b/custom-tab-bar/index.vue @@ -77,6 +77,13 @@ export default { iconPath: '/static/tabbar/me.png', selectedIconPath: '/static/tabbar/me_active.png', }, + { + key: 'ai_qa', + text: 'AI问答', + pagePath: '/pages/ai_qa/ai_qa', + iconPath: '/static/tabbar/expression.png', + selectedIconPath: '/static/tabbar/expression_active.png', + }, { key: 'ai_analysis', text: 'AI分析', @@ -112,10 +119,17 @@ export default { iconPath: '/static/tabbar/customer.png', selectedIconPath: '/static/tabbar/customer_active.png', }, + { + key: 'ai_qa', + text: 'AI问答', + pagePath: 'pages/ai_qa/ai_qa', + iconPath: '/static/tabbar/expression.png', + selectedIconPath: '/static/tabbar/expression_active.png', + }, { key: 'ai_analysis', text: 'AI分析', - pagePath: 'pages/ai_analysis/ai_analysis', // 移除开头的/ + pagePath: 'pages/ai_analysis/ai_analysis', iconPath: '/static/tabbar/ai_analysis.png', selectedIconPath: '/static/tabbar/ai_analysis_active.png', }, @@ -134,7 +148,7 @@ export default { console.log('VISIBLE TABS CALC - THIS MUST SHOW IN H5'); // 简化逻辑:直接返回家具相关的tabs,跳过权限检查 - const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter']; + const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter']; const result = furnitureKeys.map(key => { return this.allTabs.find(tab => tab.key === key); }).filter(Boolean); @@ -289,15 +303,15 @@ export default { console.log('GET ALLOWED KEYS - 简化版本,总是返回家具相关tabs'); // 简化逻辑:总是返回家具相关的tabs - const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter']; + const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter']; console.log('[TabBar][allowed] 简化逻辑 ->', furnitureTabs); return furnitureTabs; }, // #ifdef H5 toggleNativeTabs() { // H5 平台自定义 tabbar 不生效,直接根据角色显隐原生 tabbar 项 - // 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、AI分析、我的、团队、总结和统计、家具接待、开始接待、家具客户 - const ORDER = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception']; + // 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、AI问答、AI分析、我的、团队、总结和统计… + const ORDER = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception']; const allowed = this.getAllowedKeys(); // 限制重试次数,防止渲染时机未就绪 this._h5TabRetries = (this._h5TabRetries || 0) + 1; @@ -328,6 +342,7 @@ export default { const tabBarList = [ 'pages/furniture_reception/furniture_reception', 'pages/furniture_customer/furniture_customer', + 'pages/ai_qa/ai_qa', 'pages/ai_analysis/ai_analysis', 'pages/ucenter/ucenter' ]; @@ -369,6 +384,7 @@ export default { el.textContent && ( el.textContent.includes('接待') || el.textContent.includes('客户') || + el.textContent.includes('AI问答') || el.textContent.includes('AI分析') || el.textContent.includes('我的') ) @@ -406,9 +422,9 @@ export default { return; } - // 按文本内容排序:接待、客户、AI分析、我的 + // 按文本内容排序:接待、客户、AI问答、AI分析、我的 const sortedElements = tabElements.sort((a, b) => { - const order = ['接待', '客户', 'AI分析', '我的']; + const order = ['接待', '客户', 'AI问答', 'AI分析', '我的']; const aIndex = order.findIndex(text => a.textContent.includes(text)); const bIndex = order.findIndex(text => b.textContent.includes(text)); return aIndex - bIndex; @@ -418,7 +434,7 @@ export default { // 处理每个元素 sortedElements.forEach((element, index) => { - const keyMap = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter']; + const keyMap = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter']; const key = keyMap[index]; const shouldShow = allowed.includes(key); diff --git a/pages-subpackage/ai_qa/after_sales_qa/after_sales_qa.vue b/pages-subpackage/ai_qa/after_sales_qa/after_sales_qa.vue new file mode 100644 index 0000000..fa14d5a --- /dev/null +++ b/pages-subpackage/ai_qa/after_sales_qa/after_sales_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/competitor_qa/competitor_qa.vue b/pages-subpackage/ai_qa/competitor_qa/competitor_qa.vue new file mode 100644 index 0000000..221e32c --- /dev/null +++ b/pages-subpackage/ai_qa/competitor_qa/competitor_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/decision_qa/decision_qa.vue b/pages-subpackage/ai_qa/decision_qa/decision_qa.vue new file mode 100644 index 0000000..2945d50 --- /dev/null +++ b/pages-subpackage/ai_qa/decision_qa/decision_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/demand_qa/demand_qa.vue b/pages-subpackage/ai_qa/demand_qa/demand_qa.vue new file mode 100644 index 0000000..cbb82cd --- /dev/null +++ b/pages-subpackage/ai_qa/demand_qa/demand_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/general_qa/general_qa.vue b/pages-subpackage/ai_qa/general_qa/general_qa.vue new file mode 100644 index 0000000..d29bcc2 --- /dev/null +++ b/pages-subpackage/ai_qa/general_qa/general_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/objection_qa/objection_qa.vue b/pages-subpackage/ai_qa/objection_qa/objection_qa.vue new file mode 100644 index 0000000..5deabd8 --- /dev/null +++ b/pages-subpackage/ai_qa/objection_qa/objection_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/price_qa/price_qa.vue b/pages-subpackage/ai_qa/price_qa/price_qa.vue new file mode 100644 index 0000000..d1d9b3c --- /dev/null +++ b/pages-subpackage/ai_qa/price_qa/price_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/sharp_qa/sharp_qa.vue b/pages-subpackage/ai_qa/sharp_qa/sharp_qa.vue new file mode 100644 index 0000000..0ffad36 --- /dev/null +++ b/pages-subpackage/ai_qa/sharp_qa/sharp_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages-subpackage/ai_qa/trust_qa/trust_qa.vue b/pages-subpackage/ai_qa/trust_qa/trust_qa.vue new file mode 100644 index 0000000..8929b04 --- /dev/null +++ b/pages-subpackage/ai_qa/trust_qa/trust_qa.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages.json b/pages.json index ba7d89f..f15871a 100644 --- a/pages.json +++ b/pages.json @@ -39,6 +39,12 @@ "QualityCoveragePopup": "pages-subpackage/ai_features/quality_coverage/quality-coverage-popup" } }, + { + "path": "pages/ai_qa/ai_qa", + "style": { + "navigationStyle": "custom" + } + }, // #ifdef APP { "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", @@ -301,6 +307,60 @@ "style": { "navigationStyle": "custom" } + }, + { + "path": "ai_qa/general_qa/general_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/demand_qa/demand_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/price_qa/price_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/trust_qa/trust_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/decision_qa/decision_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/competitor_qa/competitor_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/objection_qa/objection_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/sharp_qa/sharp_qa", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "ai_qa/after_sales_qa/after_sales_qa", + "style": { + "navigationStyle": "custom" + } } // #ifdef APP , @@ -373,6 +433,12 @@ "selectedIconPath": "static/tabbar/customer_active.png", "text": "客户" }, + { + "pagePath": "pages/ai_qa/ai_qa", + "iconPath": "static/tabbar/expression.png", + "selectedIconPath": "static/tabbar/expression_active.png", + "text": "AI问答" + }, { "pagePath": "pages/ai_analysis/ai_analysis", "iconPath": "static/tabbar/ai_analysis.png", diff --git a/pages/ai_qa/ai_qa.vue b/pages/ai_qa/ai_qa.vue new file mode 100644 index 0000000..bcf5b65 --- /dev/null +++ b/pages/ai_qa/ai_qa.vue @@ -0,0 +1,380 @@ + + + + + diff --git a/pages/furniture_customer/furniture_customer.vue b/pages/furniture_customer/furniture_customer.vue index 37367a8..f85b879 100644 --- a/pages/furniture_customer/furniture_customer.vue +++ b/pages/furniture_customer/furniture_customer.vue @@ -2493,7 +2493,8 @@ this.urlPathMap = { 'pages/furniture_customer/furniture_customer': '/customer', 'pages/furniture_reception/furniture_reception': '/reception', - 'pages/furniture_top_sales/furniture_top_sales': '/top-sales', + 'pages/ai_qa/ai_qa': '/ai-qa', + 'pages/ai_analysis/ai_analysis': '/ai-analysis', 'pages/ucenter/ucenter': '/profile' }; diff --git a/pages/furniture_reception/furniture_reception.vue b/pages/furniture_reception/furniture_reception.vue index db4e69e..d17f1e9 100644 --- a/pages/furniture_reception/furniture_reception.vue +++ b/pages/furniture_reception/furniture_reception.vue @@ -985,7 +985,8 @@ import ServiceListFurniture from "./serviceListFurniture.vue"; this.urlPathMap = { 'pages/furniture_customer/furniture_customer': '/customer', 'pages/furniture_reception/furniture_reception': '/reception', - 'pages/furniture_top_sales/furniture_top_sales': '/top-sales', + 'pages/ai_qa/ai_qa': '/ai-qa', + 'pages/ai_analysis/ai_analysis': '/ai-analysis', 'pages/ucenter/ucenter': '/profile' }; diff --git a/pages/ucenter/ucenter.vue b/pages/ucenter/ucenter.vue index a8262af..383894e 100644 --- a/pages/ucenter/ucenter.vue +++ b/pages/ucenter/ucenter.vue @@ -375,7 +375,7 @@ this[item.event](); } else if (item.to) { // 如果是 tabBar 页面,使用 switchTab - const tabBarPages = ['/pages/furniture_reception/furniture_reception', '/pages/furniture_customer/furniture_customer', '/pages/furniture_top_sales/furniture_top_sales', '/pages/ucenter/ucenter'] + const tabBarPages = ['/pages/furniture_reception/furniture_reception', '/pages/furniture_customer/furniture_customer', '/pages/ai_qa/ai_qa', '/pages/ai_analysis/ai_analysis', '/pages/ucenter/ucenter'] if (tabBarPages.includes(item.to)) { uni.switchTab({ url: item.to @@ -700,7 +700,8 @@ this.urlPathMap = { 'pages/furniture_customer/furniture_customer': '/customer', 'pages/furniture_reception/furniture_reception': '/reception', - 'pages/furniture_top_sales/furniture_top_sales': '/top-sales', + 'pages/ai_qa/ai_qa': '/ai-qa', + 'pages/ai_analysis/ai_analysis': '/ai-analysis', 'pages/ucenter/ucenter': '/profile' };