fix(mpuniapp): 修复 pages.json 遗漏工作台路由导致白屏的问题,并对齐 uts 强类型语法标准
这个提交包含在:
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/owner/workplace/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "销售工作台",
|
||||
"backgroundColorContent": "#F7F8FA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/owner/card/index",
|
||||
"style": {
|
||||
@@ -164,6 +171,12 @@
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderStyle": "white",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/owner/workplace/index",
|
||||
"iconPath": "static/tab-workplace.png",
|
||||
"selectedIconPath": "static/tab-workplace-active.png",
|
||||
"text": "工作台"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/owner/card/index",
|
||||
"iconPath": "static/tab-card.png",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<view class="meta-header">
|
||||
<text class="meta-title">{{ activeCardTitle }}</text>
|
||||
<text class="meta-preview-btn" @click="handlePreviewPortal">
|
||||
{{ t('workplace.view_portal') }} ↗
|
||||
{{ t('workplace.view_portal') }} >
|
||||
</text>
|
||||
</view>
|
||||
<text class="meta-company">{{ activeCardCompany }}</text>
|
||||
@@ -98,7 +98,7 @@
|
||||
<view class="radar-pulse-section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">{{ t('workplace.radar_pulse_title') }}</text>
|
||||
<text class="section-action" @click="handleOpenRadar">{{ t('workplace.leads_view_all') }} ↗</text>
|
||||
<text class="section-action" @click="handleOpenRadar">{{ t('workplace.leads_view_all') }} ></text>
|
||||
</view>
|
||||
<view class="pulse-card" v-if="state.hotRadarItem != null" @click="handleOpenRadar">
|
||||
<view class="pulse-header">
|
||||
@@ -126,7 +126,7 @@
|
||||
<view class="leads-todo-section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">{{ t('workplace.leads_todo_title') }}</text>
|
||||
<text class="section-action" @click="handleOpenLeads">{{ t('workplace.leads_view_all') }} ↗</text>
|
||||
<text class="section-action" @click="handleOpenLeads">{{ t('workplace.leads_view_all') }} ></text>
|
||||
</view>
|
||||
<view class="leads-flow">
|
||||
<view
|
||||
@@ -160,7 +160,7 @@
|
||||
<view class="workplace-spacer"></view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部常驻单悬浮主 CTA 栏 -->
|
||||
<!-- 底部常驻单悬浮主 CTA 栏 (一屏仅1个主按钮) -->
|
||||
<view class="workplace-cta-bar">
|
||||
<view class="cta-inner">
|
||||
<button class="primary-cta-btn" @click="handleOpenQrcode">
|
||||
@@ -172,8 +172,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { computed, onMounted, reactive } from 'vue';
|
||||
import { getCurrentLocale, isRtl } from '../../../common/locale.uts';
|
||||
import { utsLightColors } from '../../../common/tokens.uts';
|
||||
import {
|
||||
createWorkplaceState,
|
||||
loadWorkplaceData,
|
||||
@@ -187,12 +187,20 @@ import {
|
||||
WorkplaceState,
|
||||
} from './useWorkplace.uts';
|
||||
|
||||
const state = reactive<WorkplaceState>(createWorkplaceState());
|
||||
const state = reactive(createWorkplaceState());
|
||||
|
||||
const currentLang = computed((): string => getCurrentLocale());
|
||||
const pageRtlClass = computed((): string => (isRtl(currentLang.value) ? 'rtl-layout' : 'ltr-layout'));
|
||||
const pageTheme = computed((): string => {
|
||||
return '--primary:#0B5CFF;--bg:#F5F8FC;--surface:#FFFFFF;--text:#101828;--text2:#64748B;--border:#E3E7ED;--primary-soft:#EBF5FF;';
|
||||
const pageTheme = computed((): Record<string, string> => {
|
||||
return {
|
||||
'--primary': utsLightColors.primary,
|
||||
'--bg': utsLightColors.bg,
|
||||
'--surface': utsLightColors.surface,
|
||||
'--text': utsLightColors.text,
|
||||
'--text2': utsLightColors.text2,
|
||||
'--border': utsLightColors.border,
|
||||
'--primary-soft': utsLightColors.primarySoft,
|
||||
};
|
||||
});
|
||||
|
||||
function t(key: string): string {
|
||||
@@ -766,7 +774,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.workplace-spacer {
|
||||
height: calc(88px + env(safe-area-inset-bottom) + var(--window-bottom, 50px));
|
||||
height: calc(88px + var(--window-bottom, 0px) + env(safe-area-inset-bottom, 0px));
|
||||
}
|
||||
|
||||
/* 底部常驻悬浮主 CTA 栏 (一屏仅1个主按钮) */
|
||||
@@ -776,7 +784,7 @@ onMounted(() => {
|
||||
right: 0;
|
||||
bottom: var(--window-bottom, 0px);
|
||||
padding: 12px 16px;
|
||||
padding-bottom: calc(12px + env(safe-area-inset-bottom));
|
||||
padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(8px);
|
||||
border-top: 1px solid var(--border, #E3E7ED);
|
||||
|
||||
在新工单中引用
屏蔽一个用户