Commit 561a5068 by liimin

feat(ui): 优化多个组件的视觉设计和交互反馈

- 重构首页"开始接待"按钮样式,增加渐变、阴影和按压动效
- 统一优化选择组件(车品牌、销售员、商户列表等)的视觉风格,采用浅灰背景和主题色描边
- 改进骨架屏布局,使用分块设计提升加载体验
- 移除冗余的全局loading调用,改为组件内状态管理
- 更新权益页轮播图组件,使用uview-unix的un-swiper并优化覆盖层样式
1 parent 06a3fa52
...@@ -7,24 +7,17 @@ ...@@ -7,24 +7,17 @@
:title="currentView == 'brand' ? '请选择车品牌' : '请选择车系'" :title="currentView == 'brand' ? '请选择车品牌' : '请选择车系'"
:z-index="10076" :z-index="10076"
@close="handleMessageBoxClose"> @close="handleMessageBoxClose">
<!-- 自定义返回按钮 -->
<!-- <view v-if="showBackButton"
class="custom-back-btn"
@click="handleBackClick
<un-icon name="arrow-left" size="20"></un-icon>">
</vie -->
<scroll-view class="select-box" <scroll-view class="select-box"
:show-scrollbar="false" :show-scrollbar="false"
:style="{ maxHeight: windowHeight * 0.6 + 'px' }"> :style="{ maxHeight: windowHeight * 0.6 + 'px' }">
<!-- <view class="select-box"> -->
<!-- 品牌列表 --> <!-- 品牌列表 -->
<view v-show="currentView == 'brand'" class="view-content"> <view v-show="currentView == 'brand'" class="view-content">
<template v-for="(item, index) in carBrandList" <template v-for="(item, index) in carBrandList"
:key="index"> :key="index">
<view class="select-item" <view class="select-item"
:class="[{ checked: selectedBrandIndex == index }]" :class="[{ 'is-active': selectedBrandIndex == index }]"
@click="selectBrand(item, index)"> @click="selectBrand(item, index)">
<text class="select-item-text">{{ (item as UTSJSONObject).name }}</text> <text class="select-item-text" :class="[{ 'is-active-text': selectedBrandIndex == index }]">{{ (item as UTSJSONObject).name }}</text>
</view> </view>
</template> </template>
</view> </view>
...@@ -34,17 +27,15 @@ ...@@ -34,17 +27,15 @@
<template v-for="(item, index) in currentCarList" <template v-for="(item, index) in currentCarList"
:key="index"> :key="index">
<view class="select-item" <view class="select-item"
:class="[{ checked: carModel == (item as UTSJSONObject).name }]" :class="[{ 'is-active': carModel == (item as UTSJSONObject).name }]"
@click="handleSelect(item)"> @click="handleSelect(item)">
<text class="select-item-text">{{ (item as UTSJSONObject).name }}</text> <text class="select-item-text" :class="[{ 'is-active-text': carModel == (item as UTSJSONObject).name }]">{{ (item as UTSJSONObject).name }}</text>
</view> </view>
</template> </template>
</view> </view>
<!-- </un-transition> -->
</scroll-view> </scroll-view>
</MessageBox> </MessageBox>
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -386,49 +377,57 @@ defineExpose({ open, close, autoSelect }); ...@@ -386,49 +377,57 @@ defineExpose({ open, close, autoSelect });
<style scoped lang='scss'> <style scoped lang='scss'>
.select-box { .select-box {
margin: 20px 0; margin: 16px 0;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 0; min-height: 0;
flex: 1; flex: 1;
}
.view-content { .view-content {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
}
.select-item { .select-item {
width: 49%; width: 48%; /* 给元素间留一点呼吸空间,避免 49% 可能产生的换行问题 */
margin-right: 0; margin-bottom: 12px;
margin-bottom: 16px; height: 44px; /* 加高触控面积,显得更大气 */
height: 34px; background-color: #f8f9fa; /* 低调的浅灰背景 */
opacity: 1; border-radius: 8px; /* 圆角增加现代感 */
border: 1px solid #dce0e6;
border-radius: 4px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid transparent;
&.checked { transition: background-color 0.2s ease, border-color 0.2s ease;
border: 1px solid #292d33;
}
}
} }
.fade-in-left { /* 悬浮反馈 */
.select-item:active {
background-color: #f1f3f5;
} }
.fade-in-right { /* 选中状态 */
} .is-active {
background-color: rgba(22, 119, 255, 0.05); /* 淡淡的主题色背景 */
border: 1px solid rgba(22, 119, 255, 0.3); /* 主题色描边 */
} }
.select-item-text { .select-item-text {
text-align: center; text-align: center;
color: #333; color: #495057; /* 稳重的深灰色 */
font-size: 16px; font-size: 15px;
line-height: 22px; line-height: 20px;
font-weight: 500;
}
.is-active-text {
color: #1677FF; /* 选中时的文字色与边框呼应 */
font-weight: 600;
} }
</style> </style>
<template> <template>
<MessageBox ref="employeeBoxVisible" <MessageBox ref="employeeBoxVisible"
:is-footer="false" :is-footer="false"
:max-height="1000"
position="bottom" position="bottom"
:title="`请选择${title}`" :title="`请选择${title}`"
:z-index="10076" :z-index="10076"
...@@ -9,13 +8,15 @@ ...@@ -9,13 +8,15 @@
<scroll-view class="select-box" <scroll-view class="select-box"
:show-scrollbar="false" :show-scrollbar="false"
:style="{ maxHeight: windowHeight * 0.6 + 'px' }"> :style="{ maxHeight: windowHeight * 0.6 + 'px' }">
<view class="view-content">
<template v-for="(item, index) in employeeList" :key="index"> <template v-for="(item, index) in employeeList" :key="index">
<view class="select-item" <view class="select-item"
:class="[{ checked: (salesUuid as string) == (item as UTSJSONObject).uuid }]" :class="[{ 'is-active': (salesUuid as string) == (item as UTSJSONObject).uuid }]"
@click="handleSelect(item)"> @click="handleSelect(item)">
<text class="select-item-text">{{ (item as UTSJSONObject).staffName }}</text> <text class="select-item-text" :class="[{ 'is-active-text': (salesUuid as string) == (item as UTSJSONObject).uuid }]">{{ (item as UTSJSONObject).staffName }}</text>
</view> </view>
</template> </template>
</view>
</scroll-view> </scroll-view>
</MessageBox> </MessageBox>
</template> </template>
...@@ -24,18 +25,18 @@ ...@@ -24,18 +25,18 @@
import { ComponentPublicInstance, computed, ref, watch } from "vue"; import { ComponentPublicInstance, computed, ref, watch } from "vue";
import { getEmployeeListApi } from "@/api/common-api.uts"; import { getEmployeeListApi } from "@/api/common-api.uts";
import { resolutionState } from "@/services/adapter/index.uts";
import { dispatch, state } from "@/store/index.uts"; import { dispatch, state } from "@/store/index.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import MessageBox from "./MessageBox.uvue"; import MessageBox from "./MessageBox.uvue";
import { resolutionState } from "@/services/adapter/index.uts";
import { computed } from "vue"; type Props = {
type Props = {
salesPropsUuid?: string salesPropsUuid?: string
title?: string title?: string
} }
type UserInfo = UTSJSONObject
type UserInfo = UTSJSONObject
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
title: "销售", title: "销售",
...@@ -44,9 +45,9 @@ const props = withDefaults(defineProps<Props>(), { ...@@ -44,9 +45,9 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits(["close", "select"]); const emit = defineEmits(["close", "select"]);
const employeeBoxVisible = ref(null); const employeeBoxVisible = ref<ComponentPublicInstance | null>(null);
const watchStatus = computed(() => { const watchStatus = computed<boolean>(() => {
const status = state.user?.historyStatus; const status = state.user?.historyStatus;
if (status == null) { if (status == null) {
return false; return false;
...@@ -56,30 +57,31 @@ const watchStatus = computed(() => { ...@@ -56,30 +57,31 @@ const watchStatus = computed(() => {
return false; return false;
} }
}); });
const updateView = ref<number>(Date.now()); const updateView = ref<number>(Date.now());
const salesUuid = computed(() => { const salesUuid = computed<string>(() => {
const val1 = state.user.customerInfo.salesUuid; const val1 = state.user.customerInfo.salesUuid;
const val2 = props.salesPropsUuid; const val2 = props.salesPropsUuid;
return val1 !== null && val1 !== "" ? val1 : val2; return val1 !== null && val1 !== "" ? (val1 as string) : val2;
}); });
const windowHeight = computed(() => resolutionState.windowHeight);
// const employeeList = computed(() => { const windowHeight = computed<number>(() => resolutionState.windowHeight);
// return state.user.employeeList
// })
const employeeList = ref<Array<any>>([]); const employeeList = ref<Array<any>>([]);
watch(updateView.value, ()=>{
const list = storage.get("employeeList") as UTSArray<Any>;
employeeList.value = list != null ? list : [];
watch(updateView, () => {
const list = storage.get("employeeList") as UTSArray<Any>;
employeeList.value = list != null ? (list as Array<any>) : [];
}, { immediate: true, deep: true }); }, { immediate: true, deep: true });
function close(): void { function close(): void {
if (employeeBoxVisible.value != null) { if (employeeBoxVisible.value != null) {
(employeeBoxVisible.value as ComponentPublicInstance).$callMethod("close"); (employeeBoxVisible.value as ComponentPublicInstance).$callMethod("close");
} }
} }
watch(watchStatus.value, () => { watch(watchStatus, () => {
close(); close();
}, { immediate: true }); }, { immediate: true });
...@@ -97,12 +99,11 @@ function open(): void { ...@@ -97,12 +99,11 @@ function open(): void {
// 获取销售人员列表 // 获取销售人员列表
getEmployeeListApi({ merchantId: shopMerchantId }).then((res: any) => { getEmployeeListApi({ merchantId: shopMerchantId }).then((res: any) => {
const employeeList = res as Array<any>; const list = res as Array<any>;
dispatch("setEmployeeList", employeeList); dispatch("setEmployeeList", list);
const listToStore = employeeList != null ? employeeList : []; const listToStore = list != null ? list : [];
storage.set("employeeList", listToStore, 0); storage.set("employeeList", listToStore, 0);
updateView.value = Date.now(); updateView.value = Date.now();
}); });
} }
...@@ -111,43 +112,63 @@ function handleSelect(item: any): void { ...@@ -111,43 +112,63 @@ function handleSelect(item: any): void {
emit("select", item); emit("select", item);
} }
defineExpose({ open, close }); defineExpose({ open, close });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.select-box { .select-box {
margin: 20px 0; margin: 16px 0;
position: relative;
display: flex;
flex-direction: column;
min-height: 0;
flex: 1;
padding-bottom: 30px;
}
.view-content {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
max-height: 400px; width: 100%;
padding-bottom: 30px; }
.select-item { .select-item {
width: 49%; width: 48%; /* 预留间距,避免49%引起的意外换行 */
/* width: 23.5%; */ margin-bottom: 12px;
margin-right: 0; height: 44px; /* 加高触控面积,显得更大气 */
margin-bottom: 16px; background-color: #f8f9fa; /* 低调的浅灰背景 */
height: 34px; border-radius: 8px; /* 圆角增加现代感 */
opacity: 1;
border: 1px solid #dce0e6;
border-radius: 4px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid transparent;
&.checked { transition: background-color 0.2s ease, border-color 0.2s ease;
border: 1px solid #292d33;
} }
/* 悬浮反馈 */
.select-item:active {
background-color: #f1f3f5;
} }
/* 选中状态 */
.is-active {
background-color: rgba(22, 119, 255, 0.05); /* 淡淡的主题色背景 */
border: 1px solid rgba(22, 119, 255, 0.3); /* 主题色描边 */
} }
.select-item-text { .select-item-text {
text-align: center; text-align: center;
color: #333; color: #495057; /* 稳重的深灰色 */
font-size: 16px; font-size: 15px;
line-height: 22px; line-height: 20px;
font-weight: 500;
}
.is-active-text {
color: #1677FF; /* 选中时的文字色与边框呼应 */
font-weight: 600;
} }
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view v-if="isPortraitMode" class="right-side"> <view v-if="isPortraitMode" class="right-side">
<!-- 横屏三卡片布局:轻改等使用 swiperCustom --> <!-- 横屏三卡片布局:轻改等使用 swiperCustom -->
<view v-if="useCardLayout && tabIndex == 0" class="app-content-box right-content show-content-box"> <view v-if="useCardLayout && tabIndex == 0" class="app-content-box right-content show-content-box">
<view class="start" @click="onStartClick"> <view class="start" hover-class="start-hover" @click="onStartClick">
<view class="start-inner"> <view class="start-inner">
<text class="start-text">开始接待</text> <text class="start-text">开始接待</text>
</view> </view>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<view v-else class="right-side"> <view v-else class="right-side">
<!-- 横屏三卡片布局:轻改等使用 swiperCustom --> <!-- 横屏三卡片布局:轻改等使用 swiperCustom -->
<view v-if="useCardLayout && tabIndex == 0" class="app-content-box right-content show-content-box"> <view v-if="useCardLayout && tabIndex == 0" class="app-content-box right-content show-content-box">
<view class="start" @click="onStartClick"> <view class="start" hover-class="start-hover" @click="onStartClick">
<view class="start-inner"> <view class="start-inner">
<text class="start-text">开始接待</text> <text class="start-text">开始接待</text>
</view> </view>
...@@ -314,21 +314,30 @@ defineExpose({ ...@@ -314,21 +314,30 @@ defineExpose({
padding: 0 var(--l-spacing-xl) 0 var(--l-spacing-md); padding: 0 var(--l-spacing-xl) 0 var(--l-spacing-md);
} }
/* 与旧项目一致:背景图铺满,文字居中偏上,无渐变遮罩 */ /* 开始接待按钮:重新设计,更大气、更有视觉冲击力和核心操作感 */
.start { .start {
height: 86px; height: 96px; /* 增加高度 */
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: flex-start; align-items: center; /* 居中对齐 */
padding-top: 36px;
overflow: hidden; overflow: hidden;
flex-shrink: 0; flex-shrink: 0;
min-width: 140px; min-width: 140px;
border-radius: 18px; border-radius: 24px; /* 更大的圆角 */
background: #5b8cff; background-image: linear-gradient(to right bottom, #1677ff, #469cff); /* 渐变蓝,更显质感。UniApp X 中需使用完整的 background-image 语法 */
box-shadow: 0 8px 24px rgba(22, 119, 255, 0.25); /* 增加弥散阴影 */
transition-property: transform, box-shadow, opacity;
transition-duration: 0.15s; /* 缩短过渡时间,让按压感更直接和强烈 */
transition-timing-function: ease-out; /* 使用 ease-out 让反馈更利落 */
}
.start-hover {
transform: scale(0.92); /* 显著加大缩放比例,营造强烈的按压感 */
box-shadow: 0 2px 8px rgba(22, 119, 255, 0.1); /* 阴影大幅度减小,模拟完全按下贴合屏幕 */
opacity: 0.8; /* 颜色加深更明显 */
} }
.start-inner { .start-inner {
...@@ -339,16 +348,16 @@ defineExpose({ ...@@ -339,16 +348,16 @@ defineExpose({
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0; padding: 0;
background: transparent; background-color: transparent;
border-radius: 0;
box-shadow: none;
} }
.start-text { .start-text {
font-size: 16px; font-size: 22px; /* 增大字号 */
font-weight: 600; font-weight: bold; /* 加粗 */
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
/* UniApp X 对于 letter-spacing 可能兼容性有限,但在大部分情况下正常 */
letter-spacing: 2px;
} }
.right-content-box { .right-content-box {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<layout-root> <layout-root>
<view class="page-container account-page"> <view class="page-container account-page fade-in">
<view class="bg"> <view class="bg">
<image class="bg-image" <image class="bg-image"
mode="aspectFill" mode="aspectFill"
......
<template> <template>
<!-- 保持单根节点,确保父组件 v-show 生效 --> <!-- 保持单根节点,确保父组件 v-show 生效 -->
<view> <view class="fade-in-up">
<view v-if="!flag" class="skeleton-wrap"> <view v-if="!flag" class="skeleton-wrap">
<un-skeleton :animate="true" <un-skeleton :animate="true"
:loading="true" :loading="true"
rows="6"> rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton> </un-skeleton>
</view> </view>
<view v-else class="box"> <view v-else class="box">
...@@ -23,7 +45,6 @@ ...@@ -23,7 +45,6 @@
<text class="name">{{ item.merchantName }}</text> <text class="name">{{ item.merchantName }}</text>
<text class="shop_no">商户号:{{ item.merchantId }}</text> <text class="shop_no">商户号:{{ item.merchantId }}</text>
</view> </view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -148,18 +169,12 @@ function get4SStoreList(loginUserObj: UTSJSONObject): void { ...@@ -148,18 +169,12 @@ function get4SStoreList(loginUserObj: UTSJSONObject): void {
function selectAccountLogin(id: string, merchantName: string, userInfo: AccountItem | null): void { function selectAccountLogin(id: string, merchantName: string, userInfo: AccountItem | null): void {
console.log(`选择账号${merchantName}登录!`); console.log(`选择账号${merchantName}登录!`);
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = { const params: UTSJSONObject = {
id id
}; };
apiSelectAccountLogin(params).then((res: UTSJSONObject): void => { apiSelectAccountLogin(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("selectAccountLogin 返回数据:", res); console.log("selectAccountLogin 返回数据:", res);
const code = res.code as null | string; const code = res.code as null | string;
...@@ -187,7 +202,6 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI ...@@ -187,7 +202,6 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
}); });
} }
}).catch((error: any | null): void => { }).catch((error: any | null): void => {
uni.hideLoading();
console.error("selectAccountLogin 失败:", error); console.error("selectAccountLogin 失败:", error);
uni.showToast({ uni.showToast({
title: "网络异常,请稍后重试", title: "网络异常,请稍后重试",
...@@ -276,16 +290,9 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -276,16 +290,9 @@ function getListSelectAccount(autoLogin: boolean): void {
console.log("进入选择账号页面!autoLogin:", autoLogin); console.log("进入选择账号页面!autoLogin:", autoLogin);
flag.value = false; flag.value = false;
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = {}; const params: UTSJSONObject = {};
apiGetListSelectAccount(params).then((res: UTSJSONObject): void => { apiGetListSelectAccount(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("getListSelectAccount 返回数据:", res); console.log("getListSelectAccount 返回数据:", res);
const code = res.code as null | string; const code = res.code as null | string;
...@@ -358,7 +365,6 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -358,7 +365,6 @@ function getListSelectAccount(autoLogin: boolean): void {
flag.value = true; flag.value = true;
} }
}).catch((error: any | null): void => { }).catch((error: any | null): void => {
uni.hideLoading();
flag.value = true; flag.value = true;
console.error("getListSelectAccount 失败:", error); console.error("getListSelectAccount 失败:", error);
uni.showToast({ uni.showToast({
...@@ -383,6 +389,7 @@ onMounted(() => { ...@@ -383,6 +389,7 @@ onMounted(() => {
.skeleton-wrap { .skeleton-wrap {
padding: 24px; padding: 24px;
width: 100%; width: 100%;
box-sizing: border-box;
} }
.box { .box {
...@@ -391,20 +398,26 @@ onMounted(() => { ...@@ -391,20 +398,26 @@ onMounted(() => {
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 24px; padding: 0 24px;
justify-content: space-between; justify-content: space-between;
width: 100%;
box-sizing: border-box;
.items { .items {
width: 48%; width: 48%; /* 避免 49% 导致挤换行 */
margin-bottom: 24px; margin-bottom: 16px;
height: 80px; height: 84px; /* 增加一点高度更饱满 */
background: #ffffff; background: #f8f9fa; /* 浅灰底色 */
border-radius: 8px; border-radius: 12px; /* 更大圆角 */
padding: 16px; padding: 16px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
border: 2px solid transparent; border: 1px solid transparent;
transition: background-color 0.25s ease, border-color 0.25s ease;
&:active {
background: #f1f3f5;
}
.left { .left {
flex: 1; flex: 1;
...@@ -413,19 +426,19 @@ onMounted(() => { ...@@ -413,19 +426,19 @@ onMounted(() => {
justify-content: center; justify-content: center;
.name { .name {
font-weight: 500; font-weight: 600;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: 16px; font-size: 16px;
color: #181a1f; color: #495057; /* 深灰文字 */
} }
.shop_no { .shop_no {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 13px;
margin-top: 6px; margin-top: 6px;
color: #999ea8; color: #868e96;
} }
} }
...@@ -439,7 +452,7 @@ onMounted(() => { ...@@ -439,7 +452,7 @@ onMounted(() => {
.midle { .midle {
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 4px; border-radius: 24px; /* 圆形角色标更柔和 */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -453,49 +466,39 @@ onMounted(() => { ...@@ -453,49 +466,39 @@ onMounted(() => {
} }
.midle_1 { .midle_1 {
background-color: #f247241a; background-color: rgba(242, 71, 36, 0.08);
.midle-text { color: #f24724; }
.midle-text {
color: #f24724;
}
} }
.midle_2 { .midle_2 {
background-color: #ff9d0a1a; background-color: rgba(255, 157, 10, 0.08);
.midle-text { color: #ff9d0a; }
.midle-text {
color: #ff9d0a;
}
} }
.midle_3 { .midle_3 {
background-color: #347bff1a; background-color: rgba(52, 123, 255, 0.08);
.midle-text { color: #347bff; }
.midle-text {
color: #347bff;
}
} }
.midle_4 { .midle_4 {
background-color: #35c3761a; background-color: rgba(53, 195, 118, 0.08);
.midle-text { color: #35c376; }
.midle-text {
color: #35c376;
}
} }
.midle_5 { .midle_5 {
background-color: #35c3761a; background-color: rgba(53, 195, 118, 0.08);
.midle-text { color: #35c376; }
.midle-text {
color: #35c376;
}
} }
} }
} }
.active { .active {
border: 2px solid #347bff; background-color: rgba(22, 119, 255, 0.05); /* 淡淡主题色背景 */
border: 1px solid rgba(22, 119, 255, 0.3); /* 主题色细边框 */
.left .name {
color: #1677FF; /* 选中文字变蓝 */
}
} }
} }
</style> </style>
<template> <template>
<view class="fade-in-up">
<view v-if="!flag" class="skeleton-wrap"> <view v-if="!flag" class="skeleton-wrap">
<un-skeleton :animate="true" <un-skeleton :animate="true"
:loading="true" :loading="true"
rows="6"> rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton> </un-skeleton>
</view> </view>
<view v-if="flag" class="box"> <view v-if="flag" class="box">
...@@ -23,6 +46,7 @@ ...@@ -23,6 +46,7 @@
</template> </template>
<no-data v-else /> <no-data v-else />
</view> </view>
</view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -52,14 +76,12 @@ function jumpPage(item: MerchantItem, openSceneArr: number[]): void { ...@@ -52,14 +76,12 @@ function jumpPage(item: MerchantItem, openSceneArr: number[]): void {
const currentUserInfo = userInfo; const currentUserInfo = userInfo;
if (currentUserInfo == null) { if (currentUserInfo == null) {
uni.hideLoading();
return; return;
} }
if (openSceneArr.length === 0) { if (openSceneArr.length === 0) {
const isSuper = currentUserInfo.isSuper as boolean | null; const isSuper = currentUserInfo.isSuper as boolean | null;
if (isSuper != true) { if (isSuper != true) {
uni.hideLoading();
uni.showToast({ title: "暂无开通业务,请联系总部管理员", icon: "none" }); uni.showToast({ title: "暂无开通业务,请联系总部管理员", icon: "none" });
return; return;
} }
...@@ -105,17 +127,14 @@ function jumpPage(item: MerchantItem, openSceneArr: number[]): void { ...@@ -105,17 +127,14 @@ function jumpPage(item: MerchantItem, openSceneArr: number[]): void {
} }
newUserInfo.sceneType = usedCarSceneType; newUserInfo.sceneType = usedCarSceneType;
storage.set("userInfo", newUserInfo, 0); storage.set("userInfo", newUserInfo, 0);
uni.hideLoading();
uni.reLaunch({ url: "/pages/usedCar/index" }); uni.reLaunch({ url: "/pages/usedCar/index" });
}).catch((error): void => { }).catch((error): void => {
uni.hideLoading();
uni.showToast({ title: "网络异常", icon: "none" }); uni.showToast({ title: "网络异常", icon: "none" });
}); });
return; return;
} }
emit("chooseMerchant", newUserInfo); emit("chooseMerchant", newUserInfo);
uni.hideLoading();
} }
function getSceneArr(shopMerchantId: string): Promise<number[]> { function getSceneArr(shopMerchantId: string): Promise<number[]> {
...@@ -168,7 +187,6 @@ function getSceneArr(shopMerchantId: string): Promise<number[]> { ...@@ -168,7 +187,6 @@ function getSceneArr(shopMerchantId: string): Promise<number[]> {
function chooseMerchantItem(item: MerchantItem): void { function chooseMerchantItem(item: MerchantItem): void {
console.log(`选择4s店${ item.merchantName }!`); console.log(`选择4s店${ item.merchantName }!`);
uni.showLoading({ title: "加载中", mask: false });
const list = loginUserInfoList.value; const list = loginUserInfoList.value;
let i = 0; let i = 0;
...@@ -194,8 +212,6 @@ function getMerchantList(): void { ...@@ -194,8 +212,6 @@ function getMerchantList(): void {
return; return;
} }
uni.showLoading({ title: "加载中", mask: false });
const isSuper = currentUserInfo.isSuper as boolean | null; const isSuper = currentUserInfo.isSuper as boolean | null;
const params: UTSJSONObject = { const params: UTSJSONObject = {
merchantId: isSuper == true ? "" : `${currentUserInfo.merchantId ?? ""}`, merchantId: isSuper == true ? "" : `${currentUserInfo.merchantId ?? ""}`,
...@@ -203,8 +219,6 @@ function getMerchantList(): void { ...@@ -203,8 +219,6 @@ function getMerchantList(): void {
}; };
apiGetSceneMerchantRefStoreList(params).then((res: any): void => { apiGetSceneMerchantRefStoreList(params).then((res: any): void => {
uni.hideLoading();
const code = (res as UTSJSONObject).code as null | string; const code = (res as UTSJSONObject).code as null | string;
if (code == "0") { if (code == "0") {
const data = (res as UTSJSONObject).data as any[] | null; const data = (res as UTSJSONObject).data as any[] | null;
...@@ -240,7 +254,6 @@ function getMerchantList(): void { ...@@ -240,7 +254,6 @@ function getMerchantList(): void {
uni.showToast({ title: msg ?? "获取4S店列表失败", icon: "none" }); uni.showToast({ title: msg ?? "获取4S店列表失败", icon: "none" });
} }
}).catch((error) => { }).catch((error) => {
uni.hideLoading();
flag.value = true; flag.value = true;
console.error("getMerchantList 失败:", error); console.error("getMerchantList 失败:", error);
uni.showToast({ title: "网络异常,请稍后重试", icon: "none" }); uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
...@@ -295,6 +308,7 @@ defineExpose({ ...@@ -295,6 +308,7 @@ defineExpose({
.skeleton-wrap { .skeleton-wrap {
padding: 24px; padding: 24px;
width: 100%; width: 100%;
box-sizing: border-box;
} }
.box { .box {
...@@ -309,17 +323,22 @@ defineExpose({ ...@@ -309,17 +323,22 @@ defineExpose({
} }
.items { .items {
width: 49%; width: 48%; /* 给间距留出缓冲 */
height: 80px; height: 84px; /* 加高一些更稳重 */
margin-bottom: var(--l-spacing-lg); margin-bottom: var(--l-spacing-lg);
background: #ffffff; background: #f8f9fa; /* 浅灰背景 */
border-radius: var(--l-radius-md); border-radius: 12px; /* 增加圆角 */
padding: var(--l-spacing-md); padding: var(--l-spacing-md);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
border: 2px solid transparent; border: 1px solid transparent;
transition: background-color 0.25s ease, border-color 0.25s ease;
&:active {
background-color: #f1f3f5;
}
} }
.items .right { .items .right {
...@@ -335,18 +354,26 @@ defineExpose({ ...@@ -335,18 +354,26 @@ defineExpose({
} }
.items .name { .items .name {
font-weight: 500; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #181a1f; color: #495057; /* 深灰文字 */
margin-bottom: 6px; margin-bottom: 6px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.items .text_no { .items .text_no {
font-size: 14px; font-size: 13px;
color: #999ea8; color: #868e96;
} }
.items.active { .items.active {
border: 2px solid #347bff; background-color: rgba(22, 119, 255, 0.05); /* 主题色浅色背景 */
border: 1px solid rgba(22, 119, 255, 0.3); /* 细蓝色描边 */
}
.items.active .name {
color: #1677FF; /* 选中文字变蓝 */
} }
</style> </style>
<template> <template>
<view class="list-not"> <view class="list-not fade-in">
<image src="/static/images/login/nothing.webp" class="list-not-img" /> <image src="/static/images/login/nothing.webp" class="list-not-img" />
<text>暂无内容</text> <text>暂无内容</text>
</view> </view>
......
<template> <template>
<view class="fade-in-up">
<view v-if="loading" class="skeleton-wrap"> <view v-if="loading" class="skeleton-wrap">
<un-skeleton :animate="true" <un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true" :loading="true"
rows="3" rows="2"
title> :title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton>
<view style="height: 24px;"></view>
<un-skeleton :animate="true"
:loading="true"
rows="2"
:title="true"
avatar
avatar-shape="circle"
avatar-size="48">
</un-skeleton> </un-skeleton>
</view> </view>
<view v-else class="box"> <view v-else class="box">
...@@ -22,6 +43,7 @@ ...@@ -22,6 +43,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -51,14 +73,11 @@ let jumpTimer: number = 0; ...@@ -51,14 +73,11 @@ let jumpTimer: number = 0;
function jump(info: UTSJSONObject, data: any | null): void { function jump(info: UTSJSONObject, data: any | null): void {
const now = Date.now(); const now = Date.now();
if (now - jumpTimer < 3000) { if (now - jumpTimer < 3000) {
uni.hideLoading();
return; return;
} }
jumpTimer = now; jumpTimer = now;
console.log("跳转进入首页!"); console.log("跳转进入首页!");
uni.hideLoading();
if (data !== null) { if (data !== null) {
const loginRole = (data as UTSJSONObject).loginRoleOnSelectMerchant; const loginRole = (data as UTSJSONObject).loginRoleOnSelectMerchant;
if (loginRole !== null) { if (loginRole !== null) {
...@@ -72,13 +91,9 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -72,13 +91,9 @@ function jump(info: UTSJSONObject, data: any | null): void {
return; return;
} }
// 这里的全屏 loading 会挡住后续页面的骨架屏;改为不加 mask
uni.showLoading({ title: "加载中", mask: false });
console.log(`调用 getMerchantBrand, merchantId: ${ shopMerchantId}`); console.log(`调用 getMerchantBrand, merchantId: ${ shopMerchantId}`);
apiGetMerchantBrand({ merchantId: shopMerchantId }).then((res: any): void => { apiGetMerchantBrand({ merchantId: shopMerchantId }).then((res: any): void => {
console.log("getMerchantBrand 成功"); console.log("getMerchantBrand 成功");
uni.hideLoading();
const code = (res as UTSJSONObject).code as null | string; const code = (res as UTSJSONObject).code as null | string;
if (code === "0") { if (code === "0") {
...@@ -112,13 +127,8 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -112,13 +127,8 @@ function jump(info: UTSJSONObject, data: any | null): void {
} }
console.log(`准备跳转: ${ url}`); console.log(`准备跳转: ${ url}`);
// 跳转到精品页时,用页面内骨架屏承接加载态,避免全屏 loading 挡住骨架
if (url == "/pages/boutique/index") {
uni.hideLoading();
}
uni.reLaunch({ url }); uni.reLaunch({ url });
}).catch((error) => { }).catch((error) => {
uni.hideLoading();
console.error(`getMerchantBrand 失败: ${ JSON.stringify(error)}`); console.error(`getMerchantBrand 失败: ${ JSON.stringify(error)}`);
info.channelType = 1; info.channelType = 1;
storage.set("userInfo", info, 0); storage.set("userInfo", info, 0);
...@@ -141,9 +151,6 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -141,9 +151,6 @@ function jump(info: UTSJSONObject, data: any | null): void {
} }
} }
console.log(`准备跳转(catch): ${ url}`); console.log(`准备跳转(catch): ${ url}`);
if (url == "/pages/boutique/index") {
uni.hideLoading();
}
uni.reLaunch({ url }); uni.reLaunch({ url });
}); });
} }
...@@ -203,9 +210,6 @@ function selectScene(item: SceneItem, index: number): void { ...@@ -203,9 +210,6 @@ function selectScene(item: SceneItem, index: number): void {
userInfo.sceneType = sceneType; userInfo.sceneType = sceneType;
// 用页面内骨架/内容承接加载态,避免全屏遮罩挡住后续页面骨架
uni.showLoading({ title: "加载中", mask: false });
if (isSuper == true) { if (isSuper == true) {
jump(userInfo, null); jump(userInfo, null);
} else { } else {
...@@ -219,7 +223,6 @@ function selectScene(item: SceneItem, index: number): void { ...@@ -219,7 +223,6 @@ function selectScene(item: SceneItem, index: number): void {
}).then((data: any): void => { }).then((data: any): void => {
jump(userInfo, data); jump(userInfo, data);
}).catch((error) => { }).catch((error) => {
uni.hideLoading();
console.error("selectMerchantScene 失败:", error); console.error("selectMerchantScene 失败:", error);
uni.showToast({ title: "网络异常,请稍后重试", icon: "none" }); uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
}); });
...@@ -235,6 +238,7 @@ defineExpose({ ...@@ -235,6 +238,7 @@ defineExpose({
.skeleton-wrap { .skeleton-wrap {
padding: 24px; padding: 24px;
width: 100%; width: 100%;
box-sizing: border-box;
} }
.box { .box {
...@@ -243,19 +247,26 @@ defineExpose({ ...@@ -243,19 +247,26 @@ defineExpose({
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 24px; padding: 0 24px;
justify-content: space-between; justify-content: space-between;
width: 100%;
box-sizing: border-box;
.items { .items {
width: 48%; width: 48%; /* 给间隙留出空间 */
margin-bottom: 24px; margin-bottom: 24px;
height: 80px; height: 84px; /* 加高一些更稳重 */
background: #ffffff; background: #f8f9fa; /* 浅灰底色 */
border-radius: 8px; border-radius: 12px; /* 更大圆角 */
padding: 16px; padding: 16px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
border: 2px solid transparent; border: 1px solid transparent;
transition: background-color 0.25s ease, border-color 0.25s ease;
&:active {
background: #f1f3f5;
}
.left { .left {
margin-right: 14px; margin-right: 14px;
...@@ -269,21 +280,26 @@ defineExpose({ ...@@ -269,21 +280,26 @@ defineExpose({
justify-content: center; justify-content: center;
.name { .name {
font-weight: 500; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #181a1f; color: #495057; /* 深灰文字 */
margin-bottom: 6px; margin-bottom: 6px;
} }
.shop_no { .shop_no {
font-size: 14px; font-size: 13px;
color: #999ea8; color: #868e96;
} }
} }
} }
.active { .active {
border: 2px solid #347bff; background-color: rgba(22, 119, 255, 0.05); /* 主题色浅色背景 */
border: 1px solid rgba(22, 119, 255, 0.3); /* 细蓝色描边 */
.right .name {
color: #1677FF; /* 选中文字变蓝 */
}
} }
} }
</style> </style>
<template> <template>
<layout-root> <layout-root>
<view class="page-container"> <view class="page-container fade-in">
<HomeFrame ref="homeRef" <HomeFrame ref="homeRef"
:show-footer="true" :show-footer="true"
:swiper-custom="true" :swiper-custom="true"
@start="handleStart"> @start="handleStart">
<template #swiperCustom> <template #swiperCustom>
<view v-if="loadComplete" class="swiper-custom-wrap"> <view v-if="!loadComplete" class="swiper-loading">
<view v-if="moduleList.length > 0" class="swiper-custom-content"> <!-- 大气优雅的骨架屏 -->
<view class="skeleton-banner">
<un-skeleton :loading="true" :animate="true" :rows="0" :title="false" avatar avatar-shape="square" avatar-size="300"></un-skeleton>
</view>
<view class="skeleton-text">
<un-skeleton :loading="true" :animate="true" :rows="3" :title="true"></un-skeleton>
</view>
</view>
<view v-else-if="moduleList.length > 0" class="swiper-custom-wrap fade-in">
<view class="swiper-custom-content">
<view class="equity-swiper-stack"> <view class="equity-swiper-stack">
<!-- 原生 swiper:uview un-swiper 为加密 .vue,在 uni-app x 下易无法渲染图片 --> <un-swiper
<swiper
class="equity-swiper" class="equity-swiper"
:indicator-dots="false" :list="equitySwiperList"
:autoplay="moduleList.length > 1" :autoplay="moduleList.length > 1"
:circular="moduleList.length > 1" :circular="moduleList.length > 1"
:interval="5000" :indicator="false"
:duration="400" @change="(e: number) => onSwiperChange(e)"
:current="currentSwiperIndex" @click="(e: number) => onEquitySlideTap(e)"
@change="onSwiperChange" ></un-swiper>
>
<swiper-item
v-for="(url, i) in equitySwiperUrls"
:key="i"
>
<view
class="equity-swiper-slide"
@tap="onEquitySlideTap(i)"
>
<image
class="equity-swiper-img"
:src="url"
mode="aspectFill"
/>
</view>
</swiper-item>
</swiper>
<view v-if="hasEquityOverlay()" class="equity-swiper-overlay"> <view v-if="hasEquityOverlay()" class="equity-swiper-overlay">
<view class="overlay-text-content">
<text class="swiper-name"> <text class="swiper-name">
{{ equityOverlayName() }} {{ equityOverlayName() }}
</text> </text>
...@@ -44,10 +36,6 @@ ...@@ -44,10 +36,6 @@
{{ equityOverlayDesc() }} {{ equityOverlayDesc() }}
</text> </text>
</view> </view>
</view>
<text class="module-title">
{{ getCurrentModuleTitle() }}
</text>
<view class="swiper-dots"> <view class="swiper-dots">
<view v-for="(_, i) in moduleList" <view v-for="(_, i) in moduleList"
:key="i" :key="i"
...@@ -55,12 +43,11 @@ ...@@ -55,12 +43,11 @@
:class="[{ active: i == currentSwiperIndex }]" /> :class="[{ active: i == currentSwiperIndex }]" />
</view> </view>
</view> </view>
<view v-else class="swiper-empty">
<text class="empty-text">敬请期待</text>
</view> </view>
</view> </view>
<view v-else class="swiper-loading"> </view>
<un-skeleton :loading="true" :animate="true" rows="6"></un-skeleton> <view v-else class="swiper-empty fade-in">
<text class="empty-text">敬请期待</text>
</view> </view>
</template> </template>
...@@ -75,6 +62,7 @@ ...@@ -75,6 +62,7 @@
<script setup lang="uts"> <script setup lang="uts">
import { ComponentPublicInstance, computed, ref } from "vue"; import { ComponentPublicInstance, computed, ref } from "vue";
import { UnSwiperItem } from '@/uni_modules/uview-unix';
import { getCarBrandsListApi, getEmployeeListApi, getMerchantCarBrandList } from "@/api/common-api.uts"; import { getCarBrandsListApi, getEmployeeListApi, getMerchantCarBrandList } from "@/api/common-api.uts";
import { getMockData, getSoureData } from "@/api/system-api.uts"; import { getMockData, getSoureData } from "@/api/system-api.uts";
...@@ -313,9 +301,9 @@ function getToolCoverById(moduleId: any | null): string { ...@@ -313,9 +301,9 @@ function getToolCoverById(moduleId: any | null): string {
return ""; return "";
} }
const equitySwiperUrls = computed((): string[] => { const equitySwiperList = computed((): UnSwiperItem[] => {
const list = moduleList.value; const list = moduleList.value;
const out: string[] = []; const out: UnSwiperItem[] = [];
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
const obj = list[i] as UTSJSONObject; const obj = list[i] as UTSJSONObject;
let cover = pickModuleCover(obj); let cover = pickModuleCover(obj);
...@@ -328,7 +316,10 @@ const equitySwiperUrls = computed((): string[] => { ...@@ -328,7 +316,10 @@ const equitySwiperUrls = computed((): string[] => {
cover = getToolCoverById(moduleId); cover = getToolCoverById(moduleId);
} }
} }
out.push(cover != "" ? cover : EQUITY_SWIPER_PLACEHOLDER);
out.push({
url: cover != "" ? cover : EQUITY_SWIPER_PLACEHOLDER
} as UnSwiperItem);
} }
return out; return out;
}); });
...@@ -403,7 +394,7 @@ function parseSwiperEventIndex(e: number | UniSwiperChangeEvent | null): number ...@@ -403,7 +394,7 @@ function parseSwiperEventIndex(e: number | UniSwiperChangeEvent | null): number
return e.detail.current; return e.detail.current;
} }
function onSwiperChange(e: UniSwiperChangeEvent): void { function onSwiperChange(e: number | UniSwiperChangeEvent): void {
currentSwiperIndex.value = parseSwiperEventIndex(e); currentSwiperIndex.value = parseSwiperEventIndex(e);
} }
...@@ -539,7 +530,6 @@ onLoad((options) => { ...@@ -539,7 +530,6 @@ onLoad((options) => {
} }
}); });
get_Vehicle_Sales_Data(); get_Vehicle_Sales_Data();
uni.hideLoading();
}); });
onShow(() => { onShow(() => {
...@@ -595,81 +585,71 @@ onShow(() => { ...@@ -595,81 +585,71 @@ onShow(() => {
width: 100%; width: 100%;
min-height: 0; min-height: 0;
position: relative; position: relative;
/* 移除原有的 16px 左右内边距,让图片撑满更多空间 */
} }
.equity-swiper { .equity-swiper {
width: 100%; width: 100%;
height: 100%; height: 100%;
} border-radius: 8px;
overflow: hidden;
.equity-swiper-slide { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.equity-swiper-img {
width: 100%;
flex: 1;
min-height: 0;
} }
.equity-swiper-overlay { .equity-swiper-overlay {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 1; top: 0;
z-index: 10;
pointer-events: none; pointer-events: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 40%);
border-radius: 8px;
}
.overlay-text-content {
padding: 0 24px 8px;
display: flex;
flex-direction: column;
} }
.swiper-name { .swiper-name {
position: relative; color: #fff;
z-index: 1; font-size: 20px;
padding-top: var(--l-spacing-lg);
text-indent: 40px;
color: #333;
font-size: var(--l-font-base);
font-weight: 500; font-weight: 500;
margin-bottom: 6px;
opacity: 0.95;
} }
.swiper-desc { .swiper-desc {
position: relative; color: rgba(255, 255, 255, 0.7);
z-index: 1; font-size: 13px;
margin: var(--l-spacing-md) var(--l-spacing-xl) 0; line-height: 1.5;
color: #666;
font-size: 12px;
line-height: 20px;
} }
.swiper-dots { .swiper-dots {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
padding: var(--l-spacing-sm) 0; padding: 4px 0 12px;
}
.module-title {
color: #333;
font-size: 14px;
text-align: center;
padding-top: 8px;
} }
.dot { .dot {
width: 8px; width: 4px;
height: 8px; height: 4px;
border-radius: 4px; border-radius: 2px;
background: #ccc; background: rgba(255, 255, 255, 0.3);
margin: 0 4px; margin: 0 4px;
transition: all 0.3s ease;
} }
.dot.active { .dot.active {
background: #4673ff; width: 12px;
background: rgba(255, 255, 255, 0.8);
} }
.swiper-empty, .swiper-empty,
...@@ -677,14 +657,39 @@ onShow(() => { ...@@ -677,14 +657,39 @@ onShow(() => {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center; box-sizing: border-box;
justify-content: center; }
.skeleton-banner {
width: 100%;
flex: 1; /* 让图片占位符自动填满大部分空间 */
min-height: 250px; /* 保证有一个比较大的基础高度 */
box-sizing: border-box;
margin-bottom: 20px;
}
/* 调整骨架屏头像占位符,使其填满 banner 区域,显得大气 */
.skeleton-banner :deep(.u-skeleton__wrapper) {
width: 100%;
height: 100%;
display: flex;
}
.skeleton-banner :deep(.u-skeleton__avatar) {
width: 100% !important;
height: 100% !important;
border-radius: 8px !important;
}
.skeleton-text {
padding: 0 16px 20px;
} }
.empty-text { .empty-text {
font-size: var(--l-font-sm); font-size: var(--l-font-sm);
color: #999; color: #999;
margin: auto;
} }
.detail-content { .detail-content {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!