增加a分析若干功能页面。
This commit is contained in:
@@ -77,6 +77,13 @@ export default {
|
||||
iconPath: '/static/tabbar/me.png',
|
||||
selectedIconPath: '/static/tabbar/me_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: 'meeting_summary',
|
||||
text: '总结和统计',
|
||||
@@ -105,6 +112,13 @@ export default {
|
||||
iconPath: '/static/tabbar/customer.png',
|
||||
selectedIconPath: '/static/tabbar/customer_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: 'ucenter',
|
||||
text: '我的',
|
||||
@@ -120,7 +134,7 @@ export default {
|
||||
console.log('VISIBLE TABS CALC - THIS MUST SHOW IN H5');
|
||||
|
||||
// 简化逻辑:直接返回家具相关的tabs,跳过权限检查
|
||||
const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ucenter'];
|
||||
const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||
const result = furnitureKeys.map(key => {
|
||||
return this.allTabs.find(tab => tab.key === key);
|
||||
}).filter(Boolean);
|
||||
@@ -275,15 +289,15 @@ export default {
|
||||
console.log('GET ALLOWED KEYS - 简化版本,总是返回家具相关tabs');
|
||||
|
||||
// 简化逻辑:总是返回家具相关的tabs
|
||||
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ucenter'];
|
||||
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||
console.log('[TabBar][allowed] 简化逻辑 ->', furnitureTabs);
|
||||
return furnitureTabs;
|
||||
},
|
||||
// #ifdef H5
|
||||
toggleNativeTabs() {
|
||||
// H5 平台自定义 tabbar 不生效,直接根据角色显隐原生 tabbar 项
|
||||
// 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、团队、总结和统计、家具接待、开始接待、家具客户、我的
|
||||
const ORDER = ['furniture_reception', 'furniture_customer', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception'];
|
||||
// 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、AI分析、我的、团队、总结和统计、家具接待、开始接待、家具客户
|
||||
const ORDER = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception'];
|
||||
const allowed = this.getAllowedKeys();
|
||||
// 限制重试次数,防止渲染时机未就绪
|
||||
this._h5TabRetries = (this._h5TabRetries || 0) + 1;
|
||||
@@ -314,6 +328,7 @@ export default {
|
||||
const tabBarList = [
|
||||
'pages/furniture_reception/furniture_reception',
|
||||
'pages/furniture_customer/furniture_customer',
|
||||
'pages/ai_analysis/ai_analysis',
|
||||
'pages/ucenter/ucenter'
|
||||
];
|
||||
const normalizedPath = pagePath.startsWith('/') ? pagePath.substring(1) : pagePath;
|
||||
@@ -354,6 +369,7 @@ export default {
|
||||
el.textContent && (
|
||||
el.textContent.includes('接待') ||
|
||||
el.textContent.includes('客户') ||
|
||||
el.textContent.includes('AI分析') ||
|
||||
el.textContent.includes('我的')
|
||||
)
|
||||
);
|
||||
@@ -390,9 +406,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// 按文本内容排序:接待、客户、我的
|
||||
// 按文本内容排序:接待、客户、AI分析、我的
|
||||
const sortedElements = tabElements.sort((a, b) => {
|
||||
const order = ['接待', '客户', '我的'];
|
||||
const order = ['接待', '客户', 'AI分析', '我的'];
|
||||
const aIndex = order.findIndex(text => a.textContent.includes(text));
|
||||
const bIndex = order.findIndex(text => b.textContent.includes(text));
|
||||
return aIndex - bIndex;
|
||||
@@ -402,7 +418,7 @@ export default {
|
||||
|
||||
// 处理每个元素
|
||||
sortedElements.forEach((element, index) => {
|
||||
const keyMap = ['furniture_reception', 'furniture_customer', 'ucenter'];
|
||||
const keyMap = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||
const key = keyMap[index];
|
||||
const shouldShow = allowed.includes(key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user