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