去掉底部导航:ai对话
This commit is contained in:
@@ -61,13 +61,6 @@ Component({
|
|||||||
iconPath: '/static/tabbar/customer.png',
|
iconPath: '/static/tabbar/customer.png',
|
||||||
selectedIconPath: '/static/tabbar/customer_active.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',
|
key: 'ai_analysis',
|
||||||
text: 'AI分析',
|
text: 'AI分析',
|
||||||
@@ -290,7 +283,6 @@ Component({
|
|||||||
'furniture_reception': 'pages/furniture_reception/furniture_reception',
|
'furniture_reception': 'pages/furniture_reception/furniture_reception',
|
||||||
'common_begin_reception': 'pages/furniture_reception/common_begin_reception',
|
'common_begin_reception': 'pages/furniture_reception/common_begin_reception',
|
||||||
'furniture_customer': 'pages/furniture_customer/furniture_customer',
|
'furniture_customer': 'pages/furniture_customer/furniture_customer',
|
||||||
'ai_qa': 'pages/ai_qa/ai_qa',
|
|
||||||
'ai_analysis': 'pages/ai_analysis/ai_analysis',
|
'ai_analysis': 'pages/ai_analysis/ai_analysis',
|
||||||
'furniture_top_sales': 'pages/furniture_top_sales/furniture_top_sales'
|
'furniture_top_sales': 'pages/furniture_top_sales/furniture_top_sales'
|
||||||
};
|
};
|
||||||
@@ -519,7 +511,7 @@ Component({
|
|||||||
const hasFurnitureRole = roles.includes('furniture');
|
const hasFurnitureRole = roles.includes('furniture');
|
||||||
|
|
||||||
if (isAdminFurniture || hasFurnitureRole) {
|
if (isAdminFurniture || hasFurnitureRole) {
|
||||||
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter'];
|
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||||
console.log('[TabBar][allowed] furniture/admin_furniture role ->', furnitureTabs);
|
console.log('[TabBar][allowed] furniture/admin_furniture role ->', furnitureTabs);
|
||||||
return furnitureTabs;
|
return furnitureTabs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,13 +77,6 @@ export default {
|
|||||||
iconPath: '/static/tabbar/me.png',
|
iconPath: '/static/tabbar/me.png',
|
||||||
selectedIconPath: '/static/tabbar/me_active.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',
|
key: 'ai_analysis',
|
||||||
text: 'AI分析',
|
text: 'AI分析',
|
||||||
@@ -119,13 +112,6 @@ export default {
|
|||||||
iconPath: '/static/tabbar/customer.png',
|
iconPath: '/static/tabbar/customer.png',
|
||||||
selectedIconPath: '/static/tabbar/customer_active.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',
|
key: 'ai_analysis',
|
||||||
text: 'AI分析',
|
text: 'AI分析',
|
||||||
@@ -148,7 +134,7 @@ export default {
|
|||||||
console.log('VISIBLE TABS CALC - THIS MUST SHOW IN H5');
|
console.log('VISIBLE TABS CALC - THIS MUST SHOW IN H5');
|
||||||
|
|
||||||
// 简化逻辑:直接返回家具相关的tabs,跳过权限检查
|
// 简化逻辑:直接返回家具相关的tabs,跳过权限检查
|
||||||
const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter'];
|
const furnitureKeys = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||||
const result = furnitureKeys.map(key => {
|
const result = furnitureKeys.map(key => {
|
||||||
return this.allTabs.find(tab => tab.key === key);
|
return this.allTabs.find(tab => tab.key === key);
|
||||||
}).filter(Boolean);
|
}).filter(Boolean);
|
||||||
@@ -303,15 +289,15 @@ export default {
|
|||||||
console.log('GET ALLOWED KEYS - 简化版本,总是返回家具相关tabs');
|
console.log('GET ALLOWED KEYS - 简化版本,总是返回家具相关tabs');
|
||||||
|
|
||||||
// 简化逻辑:总是返回家具相关的tabs
|
// 简化逻辑:总是返回家具相关的tabs
|
||||||
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter'];
|
const furnitureTabs = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||||
console.log('[TabBar][allowed] 简化逻辑 ->', furnitureTabs);
|
console.log('[TabBar][allowed] 简化逻辑 ->', furnitureTabs);
|
||||||
return furnitureTabs;
|
return furnitureTabs;
|
||||||
},
|
},
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
toggleNativeTabs() {
|
toggleNativeTabs() {
|
||||||
// H5 平台自定义 tabbar 不生效,直接根据角色显隐原生 tabbar 项
|
// H5 平台自定义 tabbar 不生效,直接根据角色显隐原生 tabbar 项
|
||||||
// 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、AI问答、AI分析、我的、团队、总结和统计…
|
// 当前位置顺序(根据 pages.json 中的 tabBar.list 顺序):接待、客户、AI分析、我的、团队、总结和统计…
|
||||||
const ORDER = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception'];
|
const ORDER = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter', 'reception', 'customer', 'team', 'meeting_summary', 'common_begin_reception'];
|
||||||
const allowed = this.getAllowedKeys();
|
const allowed = this.getAllowedKeys();
|
||||||
// 限制重试次数,防止渲染时机未就绪
|
// 限制重试次数,防止渲染时机未就绪
|
||||||
this._h5TabRetries = (this._h5TabRetries || 0) + 1;
|
this._h5TabRetries = (this._h5TabRetries || 0) + 1;
|
||||||
@@ -342,7 +328,6 @@ export default {
|
|||||||
const tabBarList = [
|
const tabBarList = [
|
||||||
'pages/furniture_reception/furniture_reception',
|
'pages/furniture_reception/furniture_reception',
|
||||||
'pages/furniture_customer/furniture_customer',
|
'pages/furniture_customer/furniture_customer',
|
||||||
'pages/ai_qa/ai_qa',
|
|
||||||
'pages/ai_analysis/ai_analysis',
|
'pages/ai_analysis/ai_analysis',
|
||||||
'pages/ucenter/ucenter'
|
'pages/ucenter/ucenter'
|
||||||
];
|
];
|
||||||
@@ -384,7 +369,6 @@ export default {
|
|||||||
el.textContent && (
|
el.textContent && (
|
||||||
el.textContent.includes('接待') ||
|
el.textContent.includes('接待') ||
|
||||||
el.textContent.includes('客户') ||
|
el.textContent.includes('客户') ||
|
||||||
el.textContent.includes('AI问答') ||
|
|
||||||
el.textContent.includes('AI分析') ||
|
el.textContent.includes('AI分析') ||
|
||||||
el.textContent.includes('我的')
|
el.textContent.includes('我的')
|
||||||
)
|
)
|
||||||
@@ -422,9 +406,9 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 按文本内容排序:接待、客户、AI问答、AI分析、我的
|
// 按文本内容排序:接待、客户、AI分析、我的
|
||||||
const sortedElements = tabElements.sort((a, b) => {
|
const sortedElements = tabElements.sort((a, b) => {
|
||||||
const order = ['接待', '客户', 'AI问答', 'AI分析', '我的'];
|
const order = ['接待', '客户', 'AI分析', '我的'];
|
||||||
const aIndex = order.findIndex(text => a.textContent.includes(text));
|
const aIndex = order.findIndex(text => a.textContent.includes(text));
|
||||||
const bIndex = order.findIndex(text => b.textContent.includes(text));
|
const bIndex = order.findIndex(text => b.textContent.includes(text));
|
||||||
return aIndex - bIndex;
|
return aIndex - bIndex;
|
||||||
@@ -434,7 +418,7 @@ export default {
|
|||||||
|
|
||||||
// 处理每个元素
|
// 处理每个元素
|
||||||
sortedElements.forEach((element, index) => {
|
sortedElements.forEach((element, index) => {
|
||||||
const keyMap = ['furniture_reception', 'furniture_customer', 'ai_qa', 'ai_analysis', 'ucenter'];
|
const keyMap = ['furniture_reception', 'furniture_customer', 'ai_analysis', 'ucenter'];
|
||||||
const key = keyMap[index];
|
const key = keyMap[index];
|
||||||
const shouldShow = allowed.includes(key);
|
const shouldShow = allowed.includes(key);
|
||||||
|
|
||||||
|
|||||||
@@ -433,12 +433,6 @@
|
|||||||
"selectedIconPath": "static/tabbar/customer_active.png",
|
"selectedIconPath": "static/tabbar/customer_active.png",
|
||||||
"text": "客户"
|
"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",
|
"pagePath": "pages/ai_analysis/ai_analysis",
|
||||||
"iconPath": "static/tabbar/ai_analysis.png",
|
"iconPath": "static/tabbar/ai_analysis.png",
|
||||||
|
|||||||
@@ -2432,23 +2432,28 @@
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
// 格式化时间:将 ISO 格式转换为 YYYY-MM-DD HH:mm:ss
|
// 录音开始时间:优先后端专用字段,兼容多种命名,最后退回创建时间
|
||||||
|
const recordingStartRaw =
|
||||||
|
item.startTime ||
|
||||||
|
item.createTime;
|
||||||
let formattedTime = '';
|
let formattedTime = '';
|
||||||
if (item.createTime) {
|
if (recordingStartRaw) {
|
||||||
const date = new Date(item.createTime);
|
const date = new Date(recordingStartRaw);
|
||||||
const year = date.getFullYear();
|
if (!Number.isNaN(date.getTime())) {
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
const year = date.getFullYear();
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
const hours = String(date.getHours()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||||
|
formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
title: `${item.salesName || ''}的服务记录`,
|
title: `${item.salesName || ''}的服务记录`,
|
||||||
date: formattedTime ? `时间:${formattedTime}` : '',
|
date: formattedTime ? `开始时间:${formattedTime}` : '',
|
||||||
description: item.summary || '',
|
description: item.summary || '',
|
||||||
customerName: item.customerName || '',
|
customerName: item.customerName || '',
|
||||||
recordingName: item.recordingName || '', // 记录名称
|
recordingName: item.recordingName || '', // 记录名称
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ export default {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const formattedUpdateTime = this.formatDateTime(record.updateTime || record.createTime);
|
const formattedCreateTime = this.formatDateTime(record.createTime);
|
||||||
const tags = [];
|
const tags = [];
|
||||||
if (record.recordingName) {
|
if (record.recordingName) {
|
||||||
tags.push({ text: `录音:${record.recordingName}`, color: 'blue' });
|
tags.push({ text: `录音:${record.recordingName}`, color: 'blue' });
|
||||||
@@ -436,7 +436,7 @@ export default {
|
|||||||
recordingName: record.recordingName || '',
|
recordingName: record.recordingName || '',
|
||||||
remarks: record.remarks || '',
|
remarks: record.remarks || '',
|
||||||
tags,
|
tags,
|
||||||
durationText: formattedUpdateTime ? `最近更新时间:${formattedUpdateTime}` : '最近暂无更新时间'
|
durationText: formattedCreateTime ? `开始时间:${formattedCreateTime}` : '暂无开始时间'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
formatDateTime(value) {
|
formatDateTime(value) {
|
||||||
|
|||||||
@@ -375,7 +375,7 @@
|
|||||||
this[item.event]();
|
this[item.event]();
|
||||||
} else if (item.to) {
|
} else if (item.to) {
|
||||||
// 如果是 tabBar 页面,使用 switchTab
|
// 如果是 tabBar 页面,使用 switchTab
|
||||||
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']
|
const tabBarPages = ['/pages/furniture_reception/furniture_reception', '/pages/furniture_customer/furniture_customer', '/pages/ai_analysis/ai_analysis', '/pages/ucenter/ucenter']
|
||||||
if (tabBarPages.includes(item.to)) {
|
if (tabBarPages.includes(item.to)) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: item.to
|
url: item.to
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"hash": "4fc165e1",
|
"hash": "e6523039",
|
||||||
"configHash": "d56fac9b",
|
"configHash": "eb10526c",
|
||||||
"lockfileHash": "14a73d7a",
|
"lockfileHash": "14a73d7a",
|
||||||
"browserHash": "2199751e",
|
"browserHash": "894ba490",
|
||||||
"optimized": {},
|
"optimized": {},
|
||||||
"chunks": {}
|
"chunks": {}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user