解决主包体积太大
This commit is contained in:
1
App.vue
1
App.vue
@@ -197,6 +197,7 @@
|
||||
// 路径映射:将长路径映射为短路径
|
||||
this.urlPathMap = {
|
||||
'pages/furniture_customer/furniture_customer': '/customer',
|
||||
'pages-subpackage/furniture_customer/furniture_customer': '/customer',
|
||||
'pages/furniture_reception/furniture_reception': '/reception',
|
||||
'pages/ai_qa/ai_qa': '/ai-qa',
|
||||
'pages/ai_analysis/ai_analysis': '/ai-analysis',
|
||||
|
||||
@@ -57,7 +57,7 @@ Component({
|
||||
{
|
||||
key: 'furniture_customer',
|
||||
text: '客户',
|
||||
pagePath: 'pages/furniture_customer/furniture_customer',
|
||||
pagePath: 'pages-subpackage/furniture_customer/furniture_customer',
|
||||
iconPath: '/static/tabbar/customer.png',
|
||||
selectedIconPath: '/static/tabbar/customer_active.png',
|
||||
},
|
||||
@@ -282,7 +282,7 @@ Component({
|
||||
'meeting_summary': 'pages-subpackage/meeting_summary/meeting_summary',
|
||||
'furniture_reception': 'pages/furniture_reception/furniture_reception',
|
||||
'common_begin_reception': 'pages/furniture_reception/common_begin_reception',
|
||||
'furniture_customer': 'pages/furniture_customer/furniture_customer',
|
||||
'furniture_customer': 'pages-subpackage/furniture_customer/furniture_customer',
|
||||
'ai_analysis': 'pages/ai_analysis/ai_analysis',
|
||||
'furniture_top_sales': 'pages/furniture_top_sales/furniture_top_sales'
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
{
|
||||
key: 'furniture_customer',
|
||||
text: '客户',
|
||||
pagePath: 'pages/furniture_customer/furniture_customer',
|
||||
pagePath: 'pages-subpackage/furniture_customer/furniture_customer',
|
||||
iconPath: '/static/tabbar/customer.png',
|
||||
selectedIconPath: '/static/tabbar/customer_active.png',
|
||||
},
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
{
|
||||
key: 'furniture_customer',
|
||||
text: '客户',
|
||||
pagePath: 'pages/furniture_customer/furniture_customer', // 移除开头的/
|
||||
pagePath: 'pages-subpackage/furniture_customer/furniture_customer', // 移除开头的/
|
||||
iconPath: '/static/tabbar/customer.png',
|
||||
selectedIconPath: '/static/tabbar/customer_active.png',
|
||||
},
|
||||
@@ -327,7 +327,7 @@ export default {
|
||||
// 检查页面路径是否在原生tabBar配置中
|
||||
const tabBarList = [
|
||||
'pages/furniture_reception/furniture_reception',
|
||||
'pages/furniture_customer/furniture_customer',
|
||||
'pages-subpackage/furniture_customer/furniture_customer',
|
||||
'pages/ai_analysis/ai_analysis',
|
||||
'pages/ucenter/ucenter'
|
||||
];
|
||||
|
||||
3819
pages-subpackage/furniture_customer/furniture_customer.vue
Normal file
3819
pages-subpackage/furniture_customer/furniture_customer.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,7 @@
|
||||
// 判断是 tabBar 页面还是普通页面
|
||||
const tabBarPages = [
|
||||
'/pages/furniture_reception/furniture_reception',
|
||||
'/pages/furniture_customer/furniture_customer',
|
||||
'/pages-subpackage/furniture_customer/furniture_customer',
|
||||
'/pages/furniture_top_sales/furniture_top_sales',
|
||||
'/pages/ucenter/ucenter'
|
||||
];
|
||||
|
||||
32
pages.json
32
pages.json
@@ -1,5 +1,11 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/workbench/workbench",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/furniture_reception/furniture_reception",
|
||||
"style": {
|
||||
@@ -24,12 +30,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/furniture_customer/furniture_customer",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/ai_analysis/ai_analysis",
|
||||
"style": {
|
||||
@@ -244,6 +244,12 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "furniture_customer/furniture_customer",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "bluetooth-recorder/bluetooth-recorder",
|
||||
"style": {
|
||||
@@ -440,12 +446,6 @@
|
||||
"selectedIconPath": "static/tabbar/reception_active.png",
|
||||
"text": "接待"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/furniture_customer/furniture_customer",
|
||||
"iconPath": "static/tabbar/customer.png",
|
||||
"selectedIconPath": "static/tabbar/customer_active.png",
|
||||
"text": "客户"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/ai_analysis/ai_analysis",
|
||||
"iconPath": "static/tabbar/ai_analysis.png",
|
||||
@@ -453,10 +453,10 @@
|
||||
"text": "AI分析"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/xixi/xixi",
|
||||
"iconPath": "static/tabbar/insight.png",
|
||||
"selectedIconPath": "static/tabbar/insight_active.png",
|
||||
"text": "喜喜"
|
||||
"pagePath": "pages/workbench/workbench",
|
||||
"iconPath": "static/tabbar/team.svg",
|
||||
"selectedIconPath": "static/tabbar/team_active.svg",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/ucenter/ucenter",
|
||||
|
||||
@@ -2497,6 +2497,7 @@
|
||||
// 路径映射
|
||||
this.urlPathMap = {
|
||||
'pages/furniture_customer/furniture_customer': '/customer',
|
||||
'pages-subpackage/furniture_customer/furniture_customer': '/customer',
|
||||
'pages/furniture_reception/furniture_reception': '/reception',
|
||||
'pages/ai_qa/ai_qa': '/ai-qa',
|
||||
'pages/ai_analysis/ai_analysis': '/ai-analysis',
|
||||
|
||||
@@ -984,6 +984,7 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
|
||||
// 路径映射
|
||||
this.urlPathMap = {
|
||||
'pages/furniture_customer/furniture_customer': '/customer',
|
||||
'pages-subpackage/furniture_customer/furniture_customer': '/customer',
|
||||
'pages/furniture_reception/furniture_reception': '/reception',
|
||||
'pages/ai_qa/ai_qa': '/ai-qa',
|
||||
'pages/ai_analysis/ai_analysis': '/ai-analysis',
|
||||
|
||||
@@ -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/ai_analysis/ai_analysis', '/pages/xixi/xixi', '/pages/ucenter/ucenter']
|
||||
const tabBarPages = ['/pages/furniture_reception/furniture_reception', '/pages-subpackage/furniture_customer/furniture_customer', '/pages/ai_analysis/ai_analysis', '/pages/xixi/xixi', '/pages/ucenter/ucenter']
|
||||
if (tabBarPages.includes(item.to)) {
|
||||
uni.switchTab({
|
||||
url: item.to
|
||||
@@ -694,6 +694,7 @@
|
||||
// 路径映射
|
||||
this.urlPathMap = {
|
||||
'pages/furniture_customer/furniture_customer': '/customer',
|
||||
'pages-subpackage/furniture_customer/furniture_customer': '/customer',
|
||||
'pages/furniture_reception/furniture_reception': '/reception',
|
||||
'pages/ai_qa/ai_qa': '/ai-qa',
|
||||
'pages/ai_analysis/ai_analysis': '/ai-analysis',
|
||||
|
||||
249
pages/workbench/workbench.vue
Normal file
249
pages/workbench/workbench.vue
Normal file
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- #ifdef APP -->
|
||||
<statusBar></statusBar>
|
||||
<!-- #endif -->
|
||||
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
:border="false"
|
||||
title="工作台"
|
||||
color="#333"
|
||||
backgroundColor="#FFFFFF"
|
||||
/>
|
||||
|
||||
<view class="content">
|
||||
<scroll-view class="content-scroll" scroll-y="true" :style="{ top: contentTop, bottom: contentBottom }">
|
||||
<view class="category-section">
|
||||
<view class="category-header">
|
||||
<text class="category-icon">🧭</text>
|
||||
<text class="category-title">快捷入口</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="goTo('/pages/furniture_reception/furniture_reception')">
|
||||
<view class="function-icon">🤝</view>
|
||||
<text class="function-name">接待</text>
|
||||
<text class="function-desc">快速进入接待流程</text>
|
||||
</view>
|
||||
<view class="function-item" @click="goTo('/pages-subpackage/furniture_customer/furniture_customer')">
|
||||
<view class="function-icon">👥</view>
|
||||
<text class="function-name">客户</text>
|
||||
<text class="function-desc">查看与管理客户信息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="category-section">
|
||||
<view class="category-header">
|
||||
<text class="category-icon">🏷️</text>
|
||||
<text class="category-title">接待页面标签</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="openReceptionTab('status')">
|
||||
<view class="function-icon">📌</view>
|
||||
<text class="function-name">服务状态</text>
|
||||
<text class="function-desc">进入接待页并切到服务状态</text>
|
||||
</view>
|
||||
<view class="function-item" @click="openReceptionTab('reception')">
|
||||
<view class="function-icon">🛎️</view>
|
||||
<text class="function-name">开始接待</text>
|
||||
<text class="function-desc">进入接待页并切到开始接待</text>
|
||||
</view>
|
||||
<view class="function-item" @click="openReceptionTab('tag')">
|
||||
<view class="function-icon">🗂️</view>
|
||||
<text class="function-name">标签管理</text>
|
||||
<text class="function-desc">进入接待页并切到标签管理</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="category-section">
|
||||
<view class="category-header">
|
||||
<text class="category-icon">👤</text>
|
||||
<text class="category-title">客户页面标签</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="openCustomerTab('service')">
|
||||
<view class="function-icon">📝</view>
|
||||
<text class="function-name">服务记录</text>
|
||||
<text class="function-desc">进入客户页并切到服务记录</text>
|
||||
</view>
|
||||
<view class="function-item" @click="openCustomerTab('customer')">
|
||||
<view class="function-icon">👥</view>
|
||||
<text class="function-name">客户</text>
|
||||
<text class="function-desc">进入客户页并切到客户列表</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP
|
||||
import statusBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar';
|
||||
// #endif
|
||||
|
||||
function getSystemInfo() {
|
||||
try {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
return {
|
||||
statusBarHeight: systemInfo.statusBarHeight || 20,
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
components: {
|
||||
// #ifdef APP
|
||||
statusBar,
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
const systemInfo = getSystemInfo();
|
||||
const totalNavbarHeight = systemInfo.statusBarHeight * 2 + 44 * 2;
|
||||
return {
|
||||
contentTop: totalNavbarHeight + 'rpx',
|
||||
contentBottom: '96rpx',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openReceptionTab(tab) {
|
||||
this.switchTabWithQuery('/pages/furniture_reception/furniture_reception', tab);
|
||||
},
|
||||
openCustomerTab(tab) {
|
||||
const url = `/pages-subpackage/furniture_customer/furniture_customer?tab=${tab}`;
|
||||
uni.navigateTo({ url });
|
||||
},
|
||||
switchTabWithQuery(basePath, tab) {
|
||||
if (basePath === '/pages/furniture_reception/furniture_reception') {
|
||||
uni.setStorageSync('workbench-reception-tab', tab);
|
||||
}
|
||||
uni.switchTab({
|
||||
url: basePath,
|
||||
fail: () => {
|
||||
const fallbackUrl = `${basePath}?tab=${tab}`;
|
||||
uni.navigateTo({ url: fallbackUrl });
|
||||
},
|
||||
});
|
||||
},
|
||||
goTo(path) {
|
||||
if (!path) return;
|
||||
const tabBarPaths = [
|
||||
'/pages/furniture_reception/furniture_reception',
|
||||
'/pages/ai_analysis/ai_analysis',
|
||||
'/pages/workbench/workbench',
|
||||
'/pages/ucenter/ucenter',
|
||||
];
|
||||
if (tabBarPaths.includes(path)) {
|
||||
uni.switchTab({ url: path });
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({ url: path });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.content-scroll {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.category-section {
|
||||
margin: 20rpx 30rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.category-section:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.category-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
background: #ffffff;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
font-size: 32rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.category-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.function-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.function-item {
|
||||
flex: 1;
|
||||
min-width: 42%;
|
||||
background: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
padding: 24rpx 16rpx;
|
||||
margin: 0 5rpx 10rpx;
|
||||
text-align: center;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.04);
|
||||
border: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.function-item:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.function-icon {
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.function-name {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.function-desc {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user