微信小程序发布试用版本
This commit is contained in:
169
pages-subpackage/workspace/workspace.vue
Normal file
169
pages-subpackage/workspace/workspace.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- #ifdef APP -->
|
||||
<statusBar></statusBar>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 导航栏 -->
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
:border="false"
|
||||
title="工作台"
|
||||
color="#333"
|
||||
backgroundColor="#FFFFFF">
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="content">
|
||||
<view class="scene-grid">
|
||||
<view
|
||||
class="scene-card"
|
||||
v-for="scene in scenes"
|
||||
:key="scene.id"
|
||||
@click="navigateToScene(scene)">
|
||||
<view class="scene-icon">
|
||||
<uni-icons :type="scene.icon" size="40" :color="scene.color"></uni-icons>
|
||||
</view>
|
||||
<text class="scene-title">{{ scene.title }}</text>
|
||||
<text class="scene-desc">{{ scene.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
// #ifdef APP
|
||||
components: {
|
||||
statusBar
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
scenes: [
|
||||
{
|
||||
id: 'meeting',
|
||||
title: '会议场景',
|
||||
desc: '会议总结',
|
||||
icon: 'calendar',
|
||||
color: '#2A68FF',
|
||||
navItems: [
|
||||
{ title: '总结', path: '/pages/meeting_summary/meeting_summary' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'general_sales',
|
||||
title: '通用销售场景',
|
||||
desc: '通用销售场景功能',
|
||||
icon: 'grid',
|
||||
color: '#4ECDC4',
|
||||
navItems: [
|
||||
{ title: '销售准备', path: '/pages/general_sales/prepare/prepare' },
|
||||
{ title: '销售过程', path: '/pages/general_sales/process/process' },
|
||||
{ title: '销售总结', path: '/pages/general_sales/summary/summary' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'furniture_sales',
|
||||
title: '家具销售场景',
|
||||
desc: '家具销售场景功能',
|
||||
icon: 'list',
|
||||
color: '#FFA07A',
|
||||
navItems: [
|
||||
{ title: '销售准备', path: '/pages/furniture_sales/prepare/prepare' },
|
||||
{ title: '销售过程', path: '/pages/furniture_sales/process/process' },
|
||||
{ title: '销售总结', path: '/pages/furniture_sales/summary/summary' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'car_sales',
|
||||
title: '汽车销售场景',
|
||||
desc: '汽车销售场景功能',
|
||||
icon: 'settings',
|
||||
color: '#95E1D3',
|
||||
navItems: [
|
||||
{ title: '销售准备', path: '/pages/car_sales/prepare/prepare' },
|
||||
{ title: '销售过程', path: '/pages/car_sales/process/process' },
|
||||
{ title: '销售总结', path: '/pages/car_sales/summary/summary' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
navigateToScene(scene) {
|
||||
// 跳转到场景详情页面,传递场景信息
|
||||
uni.navigateTo({
|
||||
url: `/pages-subpackage/workspace/scene-detail?scene=${encodeURIComponent(JSON.stringify(scene))}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 44px;
|
||||
padding: 44px 16px 20px;
|
||||
}
|
||||
|
||||
.scene-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.scene-card {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
padding: 24px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.scene-card:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.scene-icon {
|
||||
margin-bottom: 12px;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(42, 104, 255, 0.05) 100%);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.scene-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scene-desc {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user