Commit 28721c93 by chenwq

Merge branch 'v1.0.0' of http://192.168.3.233:8090/app/sales-assist-mobile into v1.0.0

2 parents f3af23fd 3303c75c
...@@ -21,8 +21,11 @@ ...@@ -21,8 +21,11 @@
</view> </view>
</view> </view>
<!-- 宫格内容区 --> <!-- 宫格内容区 -->
<view v-if="modules.length > 0" class="intro-grid-body"> <scroll-view v-if="modules.length > 0"
<view class="intro-grid-container"> class="intro-grid-body"
scroll-y="true"
:show-scrollbar="false">
<view class="intro-grid-container" :style="gridStyleVars">
<view v-for="(item, index) in modules" <view v-for="(item, index) in modules"
:key="index" :key="index"
class="intro-grid-cell" class="intro-grid-cell"
...@@ -47,7 +50,7 @@ ...@@ -47,7 +50,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </scroll-view>
<!-- 空状态 --> <!-- 空状态 -->
<view v-else class="intro-grid-empty-wrap"> <view v-else class="intro-grid-empty-wrap">
<un-empty mode="data" :text="emptyDisplayText" /> <un-empty mode="data" :text="emptyDisplayText" />
...@@ -126,6 +129,28 @@ const emptyDisplayText = computed((): string => { ...@@ -126,6 +129,28 @@ const emptyDisplayText = computed((): string => {
return "暂无数据"; return "暂无数据";
}); });
/** 宫格列宽:默认 3 列,兼容字符串/数字入参 */
const gridStyleVars = computed((): UTSJSONObject => {
let cols = 3;
const raw = props.gridCol;
if (typeof raw === "number") {
cols = raw as number;
} else if (raw != null && `${raw}` !== "") {
const parsed = parseInt(`${raw}`);
if (!isNaN(parsed)) {
cols = parsed;
}
}
if (cols < 1) {
cols = 1;
} else if (cols > 5) {
cols = 5;
}
return {
"--intro-grid-col-width": `${100 / cols}%`
} as UTSJSONObject;
});
/** 头部标题:取第一个素材的名称 */ /** 头部标题:取第一个素材的名称 */
const heroTitle = computed((): string => { const heroTitle = computed((): string => {
const list = props.modules; const list = props.modules;
...@@ -237,20 +262,32 @@ function onSwitchProductClick(): void { ...@@ -237,20 +262,32 @@ function onSwitchProductClick(): void {
<style scoped lang="scss"> <style scoped lang="scss">
.intro-grid-custom-wrap { .intro-grid-custom-wrap {
width: 100%; width: 100%;
height: 100%;
min-height: 0;
position: relative; position: relative;
display: flex;
flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden;
} }
.intro-grid-custom-content { .intro-grid-custom-content {
width: 100%; width: 100%;
height: 100%;
min-height: 0;
border-radius: 0; border-radius: 0;
background: rgba(255, 255, 255, 0.86); background: rgba(255, 255, 255, 0.86);
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10); /* 极淡阴影:浅灰容器内的大模糊阴影会显得脏 */
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
display: flex;
flex-direction: column;
overflow: hidden;
} }
.intro-grid-head { .intro-grid-head {
width: 100%; width: 100%;
height: 40px; height: 40px;
flex-shrink: 0;
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -356,6 +393,8 @@ function onSwitchProductClick(): void { ...@@ -356,6 +393,8 @@ function onSwitchProductClick(): void {
/* 宫格内容区 */ /* 宫格内容区 */
.intro-grid-body { .intro-grid-body {
width: 100%; width: 100%;
flex: 1;
min-height: 0;
padding: 0 8px; padding: 0 8px;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -365,10 +404,12 @@ function onSwitchProductClick(): void { ...@@ -365,10 +404,12 @@ function onSwitchProductClick(): void {
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
padding-bottom: 4px;
box-sizing: border-box;
} }
.intro-grid-cell { .intro-grid-cell {
width: 33.33%; width: var(--intro-grid-col-width, 33.33%);
box-sizing: border-box; box-sizing: border-box;
padding: 4px; padding: 4px;
} }
......
...@@ -40,6 +40,13 @@ ...@@ -40,6 +40,13 @@
} }
}, },
{ {
"path": "pages/index/reception",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "客户接待"
}
},
{
"path": "pages/person/attendance", "path": "pages/person/attendance",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
......
<template> <template>
<view class="content-left"> <view class="content-left">
<list-view class="module-box" :show-scrollbar="false"> <view class="module-box">
<!-- ✅ 性能优化:骨架屏 + 异步加载 --> <!-- ✅ 性能优化:骨架屏 + 异步加载 -->
<list-item v-if="!logic.loadComplete.value"> <view v-if="!logic.loadComplete.value" class="module-item">
<view class="content-box">
<ProductIntroSkeleton /> <ProductIntroSkeleton />
</list-item> </view>
<list-item v-else> </view>
<view v-else class="module-item">
<view class="content-box">
<ProductIntroGrid <ProductIntroGrid
:modules="introModulesForHomeFrame" :modules="introModulesForHomeFrame"
eyebrow="展业素材" eyebrow="展业素材"
empty-title="暂无数据" empty-title="暂无数据"
:empty-text="boutiqueIntroEmptyText" :empty-text="boutiqueIntroEmptyText"
@item-tap="onIntroSlideTap" /> @item-tap="onIntroSlideTap" />
</list-item> </view>
</list-view> </view>
</view>
<view class="recent-list-wrapper"> <view class="recent-list-wrapper">
<RecentReceptionList /> <RecentReceptionList />
</view> </view>
...@@ -135,10 +139,18 @@ function closePackageDetail(): void { ...@@ -135,10 +139,18 @@ function closePackageDetail(): void {
flex-shrink: 0; flex-shrink: 0;
height: var(--module-box-height, 360px); height: var(--module-box-height, 360px);
width: 100%; width: 100%;
overflow: hidden;
}
.module-box .module-item {
width: 100%;
height: 100%;
} }
.module-box .content-box { .module-box .content-box {
width: 100%; width: 100%;
height: 100%;
min-height: 0;
} }
.recent-list-wrapper { .recent-list-wrapper {
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<view v-if="activeTab == idx" class="tab-active-line"></view> <view v-if="activeTab == idx" class="tab-active-line"></view>
</view> </view>
</view> </view>
<!-- 右侧内容区 -->
<scroll-view class="order-content" direction="vertical" >
<!-- 表单卡片 --> <!-- 表单卡片 -->
<view class="form-card"> <view class="form-card">
<!-- 施工单 --> <!-- 施工单 -->
...@@ -47,7 +48,10 @@ ...@@ -47,7 +48,10 @@
<view class="form-item"> <view class="form-item">
<text class="form-label">预约时间</text> <text class="form-label">预约时间</text>
<view class="form-select" @click="openTimePicker"> <view class="form-select" @click="openTimePicker">
<text class="form-select-text" :class="{ placeholder: form.appointmentTime == '' }"> <text
class="form-select-text"
:class="{ placeholder: form.appointmentTime == '' }"
>
{{ form.appointmentTime == "" ? "yyyy-mm日 --:--" : form.appointmentTime }} {{ form.appointmentTime == "" ? "yyyy-mm日 --:--" : form.appointmentTime }}
</text> </text>
<uni-icons type="calendar" size="14" color="#999999"></uni-icons> <uni-icons type="calendar" size="14" color="#999999"></uni-icons>
...@@ -81,7 +85,10 @@ ...@@ -81,7 +85,10 @@
<view class="form-item"> <view class="form-item">
<text class="form-label">甲方(客户)</text> <text class="form-label">甲方(客户)</text>
<view class="form-select" @click="openCustomerPicker('contract')"> <view class="form-select" @click="openCustomerPicker('contract')">
<text class="form-select-text" :class="{ placeholder: contractForm.customer == '' }"> <text
class="form-select-text"
:class="{ placeholder: contractForm.customer == '' }"
>
{{ contractForm.customer == "" ? "请选择" : contractForm.customer }} {{ contractForm.customer == "" ? "请选择" : contractForm.customer }}
</text> </text>
<uni-icons type="down" size="12" color="#999999"></uni-icons> <uni-icons type="down" size="12" color="#999999"></uni-icons>
...@@ -91,7 +98,10 @@ ...@@ -91,7 +98,10 @@
<view class="form-item"> <view class="form-item">
<text class="form-label">合同类型</text> <text class="form-label">合同类型</text>
<view class="form-select" @click="showContractType = true"> <view class="form-select" @click="showContractType = true">
<text class="form-select-text" :class="{ placeholder: contractForm.contractType == '' }"> <text
class="form-select-text"
:class="{ placeholder: contractForm.contractType == '' }"
>
{{ contractForm.contractType == "" ? "请选择" : contractForm.contractType }} {{ contractForm.contractType == "" ? "请选择" : contractForm.contractType }}
</text> </text>
<uni-icons type="down" size="12" color="#999999"></uni-icons> <uni-icons type="down" size="12" color="#999999"></uni-icons>
...@@ -130,7 +140,10 @@ ...@@ -130,7 +140,10 @@
<view class="form-item form-item--last"> <view class="form-item form-item--last">
<text class="form-label">支付方式</text> <text class="form-label">支付方式</text>
<view class="form-select" @click="showPaymentMethod = true"> <view class="form-select" @click="showPaymentMethod = true">
<text class="form-select-text" :class="{ placeholder: contractForm.paymentMethod == '' }"> <text
class="form-select-text"
:class="{ placeholder: contractForm.paymentMethod == '' }"
>
{{ contractForm.paymentMethod == "" ? "请选择" : contractForm.paymentMethod }} {{ contractForm.paymentMethod == "" ? "请选择" : contractForm.paymentMethod }}
</text> </text>
<uni-icons type="down" size="12" color="#999999"></uni-icons> <uni-icons type="down" size="12" color="#999999"></uni-icons>
...@@ -183,7 +196,7 @@ ...@@ -183,7 +196,7 @@
</view> </view>
</view> </view>
</template> </template>
</view>
<view class="submit-wrap"> <view class="submit-wrap">
<view class="submit-btn" @click="submitOrder"> <view class="submit-btn" @click="submitOrder">
<view class="check-icon-box"> <view class="check-icon-box">
...@@ -192,7 +205,6 @@ ...@@ -192,7 +205,6 @@
<text class="submit-btn-text">提交{{ tabs[activeTab].name }}</text> <text class="submit-btn-text">提交{{ tabs[activeTab].name }}</text>
</view> </view>
</view> </view>
</view>
<!-- 最近录单 --> <!-- 最近录单 -->
<view class="recent-section"> <view class="recent-section">
...@@ -233,6 +245,7 @@ ...@@ -233,6 +245,7 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view>
<!-- 客户选择器 --> <!-- 客户选择器 -->
<un-picker <un-picker
:show="showCustomer" :show="showCustomer"
...@@ -276,6 +289,7 @@ ...@@ -276,6 +289,7 @@
/> />
</view> </view>
</layout-root> </layout-root>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -486,8 +500,6 @@ function onPaymentMethodConfirm(e: UnPickerConfirmEvent): void { ...@@ -486,8 +500,6 @@ function onPaymentMethodConfirm(e: UnPickerConfirmEvent): void {
showPaymentMethod.value = false; showPaymentMethod.value = false;
} }
function isProductSelected(id: string): boolean { function isProductSelected(id: string): boolean {
return contractForm.value.selectedProductIds.indexOf(id) >= 0; return contractForm.value.selectedProductIds.indexOf(id) >= 0;
} }
......
/* 施工单录入页样式:遵循 UniAppX 规范,px 单位、无 calc/伪元素、font-weight 仅 400|700 */ /* 施工单录入页样式:遵循 UniAppX 规范,px 单位、无 calc/伪元素、font-weight 仅 400|700 */
.page-container { .page-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f5f6f7; background-color: #096;
display: flex; display: flex;
flex-direction: column; flex-direction: var(--order-page-direction);
padding-top: 12px; padding: var(--order-page-padding);
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; }
/* 右侧内容区 */
.order-content {
display:flex;
flex-direction: column;
background-color: #ef4444;
flex: 1;
} }
/* 顶部 Tab */ /* 顶部 Tab */
.tab-bar { .tab-bar {
display: flex; display: flex;
flex-direction: row; flex-direction: var(--order-tab-direction);
align-items: center; align-items: var(--order-tab-align);
justify-content: space-around; justify-content: var(--order-tab-justify);
width: auto; width: var(--order-tab-width);
background-color: #ffffff; background-color: #ffffff;
border-radius: 12px; padding: var(--order-tab-padding);
padding: 12px 0; margin-right: var(--order-tab-margin-right, 0);
margin: 0 16px 12px;
} }
.tab-item { .tab-item {
width: var(--order-tab-item-width, auto);
height: var(--order-tab-item-height, auto);
display: flex; display: flex;
flex-direction: row; flex-direction: var(--order-tab-direction);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
padding: 4px 12px; padding: var(--order-tab-item-padding);
} }
.tab-item .tab-icon { .tab-item .tab-icon {
margin-right: 6px; margin: var(--order-tab-icon-margin);
} }
.tab-item .tab-text { .tab-item .tab-text {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
margin: var(--order-tab-text-margin);
} }
.tab-item.active .tab-text { .tab-item.active .tab-text {
...@@ -50,30 +58,38 @@ ...@@ -50,30 +58,38 @@
.tab-item .tab-active-line { .tab-item .tab-active-line {
position: absolute; position: absolute;
bottom: -8px; bottom: var(--order-tab-line-bottom);
left: 50%; left: var(--order-tab-line-left);
margin-left: -10px; top: var(--order-tab-line-top);
width: 20px; margin: var(--order-tab-line-margin);
height: 3px; width: var(--order-tab-line-width);
height: var(--order-tab-line-height);
background-color: #2c66f7; background-color: #2c66f7;
border-radius: 2px; border-radius: 2px;
display: var(--order-tab-line-display, block);
} }
/* 表单卡片 */ /* 表单卡片 */
.form-card { .form-card {
width: auto; width: var(--order-form-width);
flex: var(--order-form-flex);
background-color: #ffffff; background-color: #ffffff;
border-radius: 12px;
padding: 16px; padding: 16px;
box-sizing: border-box; box-sizing: border-box;
margin: 0 16px 12px; margin: var(--order-form-margin);
display: var(--order-form-display, flex);
flex-wrap: wrap;
flex-direction: var(--order-form-flex-direction, column);
} }
.form-item { .form-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: var(--order-form-item-width, 100%);
margin-bottom: 16px; margin: var(--order-form-item-margin);
padding: 0 16px;
box-sizing: border-box;
flex-shrink: 0;
} }
.form-item--last { .form-item--last {
...@@ -328,13 +344,13 @@ ...@@ -328,13 +344,13 @@
/* 提交按钮 */ /* 提交按钮 */
.submit-wrap { .submit-wrap {
width: 100%; width: 100%;
margin-top: 20px; padding:16px;
} }
.submit-btn { .submit-btn {
width: 100%; width: 100%;
height: 48px; height: 48px;
background-color: #22c55e; background-color: #667eea;
border-radius: 24px; border-radius: 24px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -368,12 +384,13 @@ ...@@ -368,12 +384,13 @@
/* 最近录单 */ /* 最近录单 */
.recent-section { .recent-section {
width: 100%; width: var(--order-recent-width);
flex: 1; flex: var(--order-recent-flex);
background-color: #ffffff; background-color: #ffffff;
border-radius: 12px 12px 0 0; border-radius: 12px 12px 0 0;
padding: 16px; padding: 16px;
box-sizing: border-box; box-sizing: border-box;
margin: var(--order-recent-margin);
} }
.recent-header { .recent-header {
......
// orderEntry 响应式样式配置 - 横屏时 Tab 在左、表单在右
export default { export default {
common: {}, common: {
// 页面主容器
'--order-page-direction': 'column',
'--order-page-padding': '12px 0 0',
'--order-page-overflow': 'auto',
// Tab 栏
'--order-tab-width': 'auto',
'--order-tab-flex': 'none',
'--order-tab-direction': 'row',
'--order-tab-align': 'center',
'--order-tab-justify': 'space-around',
'--order-tab-padding': '12px 0',
'--order-tab-item-padding': '4px 12px',
'--order-tab-icon-margin': '0 6px 0 0',
'--order-tab-text-margin': '0',
'--order-tab-line-left': '50%',
'--order-tab-line-bottom': '-8px',
'--order-tab-line-top': 'auto',
'--order-tab-line-width': '20px',
'--order-tab-line-height': '3px',
'--order-tab-line-margin': '0 0 0 -10px',
'--order-tab-border-radius':'12px'
// 右侧内容区
'--order-content-width': 'auto',
'--order-content-margin': '0',
'--order-content-flex': '1',
'--order-content-overflow': 'visible',
// 表单卡片
'--order-form-flex': 'none',
'--order-form-width': 'auto',
'--order-form-margin': '0 0 12px',
'--order-form-item-margin': '0 0 16px 0'
// 提交按钮
'--order-submit-margin': '20px 0 0 0',
// 最近录单
'--order-recent-flex': 'none',
'--order-recent-width': 'auto',
'--order-recent-margin': '0',
},
portrait: { portrait: {
// 竖屏布局参数 // 竖屏:Tab 在顶部,表单在下,保持现有布局
'--order-page-direction': 'column',
'--order-page-padding': '12px 0 0',
'--order-page-overflow': 'auto',
'--order-tab-width': 'auto',
'--order-tab-flex': 'none',
'--order-tab-direction': 'row',
'--order-tab-align': 'center',
'--order-tab-justify': 'space-around',
'--order-tab-padding': '12px 0',
'--order-tab-item-padding': '4px 12px',
'--order-tab-icon-margin': '0 6px 0 0',
'--order-tab-text-margin': '0',
'--order-tab-line-left': '50%',
'--order-tab-line-bottom': '-8px',
'--order-tab-line-top': 'auto',
'--order-tab-line-width': '20px',
'--order-tab-line-height': '3px',
'--order-tab-line-margin': '0 0 0 -10px',
'--order-content-width': 'auto',
'--order-content-margin': '0',
'--order-content-flex': 'none',
'--order-content-overflow': 'visible',
'--order-form-flex': 'none',
'--order-form-width': 'auto',
'--order-form-margin': '0 16px 12px',
'--order-submit-margin': '20px 0 0',
'--order-recent-flex': 'none',
'--order-recent-width': 'auto',
'--order-recent-margin': '0',
}, },
landscape: { landscape: {
// 横屏布局参数 // 横屏:Tab 在左,表单在右
'--order-page-direction': 'row',
'--order-page-padding': '12px 0 12px 0',
'--order-page-overflow': 'hidden',
'--order-tab-width': '40px',
'--order-tab-flex': 'none',
'--order-tab-direction': 'column',
'--order-tab-align': 'flex-start',
'--order-tab-justify': 'flex-start',
'--order-tab-padding': '16px 0',
'--order-tab-margin-right': '16px',
'--order-tab-item-padding': '12px 16px',
'--order-tab-icon-margin': '0 0 6px 0',
'--order-tab-text-margin': '0 0 4px 0',
'--order-tab-line-left': '4px',
'--order-tab-line-bottom': 'auto',
'--order-tab-line-top': '50%',
'--order-tab-line-width': '3px',
'--order-tab-line-height': '20px',
'--order-tab-line-margin': '-10px 0 0 0',
'--order-content-width': '0',
'--order-content-margin': '0 16px 0 16px',
'--order-content-flex': '1',
'--order-content-overflow': 'auto',
'--order-form-flex': 'none',
'--order-form-width': 'auto',
'--order-form-margin': '0 0 12px',
'--order-submit-margin': '24px 0 0',
'--order-recent-flex': '1',
'--order-recent-width': '100%',
'--order-recent-margin': '0',
'--order-tab-item-width': '100%',
'--order-tab-border-radius':'12px 12px 12px 12px',
'--order-tab-line-display':'none',
'--order-form-display': 'flex',
'--order-form-item-width': '50%',
'--order-form-flex-direction': 'row',
'--order-form-item-margin': '0 16px 16px',
'--order-form-item-padding': '0 16px'
},
resolutions: {
// 大屏平板横屏 (1174x768)
'landscape-1174x768': {
'--order-tab-width': '100px',
'--order-tab-padding': '20px 0',
'--order-tab-item-padding': '14px 20px',
'--order-tab-item-height': '33%',
},
// 小屏 Pad 横屏 (816x393)
'landscape-816x393': {
'--order-tab-width': '120px',
'--order-tab-padding': '10px 0',
'--order-tab-item-padding': '8px 10px',
},
// 大屏平板竖屏 (768x1174)
'portrait-768x1174': {
'--order-tab-padding': '14px 0',
'--order-tab-item-padding': '6px 16px',
}, },
}
} }
export default {
common: {
'--store-page-padding-x': '16px',
'--store-page-padding-y': '14px',
'--store-section-gap': '12px',
'--store-panel-radius': '18px',
'--store-panel-padding': '14px',
'--store-card-radius': '16px',
'--store-card-min-height': '92px',
'--store-title-size': '24px',
'--store-subtitle-size': '13px',
'--store-stat-width': '120px',
'--store-banner-layout': 'row',
},
portrait: {
'--store-page-padding-x': '14px',
'--store-page-padding-y': '12px',
'--store-banner-layout': 'column',
'--store-stat-width': '100%',
},
landscape: {
'--store-page-padding-x': '18px',
'--store-page-padding-y': '12px',
'--store-banner-layout': 'row',
'--store-stat-width': '132px',
},
resolutions: {
'portrait-393x816': {
'--store-page-padding-x': '12px',
'--store-page-padding-y': '10px',
'--store-panel-padding': '12px',
'--store-title-size': '22px'
},
'portrait-414x736': {
'--store-page-padding-x': '12px',
'--store-page-padding-y': '10px'
},
'landscape-816x393': {
'--store-page-padding-x': '10px',
'--store-page-padding-y': '8px',
'--store-panel-padding': '10px',
'--store-card-min-height': '82px',
'--store-stat-width': '112px'
},
'landscape-1024x640': {
'--store-stat-width': '120px'
},
'landscape-1174x768': {
'--store-page-padding-x': '20px',
'--store-stat-width': '140px'
}
}
}
...@@ -42,27 +42,21 @@ async function onStartClick(): Promise<void> { ...@@ -42,27 +42,21 @@ async function onStartClick(): Promise<void> {
return; return;
} }
// 2. 获取 typeCode:优先使用传入值,否则从 storage 读取 // // 2. 获取 typeCode:优先使用传入值,否则从 storage 读取
let typeCode = props.typeCode; // let typeCode = props.typeCode;
if (typeCode === "") { // if (typeCode === "") {
const typeItem = storage.get("typeItem") as UTSJSONObject | null; // const typeItem = storage.get("typeItem") as UTSJSONObject | null;
if (typeItem != null) { // if (typeItem != null) {
const tc = typeItem["typeCode"] as string | null; // const tc = typeItem["typeCode"] as string | null;
typeCode = tc != null ? tc : ""; // typeCode = tc != null ? tc : "";
} // }
} // }
// 3. 校验 typeCode
if (typeCode === "") {
uni.showToast({ title: "请先加载或选择产品类型", icon: "none" });
return;
}
// 4. 统一跳转接待详情页 // 3. 跳转接待页:有 typeCode 时加载当前产品素材,无 typeCode 时回退通用素材
const q = `typeCode=${encodeURIComponent(typeCode)}&type=edit`; // const q = typeCode !== "" ? `?typeCode=${encodeURIComponent(typeCode)}` : "";
uni.navigateTo({ url: `/pages/equity/detail/index?${q}` }); uni.navigateTo({ url: `/pages/index/reception` });
// 5. 通知外部 // 4. 通知外部
emit("start"); emit("start");
} }
</script> </script>
......
// 客户接待页响应式变量:方向/分辨率维度由 useScreenVars 自动合并
// 设计规范(对齐 .qoder 规则):
// - 卡片用 1px 边框分隔,不使用 box-shadow,保证 App 端干净自然
// - 横竖屏差异用 CSS 变量承载(margin/宽度/列宽),避免后代选择器
export default {
common: {
// 页面左右/下内边距(顶部单独使用 --desk-shell-padding-top)
"--desk-shell-padding": "14px",
// 顶部内边距:紧贴导航栏占位,避免间距过大
"--desk-shell-padding-top": "2px",
// 面板间距
"--desk-panel-gap": "10px",
// 面板圆角
"--desk-panel-radius": "16px",
// 面板内边距
"--desk-panel-padding": "12px",
// 表单字段高度/间距/字号(紧凑优先)
"--desk-field-height": "42px",
"--desk-field-gap": "6px",
"--desk-field-label-size": "12px",
"--desk-field-input-size": "14px",
// 客户资料区:默认竖屏两行 3+2
"--desk-form-major-col-width": "33.33%",
"--desk-form-minor-col-width": "50%",
// 客户面板宽度:竖屏整行,横屏固定宽度
"--desk-customer-panel-width": "100%",
// 客户面板与素材面板的间距(方向不同,用 margin 变量表达)
"--desk-customer-panel-margin-right": "0px",
"--desk-customer-panel-margin-bottom": "12px"
},
portrait: {
"--desk-panel-gap": "12px",
"--desk-customer-panel-width": "100%",
"--desk-customer-panel-margin-right": "0px",
"--desk-customer-panel-margin-bottom": "12px"
},
landscape: {
// 横屏:1 字段 1 行,利用左侧充足高度换取更好的录入宽度
"--desk-form-major-col-width": "100%",
"--desk-form-minor-col-width": "100%",
"--desk-customer-panel-width": "340px",
"--desk-customer-panel-margin-right": "10px",
"--desk-customer-panel-margin-bottom": "0px",
"--desk-field-gap": "10px"
},
resolutions: {
// 手机竖屏:更紧凑
"portrait-393x816": {
"--desk-shell-padding": "10px",
"--desk-panel-padding": "10px",
"--desk-field-height": "40px",
"--desk-field-gap": "6px"
},
"portrait-414x736": {
"--desk-shell-padding": "10px",
"--desk-field-height": "40px",
"--desk-field-gap": "6px"
},
// 平板竖屏:字段两列
"portrait-768x1174": {
"--desk-form-major-col-width": "33.33%",
"--desk-form-minor-col-width": "50%",
"--desk-shell-padding": "16px"
},
// 小屏 Pad 横屏:压缩面板
"landscape-816x393": {
"--desk-shell-padding": "8px",
"--desk-panel-gap": "8px",
"--desk-customer-panel-width": "300px",
"--desk-panel-padding": "10px",
"--desk-field-height": "40px",
"--desk-field-gap": "8px"
},
"landscape-1024x640": {
"--desk-customer-panel-width": "320px",
"--desk-field-gap": "10px"
},
"landscape-1174x768": {
"--desk-customer-panel-width": "360px",
"--desk-field-gap": "12px"
}
}
}
import { getPadMaterialListApi } from "@/api/common-api.uts";
import { getContents } from "@/api/modules/contents.uts";
export type CustomerReceptionForm = {
customerName: string
phoneNumber: string
plateNumber: string
carBrand: string
carSeries: string
}
const _emptyArr: any[] = [] as any[];
export function createEmptyReceptionForm(): CustomerReceptionForm {
return {
customerName: "",
phoneNumber: "",
plateNumber: "",
carBrand: "",
carSeries: ""
};
}
function toStr(value: any | null): string {
if (value == null) {
return "";
}
return `${value}`;
}
function readShukeDataArray(res: any | null): any[] {
if (res == null) {
return _emptyArr.slice();
}
const root = res as UTSJSONObject;
const data = root["data"];
if (data != null && Array.isArray(data)) {
return data as any[];
}
return _emptyArr.slice();
}
function buildPadMaterialRows(list: any[]): any[] {
const rows: any[] = _emptyArr.slice();
for (let i = 0; i < list.length; i++) {
const raw = list[i] as UTSJSONObject;
const title = readMaterialTitle(raw);
rows.push({
id: raw["id"],
materialName: title,
title: title,
name: title,
contentType: raw["contentType"],
contentTypeName: raw["contentTypeName"],
coverUrl: toStr(raw["coverUrl"]),
thumbnailUrl: toStr(raw["thumbnailUrl"]),
detailUrl: toStr(raw["detailUrl"]),
materialUrl: toStr(raw["materialUrl"])
} as UTSJSONObject);
}
return rows;
}
function buildContentRows(list: any[]): any[] {
const rows: any[] = _emptyArr.slice();
for (let i = 0; i < list.length; i++) {
const raw = list[i] as UTSJSONObject;
const title = readMaterialTitle(raw);
const coverUrl = toStr(raw["coverUrl"]);
rows.push({
id: raw["id"],
materialName: title,
title: title,
name: title,
contentType: raw["contentType"],
contentTypeName: toStr(raw["contentTypeName"]),
coverUrl: coverUrl,
bannerImg: coverUrl,
materialUrl: toStr(raw["bodyUrl"])
} as UTSJSONObject);
}
return rows;
}
export function readMaterialTitle(item: any | null): string {
if (item == null) {
return "";
}
const obj = item as UTSJSONObject;
return (
(obj["detailTitle"] as null | string)
?? (obj["materialTitle"] as null | string)
?? (obj["shortTitle"] as null | string)
?? (obj["materialName"] as null | string)
?? (obj["title"] as null | string)
?? (obj["name"] as null | string)
?? ""
);
}
export function readMaterialCoverUrl(item: any | null): string {
if (item == null) {
return "";
}
const obj = item as UTSJSONObject;
const candidates = [
obj["coverUrl"],
obj["bannerImg"],
obj["thumbnail"],
obj["thumbnailUrl"],
obj["imageUrl"],
obj["imgUrl"],
obj["detailUrl"]
];
for (let i = 0; i < candidates.length; i++) {
const value = candidates[i];
if (value != null && typeof value === "string" && `${value}` !== "") {
return `${value}`;
}
}
return "";
}
export function readMaterialPreviewUrl(item: any | null): string {
if (item == null) {
return "";
}
const obj = item as UTSJSONObject;
const candidates = [
obj["materialUrl"],
obj["detailUrl"],
obj["bodyUrl"],
obj["contentPicUrl"],
obj["coverUrl"],
obj["thumbnailUrl"]
];
for (let i = 0; i < candidates.length; i++) {
const value = candidates[i];
if (value != null && typeof value === "string" && `${value}` !== "") {
return `${value}`;
}
}
return "";
}
export function buildCustomerInfoPayload(form: CustomerReceptionForm): UTSJSONObject {
return {
customerName: form.customerName,
phoneNumber: form.phoneNumber,
carPlateNumber: form.plateNumber,
carBrand: form.carBrand,
carModel: form.carSeries
} as UTSJSONObject;
}
/**
* 优先加载当前 typeCode 对应的 Pad 首页素材,若未配置则回退到通用展业素材。
*/
export async function loadReceptionMaterials(typeCode: string): Promise<any[]> {
if (typeCode != null && typeCode !== "") {
try {
const shukeHomeRes = await getPadMaterialListApi({
typeCode: typeCode,
status: 0,
showOnHomepage: 1
} as UTSJSONObject);
const padRows = buildPadMaterialRows(readShukeDataArray(shukeHomeRes));
if (padRows.length > 0) {
return padRows;
}
const shukeAllRes = await getPadMaterialListApi({
typeCode: typeCode,
status: 0
} as UTSJSONObject);
const allRows = buildPadMaterialRows(readShukeDataArray(shukeAllRes));
if (allRows.length > 0) {
return allRows;
}
} catch (e) {
console.warn("[ReceptionDesk] load pad materials failed", e);
}
}
try {
const contentRes = await getContents({} as UTSJSONObject);
if (contentRes == null) {
return _emptyArr.slice();
}
const root = contentRes as UTSJSONObject;
const list = root["list"];
if (list != null && Array.isArray(list)) {
return buildContentRows(list as any[]);
}
} catch (e) {
console.warn("[ReceptionDesk] load fallback contents failed", e);
}
return _emptyArr.slice();
}
<template> <template>
<view class="person-page"> <view class="person-page" :style="screenVars">
<!-- <scroll-view class="person-scroll" :scroll-y="true" :show-scrollbar="false"> --> <scroll-view class="person-scroll" :scroll-y="true" :show-scrollbar="false">
<!-- ✅ 统一布局:通过 CSS 变量控制单列/分栏 --> <view class="person-scroll-body">
<view class="person-unified-layout"> <view :class="personDashboardClassName">
<!-- 左侧/上方:用户资料 + 账号信息 -->
<view class="person-primary-panel"> <view class="person-primary-panel">
<!-- 用户资料卡片 --> <view class="person-stack-card person-stack-card-first">
<ProfileCard <ProfileCard
:user-name="userName" :user-name="displayName"
:plain-phone="plainPhone" :plain-phone="displayPhone"
:shop-name="shopName" :shop-name="displayStoreName"
:avatar-text="avatarText" /> :avatar-text="avatarText"
<!-- 账号信息 --> :avatar-size="avatarSizeValue"
:avatar-font-size="avatarFontSizeValue" />
</view>
<view class="person-stack-card">
<AccountInfo <AccountInfo
:user-name="userName" :user-name="displayName"
:shop-name="shopName" :shop-name="displayStoreName"
:shop-merchant-id="shopMerchantId" :shop-merchant-id="displayStoreCode"
:plain-phone="plainPhone" /> :plain-phone="displayPhone" />
</view>
</view> </view>
<!-- 右侧/下方:常用功能 --> <view :class="personSecondaryClassName">
<view class="person-secondary-panel"> <view class="person-stack-card person-stack-card-first">
<CommonFunctions <CommonFunctions
@select-store="goSelectStore" @select-store="goSelectStore"
@attendance="goAttendance" @attendance="goAttendance"
...@@ -28,30 +31,32 @@ ...@@ -28,30 +31,32 @@
@reception-entry="goReceptionCenter" /> @reception-entry="goReceptionCenter" />
</view> </view>
</view> </view>
<!-- ✅ APP 编码页脚(固定在 scroll-view 底部正中间) -->
<view class="device-id-footer" @click="copyDeviceId">
<text class="device-id-footer-text">APP编码: {{ deviceId }}</text>
<un-icon name="fingerprint" size="16" color="#9ca3af" />
</view> </view>
<!-- </scroll-view> --> </view>
</scroll-view>
<view class="device-id-panel"
hover-class="device-id-panel-hover"
@click="copyDeviceId">
<text class="device-id-panel-text">APP编码: {{ deviceId }}</text>
<un-icon name="fingerprint" size="16" color="#94a3b8" />
</view>
<SettingBox :visible="showSetting" <SettingBox :visible="showSetting"
@update:visible="onSettingVisible" /> @update:visible="onSettingVisible" />
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { computed, onMounted, ref } from "vue"; import { computed, onMounted, ref, nextTick } from "vue";
import { navigateToSelectStoreWithSessionStores } from "@/utils/shukeSelectStoreNav.uts"; import { navigateToSelectStoreWithSessionStores } from "@/utils/shukeSelectStoreNav.uts";
import { useOrientation, useScreenVars } from "@/services/adapter/hooks";
import SettingBox from "./SettingBox.uvue"; import SettingBox from "./SettingBox.uvue";
import ProfileCard from "./components/ProfileCard.uvue"; import ProfileCard from "./components/ProfileCard.uvue";
import AccountInfo from "./components/AccountInfo.uvue"; import AccountInfo from "./components/AccountInfo.uvue";
import CommonFunctions from "./components/CommonFunctions.uvue"; import CommonFunctions from "./components/CommonFunctions.uvue";
import { resolveHomeFrameDisplayName } from "@/components/TabBar/tabbarShared.uts"; import pageVars from "./styles/index.vars.uts";
import { toObj,toStr, type ObjOrNull } from "@/utils/common.uts"; import { toObj,toStr } from "@/utils/common.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
const emit = defineEmits<{ const emit = defineEmits<{
...@@ -60,6 +65,8 @@ const emit = defineEmits<{ ...@@ -60,6 +65,8 @@ const emit = defineEmits<{
}>(); }>();
const showSetting = ref(false); const showSetting = ref(false);
const screenVars = useScreenVars(pageVars);
const orientation = useOrientation();
// ✅ 修复响应式:使用 ref 确保视图能正确更新 // ✅ 修复响应式:使用 ref 确保视图能正确更新
const userName = ref<string>(""); const userName = ref<string>("");
...@@ -69,6 +76,42 @@ const shopMerchantId = ref<string>(""); ...@@ -69,6 +76,42 @@ const shopMerchantId = ref<string>("");
const avatarText = ref<string>("我"); const avatarText = ref<string>("我");
const deviceId = ref<string>(""); const deviceId = ref<string>("");
const displayName = computed((): string => {
return userName.value != "" ? userName.value : "当前账号";
});
const displayStoreName = computed((): string => {
return shopName.value != "" ? shopName.value : "未绑定门店";
});
const displayPhone = computed((): string => {
return plainPhone.value != "" ? plainPhone.value : "未填写手机号";
});
const displayStoreCode = computed((): string => {
return shopMerchantId.value != "" ? shopMerchantId.value : "--";
});
const personDashboardClassName = computed((): string => {
return orientation.isPortrait.value ? "person-dashboard person-dashboard-portrait person-dashboard-first" : "person-dashboard person-dashboard-first";
});
const personSecondaryClassName = computed((): string => {
return orientation.isPortrait.value ? "person-secondary-panel person-secondary-panel-portrait" : "person-secondary-panel";
});
const avatarSizeValue = computed((): string => {
const vars = screenVars.value as UTSJSONObject;
const value = vars["--person-avatar-size"] as string | null;
return value != null && value != "" ? value : "56";
});
const avatarFontSizeValue = computed((): string => {
const vars = screenVars.value as UTSJSONObject;
const value = vars["--person-avatar-font-size"] as string | null;
return value != null && value != "" ? value : "22";
});
/** /**
* 从 storage 获取并提取用户信息 * 从 storage 获取并提取用户信息
*/ */
...@@ -126,15 +169,11 @@ function copyDeviceId(): void { ...@@ -126,15 +169,11 @@ function copyDeviceId(): void {
// ✅ 组件挂载完成后通知父组件 // ✅ 组件挂载完成后通知父组件
onMounted(() => { onMounted(() => {
// ✅ 修复白屏:直接从 storage 获取用户信息,不依赖 props
extractUserInfo(); extractUserInfo();
// ✅ 获取设备 ID(APP 编码)
getDeviceId(); getDeviceId();
void nextTick(() => {
// ✅ 延迟一小段时间确保 DOM 渲染完成
setTimeout(() => {
emit('loaded'); emit('loaded');
}, 16); // 约 16ms,一个帧的时间 });
}); });
function onSettingVisible(v: boolean): void { function onSettingVisible(v: boolean): void {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="btn-item btn-item-primary" @tap="changeAccount"> <view class="btn-item btn-item-primary" @tap="changeAccount">
<text class="btn-item-text btn-item-text-primary">切换账号</text> <text class="btn-item-text btn-item-text-primary">切换账号</text>
</view> </view>
<view class="btn-item btn-item-ghost" @tap="handleLogout"> <view class="btn-item btn-item-ghost btn-item-last" @tap="handleLogout">
<text class="btn-item-text btn-item-text-ghost">退出</text> <text class="btn-item-text btn-item-text-ghost">退出</text>
</view> </view>
</view> </view>
...@@ -155,11 +155,13 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -155,11 +155,13 @@ const panelStyle = computed<UTSJSONObject>(() => {
<style scoped lang="scss"> <style scoped lang="scss">
.setting-panel { .setting-panel {
// ✅ UVUE 不支持 vw 单位,width 通过 panelStyle 动态计算 width: 100%;
border-radius: 18px; border-radius: 18px;
overflow: hidden; overflow: hidden;
background: #ffffff; background: #ffffff;
box-shadow: none; // border-width: 1px;
// border-style: solid;
// border-color: #e2e8f0;
margin: 0 auto; margin: 0 auto;
} }
...@@ -181,14 +183,13 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -181,14 +183,13 @@ const panelStyle = computed<UTSJSONObject>(() => {
.logo-placeholder { .logo-placeholder {
width: 68px; width: 68px;
height: 68px; height: 68px;
background: #1677ff; background: #2c66f7;
border-radius: 18px; border-radius: 18px;
margin-bottom: 10px; margin-bottom: 10px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0 8px 18px rgba(22, 119, 255, 0.28);
} }
.logo-text { .logo-text {
...@@ -199,21 +200,26 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -199,21 +200,26 @@ const panelStyle = computed<UTSJSONObject>(() => {
.app-name { .app-name {
font-size: 19px; font-size: 19px;
line-height: 24px;
font-weight: 700; font-weight: 700;
color: #1e293b; color: #0f172a;
margin-bottom: 4px; margin-bottom: 4px;
} }
.version { .version {
font-size: 12px; font-size: 12px;
color: #8391a7; line-height: 16px;
color: #64748b;
} }
.version-bar { .version-bar {
width: 100%; width: 100%;
height: 44px; height: 44px;
border-radius: 12px; border-radius: 12px;
background-color: #eef5ff; background-color: #f8fbff;
border-width: 1px;
border-style: solid;
border-color: #dbe6f7;
padding: 0 12px; padding: 0 12px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -225,13 +231,14 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -225,13 +231,14 @@ const panelStyle = computed<UTSJSONObject>(() => {
.version-bar-text { .version-bar-text {
font-size: 12px; font-size: 12px;
color: #5f7ea8; line-height: 16px;
color: #64748b;
} }
.check-btn { .check-btn {
height: 28px; height: 28px;
padding: 0 12px; padding: 0 12px;
background: #eaf2ff; background: #eef4ff;
border-radius: 14px; border-radius: 14px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -241,7 +248,8 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -241,7 +248,8 @@ const panelStyle = computed<UTSJSONObject>(() => {
.check-btn-text { .check-btn-text {
font-size: 12px; font-size: 12px;
color: #1677ff; line-height: 16px;
color: #2c66f7;
font-weight: 600; font-weight: 600;
} }
...@@ -264,25 +272,26 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -264,25 +272,26 @@ const panelStyle = computed<UTSJSONObject>(() => {
margin-bottom: 12px; margin-bottom: 12px;
} }
.btn-item:last-child {
margin-bottom: 0;
}
.btn-item-primary { .btn-item-primary {
background: #1677ff; background: #2c66f7;
box-shadow: 0 8px 16px rgba(22, 119, 255, 0.24);
} }
.btn-item-ghost { .btn-item-ghost {
background: #ffffff; background: #ffffff;
border: none; border-width: 1px;
border-style: solid;
border-color: #dbe4f0;
}
.btn-item-last {
margin-bottom: 0;
} }
.btn-item-text { .btn-item-text {
font-size: 14px; font-size: 14px;
line-height: 18px;
font-weight: 600; font-weight: 600;
opacity: 1; opacity: 1;
// ✅ UVUE 不支持 display: block,父元素已是 flex,子元素默认为块级
} }
.btn-item-text-primary { .btn-item-text-primary {
...@@ -290,9 +299,6 @@ const panelStyle = computed<UTSJSONObject>(() => { ...@@ -290,9 +299,6 @@ const panelStyle = computed<UTSJSONObject>(() => {
} }
.btn-item-text-ghost { .btn-item-text-ghost {
color: #1e293b; color: #0f172a;
} }
// ✅ UVUE 只支持类名选择器,不能使用后代选择器 .setting-panel text
// opacity: 1 是默认值,无需设置
</style> </style>
<template> <template>
<InfoSection title="账号信息" :border="true"> <InfoSection title="账号信息" subtitle="当前登录账号与门店基础信息">
<un-cell title="姓名" :value="userName" icon="account-fill" size="large"/> <view class="account-section">
<un-cell title="门店" :value="shopName" icon="home-fill" size="large"/> <view class="account-row">
<un-cell title="门店号" :value="shopMerchantId" icon="file-text-fill" size="large"/> <text class="account-row-label">姓名</text>
<un-cell title="手机号" :value="plainPhone" icon="phone-fill" size="large"/> <text class="account-row-value">{{ userName }}</text>
</view>
<view class="account-row">
<text class="account-row-label">门店</text>
<text class="account-row-value">{{ shopName }}</text>
</view>
<view class="account-row">
<text class="account-row-label">门店号</text>
<text class="account-row-value">{{ shopMerchantId }}</text>
</view>
<view class="account-row account-row-last">
<text class="account-row-label">手机号</text>
<text class="account-row-value">{{ plainPhone }}</text>
</view>
</view>
</InfoSection> </InfoSection>
</template> </template>
...@@ -17,3 +31,53 @@ defineProps<{ ...@@ -17,3 +31,53 @@ defineProps<{
plainPhone: string plainPhone: string
}>() }>()
</script> </script>
<style scoped lang="scss">
.account-section {
width: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.account-row {
width: 100%;
min-height: var(--person-row-height, 52px);
border-radius: 12px;
border-width: 1px;
border-style: solid;
border-color: #e8edf5;
background-color: #fbfdff;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 14px;
box-sizing: border-box;
margin-top: 10px;
}
.account-row-last {
margin-bottom: 0;
}
.account-row-label {
flex-shrink: 0;
width: var(--person-row-label-width, 72px);
font-size: 13px;
line-height: 18px;
font-weight: 600;
color: var(--person-text-secondary, #475569);
}
.account-row-value {
flex: 1;
min-width: 0;
font-size: 14px;
line-height: 18px;
font-weight: 600;
color: var(--person-text-primary, #0f172a);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<template> <template>
<InfoSection title="常用功能" :border="false"> <InfoSection title="常用功能" subtitle="进入常用业务入口与设置管理">
<un-cell title="接待记录" <view class="function-list">
icon="chat-fill" <view class="function-row"
isLink hover-class="function-row-hover"
clickable @click="onReceptionEntry">
@click="onReceptionEntry" <view class="function-row-main">
size="large" /> <text class="function-row-title">接待记录</text>
<un-cell title="选择门店" <text class="function-row-desc">查看接待相关入口与记录</text>
icon="home-fill" </view>
isLink <un-icon name="arrow-right" size="16" color="#94a3b8" />
clickable </view>
@click="onSelectStore" <view class="function-row"
size="large" /> hover-class="function-row-hover"
<un-cell title="个人考勤" @click="onSelectStore">
icon="clock-fill" <view class="function-row-main">
isLink <text class="function-row-title">选择门店</text>
clickable <text class="function-row-desc">切换当前登录门店</text>
@click="onAttendance" </view>
size="large" /> <un-icon name="arrow-right" size="16" color="#94a3b8" />
<un-cell title="系统设置" </view>
icon="setting-fill" <view class="function-row"
isLink hover-class="function-row-hover"
@click="onSetting" @click="onAttendance">
size="large" /> <view class="function-row-main">
<text class="function-row-title">个人考勤</text>
<text class="function-row-desc">查看考勤与打卡信息</text>
</view>
<un-icon name="arrow-right" size="16" color="#94a3b8" />
</view>
<view class="function-row function-row-last"
hover-class="function-row-hover"
@click="onSetting">
<view class="function-row-main">
<text class="function-row-title">系统设置</text>
<text class="function-row-desc">检查版本并管理账号</text>
</view>
<un-icon name="arrow-right" size="16" color="#94a3b8" />
</view>
</view>
</InfoSection> </InfoSection>
</template> </template>
...@@ -52,3 +67,59 @@ function onReceptionEntry(): void { ...@@ -52,3 +67,59 @@ function onReceptionEntry(): void {
emit('receptionEntry') emit('receptionEntry')
} }
</script> </script>
<style scoped lang="scss">
.function-list {
width: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.function-row {
width: 100%;
min-height: 62px;
border-radius: 14px;
border-width: 1px;
border-style: solid;
border-color: #e8edf5;
background-color: #fbfdff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 14px;
box-sizing: border-box;
margin-top: 10px;
}
.function-row-hover {
opacity: 0.92;
}
.function-row-last {
margin-bottom: 0;
}
.function-row-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
margin-right: 12px;
}
.function-row-title {
font-size: 15px;
line-height: 20px;
font-weight: 700;
color: var(--person-text-primary, #0f172a);
}
.function-row-desc {
margin-top: 4px;
font-size: 12px;
line-height: 16px;
color: var(--person-text-secondary, #475569);
}
</style>
<template> <template>
<view class="section-shell"> <view class="section-shell">
<view class="section-title">{{ title }}</view> <view class="section-head">
<un-cell-group :border="border" round="0" backgroundColor="transparent"> <view class="section-title-row">
<view class="section-title-bar"></view>
<text class="section-title">{{ title }}</text>
</view>
<text v-if="subtitle !== ''" class="section-subtitle">{{ subtitle }}</text>
</view>
<view class="section-body">
<slot></slot> <slot></slot>
</un-cell-group> </view>
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
defineProps<{ withDefaults(defineProps<{
title: string title: string
subtitle?: string
border?: boolean border?: boolean
}>() }>(), {
subtitle: "",
border: true
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.section-shell { .section-shell {
background-color: var(--person-bg-card, #ffffff); display: flex;
border: 1px solid var(--person-border, #dfe9f7); flex-direction: column;
border-radius: var(--person-radius-lg, 16px); width: 100%;
padding: var(--person-spacing-lg, 16px) 10px;
flex: 1;
min-height: 0; min-height: 0;
background-color: transparent;
box-sizing: border-box;
}
.section-head {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 12px;
}
.section-title-row {
display: flex;
flex-direction: row;
align-items: center;
}
.section-title-bar {
width: 4px;
height: 14px;
border-radius: 2px;
background-color: var(--person-primary, #2c66f7);
margin-right: 8px;
} }
.section-title { .section-title {
font-size: var(--person-section-title-size, 15px); font-size: var(--person-section-title-size, 15px);
font-weight: var(--person-section-title-weight, 600); line-height: 20px;
color: var(--person-text-primary, #1a2433); font-weight: 700;
margin-bottom: var(--person-spacing-md, 12px); color: var(--person-text-primary, #0f172a);
flex-shrink: 0;
} }
.section-shell :deep(.uni-cell-group) { .section-subtitle {
flex: 1; margin-top: 4px;
min-height: 0; font-size: var(--person-section-desc-size, 12px);
display: flex; line-height: 16px;
flex-direction: column; color: var(--person-text-secondary, #475569);
} }
/* ✅ 强制显示所有 un-cell 的下边框(包括最后一个) */ .section-body {
.section-shell :deep(.uni-cell) { display: flex;
border-bottom: 1px solid #e5e7eb !important; flex-direction: column;
width: 100%;
box-sizing: border-box;
} }
</style> </style>
<template> <template>
<view class="profile-card"> <view class="profile-card">
<view class="profile-top">
<view class="profile-badge">
<text class="profile-badge-text">账号概览</text>
</view>
<view class="profile-head"> <view class="profile-head">
<un-avatar :text="avatarText" <un-avatar :text="avatarText"
shape="circle" shape="circle"
:size="avatarSize" :size="avatarSize"
bgColor="#2f6af7" bgColor="#2c66f7"
color="#ffffff" color="#ffffff"
:fontSize="avatarFontSize" /> :fontSize="avatarFontSize" />
<view class="profile-main"> <view class="profile-main">
...@@ -12,11 +16,18 @@ ...@@ -12,11 +16,18 @@
<text class="profile-meta">{{ plainPhone }}</text> <text class="profile-meta">{{ plainPhone }}</text>
</view> </view>
</view> </view>
</view>
<view class="profile-divider"></view> <view class="profile-divider"></view>
<view class="profile-shop-row"> <view class="profile-info-grid">
<view class="profile-info-item">
<text class="profile-shop-label">当前门店</text> <text class="profile-shop-label">当前门店</text>
<text class="profile-shop-value">{{ shopName }}</text> <text class="profile-shop-value">{{ shopName }}</text>
</view> </view>
<view class="profile-info-item profile-info-item-right">
<text class="profile-shop-label">账号状态</text>
<text class="profile-shop-value">正常</text>
</view>
</view>
</view> </view>
</template> </template>
...@@ -36,18 +47,42 @@ const props = withDefaults(defineProps<{ ...@@ -36,18 +47,42 @@ const props = withDefaults(defineProps<{
<style scoped lang="scss"> <style scoped lang="scss">
.profile-card { .profile-card {
background-color: var(--person-bg-card, #ffffff); width: 100%;
border: 1px solid var(--person-border, #dfe9f7); display: flex;
border-radius: var(--person-radius-lg, 16px); flex-direction: column;
padding: var(--person-profile-padding, 14px); background-color: transparent;
flex-shrink: 0; box-sizing: border-box;
margin-bottom: 16px; }
.profile-top {
display: flex;
flex-direction: column;
}
.profile-badge {
width: 70px;
height: 24px;
border-radius: 12px;
background-color: var(--person-primary-soft, #eef4ff);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.profile-badge-text {
font-size: 11px;
line-height: 14px;
font-weight: 700;
color: var(--person-primary, #2c66f7);
} }
.profile-head { .profile-head {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-top: 12px;
} }
.profile-main { .profile-main {
...@@ -55,21 +90,24 @@ const props = withDefaults(defineProps<{ ...@@ -55,21 +90,24 @@ const props = withDefaults(defineProps<{
min-width: 0; min-width: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: var(--person-spacing-md, 4px); margin-left: 12px;
} }
.profile-name { .profile-name {
font-size: var(--person-name-size, 19px); font-size: var(--person-name-size, 19px);
font-weight: 600; line-height: 24px;
color: var(--person-text-primary, #1a2433); font-weight: 700;
color: var(--person-text-primary, #0f172a);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.profile-meta { .profile-meta {
margin-top: 4px;
font-size: var(--person-meta-size, 13px); font-size: var(--person-meta-size, 13px);
color: var(--person-text-secondary, #64748b); line-height: 18px;
color: var(--person-text-secondary, #475569);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -78,25 +116,41 @@ const props = withDefaults(defineProps<{ ...@@ -78,25 +116,41 @@ const props = withDefaults(defineProps<{
.profile-divider { .profile-divider {
height: 1px; height: 1px;
background-color: var(--person-border, #dfe9f7); background-color: var(--person-border, #dfe9f7);
margin-top: var(--person-spacing-md, 12px); margin-top: 14px;
margin-bottom: var(--person-spacing-md, 12px); margin-bottom: 14px;
} }
.profile-shop-row { .profile-info-grid {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; align-items: stretch;
align-items: center; }
.profile-info-item {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.profile-info-item-right {
margin-left: 12px;
} }
.profile-shop-label { .profile-shop-label {
font-size: var(--person-shop-label-size, 12px); font-size: 12px;
line-height: 16px;
color: var(--person-text-tertiary, #94a3b8); color: var(--person-text-tertiary, #94a3b8);
} }
.profile-shop-value { .profile-shop-value {
font-size: var(--person-shop-value-size, 14px); margin-top: 4px;
color: var(--person-text-primary, #1a2433); font-size: 14px;
font-weight: 500; line-height: 18px;
color: var(--person-text-primary, #0f172a);
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="skeleton-avatar-circle" style="margin-right: 12px"></view> <view class="skeleton-avatar-circle" style="margin-right: 12px"></view>
<view class="skeleton-text-group"> <view class="skeleton-text-group">
<view class="skeleton-line skeleton-line-short"></view> <view class="skeleton-line skeleton-line-short"></view>
<view class="skeleton-line skeleton-line-medium"></view> <view class="skeleton-line skeleton-line-medium skeleton-line-last"></view>
</view> </view>
</view> </view>
<view class="skeleton-divider"></view> <view class="skeleton-divider"></view>
...@@ -23,21 +23,21 @@ ...@@ -23,21 +23,21 @@
<view class="skeleton-line skeleton-line-md"></view> <view class="skeleton-line skeleton-line-md"></view>
</view> </view>
<view class="skeleton-cell-group"> <view class="skeleton-cell-group">
<view class="skeleton-cell-item"> <view class="skeleton-cell-item skeleton-cell-item-last">
<view class="skeleton-row-with-avatar-small"> <view class="skeleton-row-with-avatar-small">
<view class="skeleton-avatar-square" style="margin-right: 8px"></view> <view class="skeleton-avatar-square" style="margin-right: 8px"></view>
<view class="skeleton-text-group-horizontal"> <view class="skeleton-text-group-horizontal">
<view class="skeleton-line skeleton-line-sm"></view> <view class="skeleton-line skeleton-line-sm"></view>
<view class="skeleton-line skeleton-line-md"></view> <view class="skeleton-line skeleton-line-md skeleton-line-last"></view>
</view> </view>
</view> </view>
</view> </view>
<view class="skeleton-cell-item"> <view class="skeleton-cell-item skeleton-cell-item-last">
<view class="skeleton-row-with-avatar-small"> <view class="skeleton-row-with-avatar-small">
<view class="skeleton-avatar-square" style="margin-right: 8px"></view> <view class="skeleton-avatar-square" style="margin-right: 8px"></view>
<view class="skeleton-text-group-horizontal"> <view class="skeleton-text-group-horizontal">
<view class="skeleton-line skeleton-line-sm"></view> <view class="skeleton-line skeleton-line-sm"></view>
<view class="skeleton-line skeleton-line-md"></view> <view class="skeleton-line skeleton-line-md skeleton-line-last"></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -100,8 +100,11 @@ const props = defineProps<{ ...@@ -100,8 +100,11 @@ const props = defineProps<{
<style scoped> <style scoped>
.person-skeleton { .person-skeleton {
display: flex;
padding: 16px; padding: 16px;
flex-direction: column; flex-direction: column;
background-color: #F3F6FB;
box-sizing: border-box;
} }
.person-skeleton-landscape { .person-skeleton-landscape {
...@@ -130,12 +133,15 @@ const props = defineProps<{ ...@@ -130,12 +133,15 @@ const props = defineProps<{
/* 区块标题 */ /* 区块标题 */
.skeleton-section-title { .skeleton-section-title {
display: flex;
flex-direction: row;
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 4px; padding-left: 4px;
} }
/* Cell 组 */ /* Cell 组 */
.skeleton-cell-group { .skeleton-cell-group {
display: flex;
flex-direction: column; flex-direction: column;
} }
...@@ -144,7 +150,7 @@ const props = defineProps<{ ...@@ -144,7 +150,7 @@ const props = defineProps<{
margin-bottom: 12px; margin-bottom: 12px;
} }
.skeleton-cell-item:last-child { .skeleton-cell-item-last {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -160,7 +166,7 @@ const props = defineProps<{ ...@@ -160,7 +166,7 @@ const props = defineProps<{
margin-bottom: 8px; margin-bottom: 8px;
} }
.skeleton-line:last-child { .skeleton-line-last {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -209,24 +215,28 @@ const props = defineProps<{ ...@@ -209,24 +215,28 @@ const props = defineProps<{
/* ✅ 带头像的行布局(竖排) */ /* ✅ 带头像的行布局(竖排) */
.skeleton-row-with-avatar { .skeleton-row-with-avatar {
display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
/* ✅ 带小头像的行布局(竖排) */ /* ✅ 带小头像的行布局(竖排) */
.skeleton-row-with-avatar-small { .skeleton-row-with-avatar-small {
display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
/* ✅ 文本组(竖排) */ /* ✅ 文本组(竖排) */
.skeleton-text-group { .skeleton-text-group {
display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
} }
/* ✅ 文本组(横排) */ /* ✅ 文本组(横排) */
.skeleton-text-group-horizontal { .skeleton-text-group-horizontal {
display: flex;
flex: 1; flex: 1;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
...@@ -243,6 +253,7 @@ const props = defineProps<{ ...@@ -243,6 +253,7 @@ const props = defineProps<{
/* ✅ 左右分布的行 */ /* ✅ 左右分布的行 */
.skeleton-row-between { .skeleton-row-between {
display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
......
// 个人中心页面样式 - 高性能极简主义设计 v2.0
// ✅ 性能优化原则:零阴影、零动画、零复杂渐变
.person-page { .person-page {
width: 100%; width: 100%;
flex: 1; /* ✅ 通过 flex 自动填充父容器剩余空间 */ height: 100%;
background-color: var(--person-bg-page, #f8fafc); min-height: 0;
// padding: var(--person-page-padding, 0px); /* ✅ 通过 CSS 变量控制 */
box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: var(--person-bg-page, #f3f6fb);
box-sizing: border-box;
} }
// .person-scroll { .person-scroll {
// flex: 1; flex: 1;
// min-height: 0; min-height: 0;
// width: 100%; width: 100%;
// display: flex; box-sizing: border-box;
// flex-direction: column; }
// padding-bottom: var(--person-scroll-padding-bottom, 12px); /* ✅ 通过 CSS 变量控制 */
// }
/* ======================================== .person-scroll-body {
统一布局容器 - 通过 CSS 变量切换单列/分栏 width: 100%;
======================================== */ min-height: 100%;
.person-unified-layout {
flex:1;
display: flex; display: flex;
flex-direction: var(--person-layout-direction, column); /* ✅ 竖屏: column, 横屏: row */ flex-direction: column;
width: 100%; /* ✅ 确保占满宽度 */ padding-top: var(--person-page-padding-y, 12px);
padding: var(--person-container-padding) var(--person-container-padding) 0 var(--person-container-padding); padding-right: var(--person-page-padding-x, 14px);
// padding-bottom: var(--person-container-padding-bottom); padding-bottom: var(--person-page-padding-y, 12px);
background-color: var(--person-unified-layout-bg, transparent); /* ✅ 通过 CSS 变量控制 */ padding-left: var(--person-page-padding-x, 14px);
border-radius: var(--person-unified-layout-radius, 0px); /* ✅ 通过 CSS 变量控制 */ box-sizing: border-box;
// margin-bottom: var(--person-unified-layout-margin-bottom, 0px); /* ✅ 通过 CSS 变量控制 */
border: var(--person-unified-layout-border, none); /* ✅ 通过 CSS 变量控制 */
} }
/* ✅ 主面板(用户资料 + 账号信息) */ .person-dashboard {
.person-primary-panel { width: 100%;
flex: var(--person-primary-flex, none); /* ✅ 通过 CSS 变量控制 */
display: flex; display: flex;
flex-direction: row;
align-items: stretch;
margin-top: var(--person-section-gap, 12px);
}
.person-dashboard-first {
margin-top: 0;
}
.person-dashboard-portrait {
flex-direction: column; flex-direction: column;
} }
/* ✅ 竖屏时,AccountInfo 与 ProfileCard 之间添加间距 */ .person-primary-panel {
.account-info-with-gap { flex: 1;
margin-top: var(--person-section-gap, 16px); min-width: 0;
display: flex;
flex-direction: column;
} }
/* ✅ 次面板(常用功能) */
.person-secondary-panel { .person-secondary-panel {
flex: var(--person-secondary-flex, none); /* ✅ 通过 CSS 变量控制 */ flex-shrink: 0;
width: var(--person-side-panel-width, 360px);
margin-left: var(--person-section-gap, 12px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: var(--person-secondary-margin-top, 16px); /* ✅ 通过 CSS 变量控制 */
margin-left: var(--person-secondary-margin-left, 0px); /* ✅ 通过 CSS 变量控制 */
} }
.person-secondary-panel-portrait {
width: 100%;
/* ======================================== margin-top: var(--person-section-gap, 12px);
用户资料卡片 - 核心视觉焦点(已移至 ProfileCard 组件) margin-left: 0;
======================================== */
/* ========================================
区块容器(已移至 InfoSection 组件)
======================================== */
/* ========================================
间距工具类
======================================== */
.spacing-md {
height: var(--person-spacing-md, 12px);
} }
.spacing-lg { .person-stack-card {
height: var(--person-spacing-lg, 16px); width: 100%;
border-radius: var(--person-radius-lg, 18px);
border-width: 1px;
border-style: solid;
border-color: var(--person-card-border, #e2e8f0);
background-color: var(--person-bg-card, #ffffff);
padding: var(--person-panel-padding, 14px);
box-sizing: border-box;
margin-top: var(--person-section-gap, 12px);
} }
.person-stack-card-first {
margin-top: 0;
}
/* ======================================== .device-id-panel {
APP 编码页脚 - 固定在 scroll-view 底部正中间 width: auto;
======================================== */ height: var(--person-device-panel-height, 48px);
.device-id-footer { margin-top: 8px;
flex: 0; margin-right: var(--person-page-padding-x, 14px);
margin-bottom: var(--person-page-padding-y, 12px);
margin-left: var(--person-page-padding-x, 14px);
// border-radius: 14px;
// border-width: 1px;
// border-style: solid;
// border-color: var(--person-card-border, #e2e8f0);
// background-color: var(--person-bg-card, #ffffff);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center;
align-items: center; align-items: center;
padding: 16px 20px; /* ✅ 添加内边距 */ justify-content: center;
margin-top: var(--person-section-gap, 16px); /* ✅ 与上方内容保持间距 */ box-sizing: border-box;
cursor: pointer; flex-shrink: 0;
transition: background-color 0.15s ease;
height: var(--person-footer-height, 40px);
} }
/* ✅ 点击反馈 */ .device-id-panel-hover {
.device-id-footer:active { opacity: 0.92;
background-color: rgba(0, 0, 0, 0.03);
} }
.device-id-footer-text { .device-id-panel-text {
font-size: 14px; font-size: 13px;
color: #9ca3af; line-height: 18px;
font-family: 'Courier New', monospace; /* ✅ 等宽字体 */ color: var(--person-text-tertiary, #94a3b8);
letter-spacing: 0.3px;
margin-right: 6px; margin-right: 6px;
} }
// 个人中心响应式样式配置 - 企业级设计规范 v2.0
export default { export default {
common: { common: {
// 品牌色彩系统 - 科技蓝主题 '--person-primary': '#2c66f7',
'--person-primary': '#2f6af7', '--person-primary-soft': '#eef4ff',
'--person-primary-light': '#e8f0ff',
'--person-success': '#10b981', '--person-success': '#10b981',
'--person-warning': '#f59e0b', '--person-text-primary': '#0f172a',
'--person-error': '#ef4444', '--person-text-secondary': '#475569',
// 中性色阶
'--person-text-primary': '#1a2433',
'--person-text-secondary': '#64748b',
'--person-text-tertiary': '#94a3b8', '--person-text-tertiary': '#94a3b8',
'--person-border': '#dfe9f7', '--person-border': '#dbe4f0',
'--person-card-border': '#e2e8f0',
'--person-bg-page': '#f3f6fb',
'--person-bg-card': '#ffffff', '--person-bg-card': '#ffffff',
'--person-bg-page': '#f8fafc', '--person-bg-soft': '#f8fbff',
'--person-bg-hover': '#f1f5f9', '--person-radius-lg': '18px',
'--person-radius-md': '14px',
// ✅ 性能优化:移除所有阴影定义,使用边框替代层级区分 '--person-radius-sm': '10px',
// '--person-shadow-sm': '0 2px 8px rgba(0, 0, 0, 0.04)', '--person-page-padding-x': '16px',
// '--person-shadow-md': '0 4px 16px rgba(0, 0, 0, 0.08)', '--person-page-padding-y': '14px',
'--person-section-gap': '12px',
// 圆角系统 '--person-banner-padding': '14px',
'--person-radius-sm': '8px', '--person-panel-padding': '14px',
'--person-radius-md': '12px', '--person-profile-padding': '16px',
'--person-radius-lg': '16px', '--person-avatar-size': '56px',
'--person-radius-xl': '20px', '--person-avatar-font-size': '22px',
'--person-name-size': '22px',
// 间距系统 '--person-meta-size': '13px',
'--person-spacing-xs': '4px', '--person-section-title-size': '16px',
'--person-spacing-sm': '8px', '--person-section-desc-size': '12px',
'--person-spacing-md': '12px', '--person-row-height': '52px',
'--person-spacing-lg': '16px', '--person-row-label-width': '72px',
'--person-spacing-xl': '24px', '--person-device-panel-height': '48px',
'--person-spacing-2xl': '32px' '--person-side-panel-width': '360px'
'--person-footer-height': '36px'
}, },
portrait: { portrait: {
// 竖屏布局参数 - 单列流式布局 '--person-page-padding-x': '14px',
'--person-container-padding': '20px', '--person-page-padding-y': '12px',
'--person-container-padding-bottom': '0' '--person-section-gap': '12px',
'--person-section-gap': '16px', '--person-banner-padding': '14px',
'--person-panel-padding': '14px',
// ✅ 统一布局控制:竖屏单列(column) '--person-profile-padding': '16px',
'--person-layout-direction': 'column', '--person-avatar-size': '54px',
'--person-primary-flex': 'none', /* ✅ 竖屏不占据剩余空间,自然高度(flex: none = 0 0 auto) */ '--person-avatar-font-size': '20px',
'--person-secondary-flex': 'none', /* ✅ 竖屏不占据剩余空间,自然高度(flex: none = 0 0 auto) */ '--person-name-size': '20px',
// ✅ 页面边距控制
'--person-page-padding': '0px', /* ✅ 竖屏无内边距 */
// ✅ scroll-view 底部留白
'--person-scroll-padding-bottom': '12px',
// ✅ 统一布局容器样式(竖屏无背景、无圆角)
'--person-unified-layout-bg': 'transparent',
'--person-unified-layout-radius': '0px',
'--person-unified-layout-border': 'none',
'--person-unified-layout-margin-bottom': '0px',
// ✅ 次面板间距(竖屏使用 margin-top)
'--person-secondary-margin-top': '16px',
'--person-secondary-margin-left': '0px',
// 用户资料卡片
'--person-profile-padding': '14px',
'--person-avatar-size': '52px',
'--person-name-size': '19px',
'--person-meta-size': '13px', '--person-meta-size': '13px',
'--person-shop-label-size': '12px', '--person-row-height': '50px',
'--person-shop-value-size': '14px', '--person-row-label-width': '64px',
'--person-side-panel-width': '100%'
// 区块标题
'--person-section-title-size': '15px',
'--person-section-title-weight': '600',
// 列表项
'--person-cell-height': '48px',
'--person-cell-title-size': '15px',
'--person-cell-value-size': '14px',
'--person-cell-icon-size': '18px',
}, },
landscape: { landscape: {
// 横屏布局参数 - 左右分栏布局 '--person-page-padding-x': '18px',
'--person-container-padding': '24px', '--person-page-padding-y': '12px',
'--person-container-padding-bottom': '24px' '--person-section-gap': '14px',
'--person-section-gap': '20px', '--person-banner-padding': '16px',
'--person-panel-padding': '16px',
// ✅ 统一布局控制:横屏分栏(row) '--person-profile-padding': '18px',
'--person-layout-direction': 'row', '--person-avatar-size': '62px',
'--person-primary-flex': '1', /* ✅ 横屏占据剩余空间 */ '--person-avatar-font-size': '24px',
'--person-secondary-flex': '1', /* ✅ 横屏占据剩余空间 */
// ✅ 页面边距控制
'--person-page-padding': '12px', /* ✅ 横屏有内边距 */
// ✅ scroll-view 底部不留白
'--person-scroll-padding-bottom': '0px',
// ✅ 统一布局容器样式(横屏有背景、圆角、边框)
'--person-unified-layout-bg': '#ffffff',
'--person-unified-layout-radius': '20px',
'--person-unified-layout-border': '1px solid #dfe9f7',
'--person-unified-layout-margin-bottom': '12px',
// ✅ 次面板间距(横屏使用 margin-left)
'--person-secondary-margin-top': '0px',
'--person-secondary-margin-left': '16px',
// 用户资料卡片(更大更醒目)
'--person-profile-padding': '24px',
'--person-avatar-size': '72px',
'--person-name-size': '24px', '--person-name-size': '24px',
'--person-meta-size': '15px', '--person-meta-size': '14px',
'--person-shop-label-size': '14px', '--person-row-height': '54px',
'--person-shop-value-size': '16px', '--person-row-label-width': '78px',
'--person-side-panel-width': '360px'
// 区块标题
'--person-section-title-size': '17px',
'--person-section-title-weight': '600',
// 列表项
'--person-cell-height': '56px',
'--person-cell-title-size': '16px',
'--person-cell-value-size': '15px',
'--person-cell-icon-size': '22px',
}, },
resolutions: { resolutions: {
// iPad 横屏优化 (1024x768) 'portrait-393x816': {
'landscape-1024x768': { '--person-page-padding-x': '12px',
'--person-container-padding': '32px', '--person-page-padding-y': '10px',
'--person-section-gap': '24px', '--person-section-gap': '10px'
'--person-avatar-size': '72px',
'--person-name-size': '24px',
'--person-profile-padding': '24px',
},
// 小屏 Pad 横屏 (816x393)
'landscape-816x393': {
'--person-container-padding': '16px',
'--person-section-gap': '12px',
'--person-avatar-size': '56px',
'--person-name-size': '20px',
'--person-profile-padding': '16px',
}, },
// 大屏手机竖屏 (414x896)
'portrait-414x896': { 'portrait-414x896': {
'--person-container-padding': '24px', '--person-page-padding-x': '14px'
}, },
'landscape-816x393': {
// iPhone 14 Pro 竖屏 (393x816) '--person-page-padding-x': '10px',
'portrait-393x816': { '--person-page-padding-y': '8px',
'--person-container-padding': '20px', '--person-banner-padding': '12px',
'--person-panel-padding': '12px',
'--person-profile-padding': '14px',
'--person-avatar-size': '52px',
'--person-avatar-font-size': '20px',
'--person-name-size': '20px',
'--person-row-height': '48px',
'--person-side-panel-width': '320px'
}, },
// 矮屏设备横屏优化 (如 iPad Mini 横屏 1024x640)
'landscape-1024x640': { 'landscape-1024x640': {
'--person-container-padding': '16px', '--person-side-panel-width': '332px'
'--person-section-gap': '12px',
'--person-avatar-size': '56px',
'--person-name-size': '20px',
'--person-meta-size': '13px',
'--person-profile-padding': '14px',
'--person-cell-height': '44px',
}, },
'portrait-640x1024': { 'landscape-1024x768': {
'--person-section-gap': '12px', '--person-page-padding-x': '20px',
'--person-side-panel-width': '372px'
}, },
'landscape-1174x768': {
'--person-page-padding-x': '22px',
'--person-side-panel-width': '392px'
}
} }
} }
...@@ -53,7 +53,7 @@ const navbarStyle = computed((): UTSJSONObject => { ...@@ -53,7 +53,7 @@ const navbarStyle = computed((): UTSJSONObject => {
const top = raw != null ? parseInt(`${raw}`) : 0; const top = raw != null ? parseInt(`${raw}`) : 0;
return { return {
paddingTop: `${top}px`, paddingTop: `${top}px`,
height: `${(top || 44) + 44}px` height: `${(top) + 44}px`
} as UTSJSONObject; } as UTSJSONObject;
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!