Commit 11074e5f by liimin

feat: 重构UI组件样式并优化登录交互

- 重构登录页样式,优化视觉层次和交互反馈
- 统一组件样式规范,使用现代化设计语言
- 优化列表组件视觉表现,增强选中状态
- 重构设置弹窗组件,改善用户体验
- 优化客流卡片组件布局和视觉呈现
- 改进权益中心页面结构和交互设计
- 修复组件导入路径问题
- 增强登录按钮交互反馈和错误提示
1 parent 621f1ec9
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
:title="title" :title="title"
:closeable="true" :closeable="true"
@close="close"> @close="close">
<view class="popup-panel" :style="popupStyle">
<view class="popup-content"> <view class="popup-content">
<view v-for="(item, index) in list" <view v-for="(item, index) in list"
:key="index" :key="index"
...@@ -17,6 +18,10 @@ ...@@ -17,6 +18,10 @@
<text class="item-title">{{ (item as UTSJSONObject).title ?? '' }}</text> <text class="item-title">{{ (item as UTSJSONObject).title ?? '' }}</text>
<text class="item-describe">{{ (item as UTSJSONObject).describe ?? '' }}</text> <text class="item-describe">{{ (item as UTSJSONObject).describe ?? '' }}</text>
</view> </view>
<view class="item-arrow">
<un-icon name="arrow-right" size="14" color="#8aa0bf"></un-icon>
</view>
</view>
</view> </view>
</view> </view>
</un-popup> </un-popup>
...@@ -80,91 +85,32 @@ defineExpose({ ...@@ -80,91 +85,32 @@ defineExpose({
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.popup-box { .popup-panel {
width: 700px; border-radius: 16px;
background: #ffffff;
border-radius: var(--l-radius-xl);
overflow: hidden; overflow: hidden;
background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
margin: 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} align-items: stretch;
.popup-title {
width: 100%;
height: 80px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
overflow: hidden;
background-image: linear-gradient(to right, #e8f0fe, #f5f7fa);
}
.popup-title-bg-img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.popup-title .popup-title-text,
.popup-title .popup-close {
position: relative;
z-index: 1;
}
.popup-title-text {
font-weight: 500;
font-size: 26px;
color: #1a1a1a;
text-align: center;
width: 100%;
padding: 0 56px;
box-sizing: border-box;
}
.popup-close {
position: absolute!important;
right: 12px;
top: 50%;
transform: translateY(-50%);
z-index: 2;
width: 36px;
height: 36px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 0;
box-sizing: border-box;
}
.close-icon {
font-size: 32px;
color: #1a1a1a;
line-height: 1;
} }
.popup-content { .popup-content {
padding: var(--l-spacing-lg); padding: 12px;
box-sizing: border-box; box-sizing: border-box;
} }
.popup-item { .popup-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; padding: 12px 12px;
padding: var(--l-spacing-lg); margin-bottom: 10px;
margin-bottom: var(--l-spacing-md); background: rgba(255, 255, 255, 0.96);
background: #ffffff; border-radius: 12px;
box-shadow: 0 6px 24px rgba(44, 102, 247, 0.15); border: 1px solid #dbe6f7;
border-radius: var(--l-radius-lg); box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
} }
.popup-item:last-child { .popup-item:last-child {
...@@ -172,18 +118,20 @@ defineExpose({ ...@@ -172,18 +118,20 @@ defineExpose({
} }
.item-icon { .item-icon {
width: 48px; width: 40px;
height: 48px; height: 40px;
margin-right: var(--l-spacing-md); margin-right: 10px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink: 0; flex-shrink: 0;
background: #edf4ff;
border-radius: 10px;
} }
.item-icon-text { .item-icon-text {
font-size: 24px; font-size: 21px;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
} }
...@@ -196,15 +144,25 @@ defineExpose({ ...@@ -196,15 +144,25 @@ defineExpose({
} }
.item-title { .item-title {
font-weight: 500; font-weight: 600;
font-size: 14px; font-size: 14px;
color: #1a1a1a; color: #1e293b;
margin-bottom: var(--l-spacing-xs); margin-bottom: 2px;
} }
.item-describe { .item-describe {
font-size: 12px; font-size: 12px;
color: #808291; color: #8091aa;
white-space: pre-wrap; white-space: pre-wrap;
} }
.item-arrow {
margin-left: 8px;
width: 16px;
height: 16px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
</style> </style>
...@@ -77,7 +77,7 @@ import { computed, ref } from "vue"; ...@@ -77,7 +77,7 @@ import { computed, ref } from "vue";
import CenterPopup from "@/components/CenterPopup.uvue"; import CenterPopup from "@/components/CenterPopup.uvue";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import SettingBox from "./SettingBox.uvue"; import SettingBox from "@/pages/person/SettingBox.uvue";
const props = defineProps<{ const props = defineProps<{
isPortrait?: boolean isPortrait?: boolean
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
<!-- 横屏三卡片布局:轻改等使用 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" hover-class="start-hover" @click="onStartClick"> <view class="start" hover-class="start-hover" @click="onStartClick">
<view class="start-glow"></view>
<view class="start-shine"></view>
<view class="start-inner"> <view class="start-inner">
<view class="start-icon-wrap">
<un-icon name="play-right-fill" size="14" color="#1677ff"></un-icon>
</view>
<text class="start-text">开始接待</text> <text class="start-text">开始接待</text>
</view> </view>
</view> </view>
...@@ -68,7 +73,12 @@ ...@@ -68,7 +73,12 @@
<!-- 横屏三卡片布局:轻改等使用 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" hover-class="start-hover" @click="onStartClick"> <view class="start" hover-class="start-hover" @click="onStartClick">
<view class="start-glow"></view>
<view class="start-shine"></view>
<view class="start-inner"> <view class="start-inner">
<view class="start-icon-wrap">
<un-icon name="play-right-fill" size="14" color="#1677ff"></un-icon>
</view>
<text class="start-text">开始接待</text> <text class="start-text">开始接待</text>
</view> </view>
</view> </view>
...@@ -334,6 +344,28 @@ defineExpose({ ...@@ -334,6 +344,28 @@ defineExpose({
transition-timing-function: ease-out; /* 使用 ease-out 让反馈更利落 */ transition-timing-function: ease-out; /* 使用 ease-out 让反馈更利落 */
} }
.start-glow {
position: absolute;
left: 18px;
top: 18px;
right: 18px;
bottom: 18px;
border-radius: 18px;
background: rgba(255, 255, 255, 0.16);
animation: startGlowPulse 1.8s ease-in-out infinite;
}
.start-shine {
position: absolute;
top: -30%;
bottom: -30%;
width: 42px;
left: -52px;
background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
transform: rotate(14deg);
animation: startShineSweep 2.6s ease-in-out infinite;
}
.start-hover { .start-hover {
transform: scale(0.92); /* 显著加大缩放比例,营造强烈的按压感 */ transform: scale(0.92); /* 显著加大缩放比例,营造强烈的按压感 */
box-shadow: 0 2px 8px rgba(22, 119, 255, 0.1); /* 阴影大幅度减小,模拟完全按下贴合屏幕 */ box-shadow: 0 2px 8px rgba(22, 119, 255, 0.1); /* 阴影大幅度减小,模拟完全按下贴合屏幕 */
...@@ -351,6 +383,20 @@ defineExpose({ ...@@ -351,6 +383,20 @@ defineExpose({
background-color: transparent; background-color: transparent;
} }
.start-icon-wrap {
width: 28px;
height: 28px;
border-radius: 14px;
background: rgba(255, 255, 255, 0.92);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-right: 10px;
box-shadow: 0 3px 8px rgba(22, 119, 255, 0.22);
animation: startIconBreath 1.6s ease-in-out infinite;
}
.start-text { .start-text {
font-size: 22px; /* 增大字号 */ font-size: 22px; /* 增大字号 */
font-weight: bold; /* 加粗 */ font-weight: bold; /* 加粗 */
...@@ -360,6 +406,48 @@ defineExpose({ ...@@ -360,6 +406,48 @@ defineExpose({
letter-spacing: 2px; letter-spacing: 2px;
} }
@keyframes startGlowPulse {
0% {
opacity: 0.28;
}
50% {
opacity: 0.46;
}
100% {
opacity: 0.28;
}
}
@keyframes startShineSweep {
0% {
left: -56px;
opacity: 0;
}
20% {
opacity: 1;
}
70% {
left: calc(100% + 16px);
opacity: 1;
}
100% {
left: calc(100% + 24px);
opacity: 0;
}
}
@keyframes startIconBreath {
0% {
transform: scale(1);
}
50% {
transform: scale(1.07);
}
100% {
transform: scale(1);
}
}
.right-content-box { .right-content-box {
flex: 1; flex: 1;
display: flex; display: flex;
......
...@@ -10,17 +10,8 @@ ...@@ -10,17 +10,8 @@
</image> </image>
</view> </view>
<view class="layout"> <view class="layout">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons color="#000"
:size="20"
type="left">
</uni-icons>
</view>
</view>
<view class="step-box"> <view class="step-box">
<view v-for="(item, index) in stepList" <view v-for="(item, index) in stepList"
v-show="stepIndex === index"
:key="index" :key="index"
class="step-item" class="step-item"
:class="[stepIndex >= index ? 'active-item' : '']" :class="[stepIndex >= index ? 'active-item' : '']"
...@@ -177,6 +168,7 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -177,6 +168,7 @@ const chooseMerchant = (userInfo: any): void => {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
overflow: hidden;
.bg { .bg {
position: absolute; position: absolute;
...@@ -188,75 +180,84 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -188,75 +180,84 @@ const chooseMerchant = (userInfo: any): void => {
.bg-image { .bg-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
opacity: 0.9;
filter: saturate(0.82) brightness(1.03);
} }
} }
.layout { .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 72px; padding-top: 0;
padding-bottom: 0;
box-sizing: border-box; box-sizing: border-box;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative; position: relative;
.nav-bar { .nav-wrap {
position: absolute;
width: 100%; width: 100%;
height: 48px; height: 66px;
position:absolute;
left: 0; left: 0;
top: 24px; top: 18px;
padding: 0 14px;
}
.back { .back {
width: 48px; width: 34px;
height: 48px; height: 34px;
border-radius: 17px;
background: rgba(255, 255, 255, 0.78);
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 4px 10px rgba(15, 23, 42, 0.08);
} }
.step-box { .step-box {
position: relative; position: absolute;
height: 44px;
border-radius: 14px;
background: transparent;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-sizing: border-box;
.step-item { .step-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-right: 81.5px; margin-right: 16px;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
.step-label { .step-label {
font-weight: 500; font-weight: 600;
font-size: 18px; font-size: 13px;
color: #999999; color: #90a0b5;
} }
.step-label-active { .step-label-active {
color: #4673ff; color: #1677ff;
} }
.num { .num {
width: 28px; width: 22px;
height: 28px; height: 22px;
position: relative; position: relative;
padding: 2px; margin-right: 6px;
box-sizing: border-box;
margin-right: 5px;
.text { .text {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #b1b1b1; background: #c7d2e3;
border-radius: 12px; border-radius: 999px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -265,12 +266,12 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -265,12 +266,12 @@ const chooseMerchant = (userInfo: any): void => {
} }
.text-active { .text-active {
background: #4673ff; background: #1677ff;
} }
.num-text { .num-text {
font-weight: 700; font-weight: 700;
font-size: 16px; font-size: 12px;
color: #ffffff; color: #ffffff;
} }
} }
...@@ -278,40 +279,37 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -278,40 +279,37 @@ const chooseMerchant = (userInfo: any): void => {
.step-item.active-item .num .text, .step-item.active-item .num .text,
.step-item .num .text-active { .step-item .num .text-active {
background: #4673ff; background: #1677ff;
} }
} }
/* 202px = 顶部区域 + 底部留白,拆分为 top + bottom */
.content-box { .content-box {
position: absolute; position: absolute;
top: 130px; flex: 1;
bottom: 62px; width: 86%;
left: 0;
right: 0;
margin: 0 auto;
width: 81.84%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 24px; margin: 0 auto 2px;
box-shadow: inset 0 0 8px 0 #ffffff; padding-top: 0;
border-radius: 24px; border-radius: 20px;
background: #ffffff59; background: rgba(255, 255, 255, 0.36);
flex-direction: column; flex-direction: column;
overflow: hidden;
min-height: 0;
} }
.search-box { .search-box {
margin: 0 12px 24px; margin: 0 12px 12px;
position: relative; position: relative;
.search-input { .search-input {
width: 100%; width: 100%;
height: 40px; height: 42px;
background: #ffffff; background: rgba(255, 255, 255, 0.88);
border: 1.5px solid #a8c1ff; border-radius: 12px;
border-radius: 8px;
box-sizing: border-box; box-sizing: border-box;
padding: 0 6px; padding: 0 8px;
position: relative; position: relative;
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
.input { .input {
display: flex; display: flex;
...@@ -324,11 +322,12 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -324,11 +322,12 @@ const chooseMerchant = (userInfo: any): void => {
.search-input-text { .search-input-text {
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
color: #334155;
} }
} }
.icon-search { .icon-search {
margin-left: 1px; margin-left: 3px;
} }
.placeholder { .placeholder {
...@@ -338,8 +337,8 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -338,8 +337,8 @@ const chooseMerchant = (userInfo: any): void => {
justify-content: center; justify-content: center;
.search-placeholder-text { .search-placeholder-text {
font-size: 14px; font-size: 13px;
color: #999999; color: #96a4b8;
text-align: center; text-align: center;
} }
} }
...@@ -348,9 +347,9 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -348,9 +347,9 @@ const chooseMerchant = (userInfo: any): void => {
.clear { .clear {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 0; right: 4px;
transform: translateY(-50%); transform: translateY(-50%);
padding: 0 1px; padding: 0 2px;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -364,24 +364,25 @@ onMounted(() => { ...@@ -364,24 +364,25 @@ onMounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 24px; padding: 2px 12px 12px;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.items { .items {
width: 48%; /* 避免 49% 导致挤换行 */ width: 48%;
margin-bottom: 16px; margin-bottom: 16px;
height: 84px; /* 增加一点高度更饱满 */ min-height: 86px;
background: #f8f9fa; /* 浅灰底色 */ background: rgba(255, 255, 255, 0.92);
border-radius: 12px; /* 更大圆角 */ border-radius: 14px;
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: 1px solid transparent; border: 0;
transition: background-color 0.25s ease, border-color 0.25s ease; box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
&:active { &:active {
background: #f1f3f5; background: #f1f3f5;
...@@ -399,14 +400,14 @@ onMounted(() => { ...@@ -399,14 +400,14 @@ onMounted(() => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: 16px; font-size: 16px;
color: #495057; /* 深灰文字 */ color: #334155;
} }
.shop_no { .shop_no {
font-weight: 400; font-weight: 400;
font-size: 13px; font-size: 13px;
margin-top: 6px; margin-top: 6px;
color: #868e96; color: #8a9ab1;
} }
} }
...@@ -420,7 +421,7 @@ onMounted(() => { ...@@ -420,7 +421,7 @@ onMounted(() => {
.midle { .midle {
width: 48px; width: 48px;
height: 48px; height: 48px;
border-radius: 24px; /* 圆形角色标更柔和 */ border-radius: 24px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -461,11 +462,11 @@ onMounted(() => { ...@@ -461,11 +462,11 @@ onMounted(() => {
} }
.active { .active {
background-color: rgba(22, 119, 255, 0.05); /* 淡淡主题色背景 */ background-color: rgba(22, 119, 255, 0.08);
border: 1px solid rgba(22, 119, 255, 0.3); /* 主题色细边框 */ box-shadow: 0 8px 20px rgba(22, 119, 255, 0.16);
.left .name { .left .name {
color: #1677FF; /* 选中文字变蓝 */ color: #1677FF;
} }
} }
} }
......
...@@ -284,25 +284,26 @@ defineExpose({ ...@@ -284,25 +284,26 @@ defineExpose({
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 var(--l-spacing-lg); padding: 2px;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
justify-content: space-between; justify-content: space-between;
} }
.items { .items {
width: 48%; /* 给间距留出缓冲 */ width: 48%;
height: 84px; /* 加高一些更稳重 */ min-height: 86px;
margin-bottom: var(--l-spacing-lg); margin-bottom: var(--l-spacing-lg);
background: #f8f9fa; /* 浅灰背景 */ background: rgba(255, 255, 255, 0.92);
border-radius: 12px; /* 增加圆角 */ border-radius: 14px;
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: 1px solid transparent; border: 0;
transition: background-color 0.25s ease, border-color 0.25s ease; box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
&:active { &:active {
background-color: #f1f3f5; background-color: #f1f3f5;
...@@ -324,7 +325,7 @@ defineExpose({ ...@@ -324,7 +325,7 @@ defineExpose({
.items .name { .items .name {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #495057; /* 深灰文字 */ color: #334155;
margin-bottom: 6px; margin-bottom: 6px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -333,15 +334,15 @@ defineExpose({ ...@@ -333,15 +334,15 @@ defineExpose({
.items .text_no { .items .text_no {
font-size: 13px; font-size: 13px;
color: #868e96; color: #8a9ab1;
} }
.items.active { .items.active {
background-color: rgba(22, 119, 255, 0.05); /* 主题色浅色背景 */ background-color: rgba(22, 119, 255, 0.08);
border: 1px solid rgba(22, 119, 255, 0.3); /* 细蓝色描边 */ box-shadow: 0 8px 20px rgba(22, 119, 255, 0.16);
} }
.items.active .name { .items.active .name {
color: #1677FF; /* 选中文字变蓝 */ color: #1677FF;
} }
</style> </style>
<template> <template>
<view class="list-not fade-in"> <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 class="list-not-text">暂无内容</text>
</view> </view>
</template> </template>
...@@ -10,16 +10,26 @@ ...@@ -10,16 +10,26 @@
<style scoped lang="scss"> <style scoped lang="scss">
.list-not { .list-not {
font-size: 11px; font-size: 12px;
color: #999999; color: #94a3b8;
margin: auto; margin: auto;
text-align: center; text-align: center;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 24px;
&-img { &-img {
width: 338px; width: 220px;
height: 281px; height: 184px;
margin: 191px auto 6px; margin: 36px auto 8px;
opacity: 0.9;
} }
} }
.list-not-text {
font-size: 12px;
color: #9aa8bc;
letter-spacing: 0.5px;
}
</style> </style>
...@@ -213,24 +213,25 @@ defineExpose({ ...@@ -213,24 +213,25 @@ defineExpose({
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 24px; padding: 2px 12px 12px;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.items { .items {
width: 48%; /* 给间隙留出空间 */ width: 48%;
margin-bottom: 24px; margin-bottom: 24px;
height: 84px; /* 加高一些更稳重 */ min-height: 86px;
background: #f8f9fa; /* 浅灰底色 */ background: rgba(255, 255, 255, 0.92);
border-radius: 12px; /* 更大圆角 */ border-radius: 14px;
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: 1px solid transparent; border: 0;
transition: background-color 0.25s ease, border-color 0.25s ease; box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
&:active { &:active {
background: #f1f3f5; background: #f1f3f5;
...@@ -250,23 +251,23 @@ defineExpose({ ...@@ -250,23 +251,23 @@ defineExpose({
.name { .name {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #495057; /* 深灰文字 */ color: #334155;
margin-bottom: 6px; margin-bottom: 6px;
} }
.shop_no { .shop_no {
font-size: 13px; font-size: 13px;
color: #868e96; color: #8a9ab1;
} }
} }
} }
.active { .active {
background-color: rgba(22, 119, 255, 0.05); /* 主题色浅色背景 */ background-color: rgba(22, 119, 255, 0.08);
border: 1px solid rgba(22, 119, 255, 0.3); /* 细蓝色描边 */ box-shadow: 0 8px 20px rgba(22, 119, 255, 0.16);
.right .name { .right .name {
color: #1677FF; /* 选中文字变蓝 */ color: #1677FF;
} }
} }
} }
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<view class="login flex-col"> <view class="login flex-col">
<text class="title">登录</text> <text class="title">登录</text>
<text class="sub-title">手机号码登录</text> <text class="sub-title">手机号码登录</text>
<view v-if="errorVisible" class="error-tip">
<uni-icons type="info-filled" size="14" color="#ef4444"></uni-icons>
<text class="error-tip-text">{{ errorMessage }}</text>
</view>
<view class="input flex-col"> <view class="input flex-col">
<input v-model="mobile" <input v-model="mobile"
...@@ -46,10 +50,14 @@ ...@@ -46,10 +50,14 @@
</view> </view>
</view> </view>
<button class="btn" <view class="btn"
:class="[isLoginPressing ? 'btn-pressing' : '', isLogging ? 'btn-loading' : '']"
@touchstart="onLoginPressStart"
@touchend="onLoginPressEnd"
@touchcancel="onLoginPressEnd"
@click="login"> @click="login">
<text class="btn-text">登录</text> <text class="btn-text">{{ isLogging ? "登录中..." : "登录" }}</text>
</button> </view>
<view class="form-footer"> <view class="form-footer">
<view class="autoLogin"> <view class="autoLogin">
...@@ -99,6 +107,26 @@ const count = ref<number>(0); ...@@ -99,6 +107,26 @@ const count = ref<number>(0);
const noSignIn = ref<boolean>(true); const noSignIn = ref<boolean>(true);
const readingStatus = ref<boolean>(false); const readingStatus = ref<boolean>(false);
const deviceId = ref<string>(""); const deviceId = ref<string>("");
const isLogging = ref<boolean>(false);
const isLoginPressing = ref<boolean>(false);
const errorVisible = ref<boolean>(false);
const errorMessage = ref<string>("");
const errorTipTimerId = ref<number>(0);
const showError = (msg: string): void => {
const text = msg == null || msg == "" ? "操作失败,请稍后重试" : msg;
errorMessage.value = text;
errorVisible.value = true;
if (errorTipTimerId.value > 0) {
clearTimeout(errorTipTimerId.value);
errorTipTimerId.value = 0;
}
const tid = setTimeout(() => {
errorVisible.value = false;
errorTipTimerId.value = 0;
}, 2200);
errorTipTimerId.value = tid;
};
// 简单登录节流,防止连续点击 // 简单登录节流,防止连续点击
let lastLoginAt = 0; let lastLoginAt = 0;
...@@ -167,6 +195,7 @@ const doLogin = async (): Promise<void> => { ...@@ -167,6 +195,7 @@ const doLogin = async (): Promise<void> => {
title: "加载中", title: "加载中",
mask: true mask: true
}); });
isLogging.value = true;
console.log("res9032903920"); console.log("res9032903920");
const res = await apiSmsLogin(params); const res = await apiSmsLogin(params);
console.log("res", res); console.log("res", res);
...@@ -177,26 +206,22 @@ const doLogin = async (): Promise<void> => { ...@@ -177,26 +206,22 @@ const doLogin = async (): Promise<void> => {
if (`${resCode}` == "0" && data !== null) { if (`${resCode}` == "0" && data !== null) {
jump(data, remember); jump(data, remember);
} else { } else {
uni.showModal({ showError(message ?? "登录失败");
title: "温馨提示",
content: message ?? "登录失败",
showCancel: false,
confirmText: "知道了",
confirmColor: "#347BFF"
});
console.log(`${m}登录失败,失败原因:${message}`); console.log(`${m}登录失败,失败原因:${message}`);
} }
} catch (error) { } catch (error) {
const msg = `${error}`; const msg = `${error}`;
showError(msg);
} finally {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ isLogging.value = false;
title: msg,
icon: "none"
});
} }
}; };
const login = (): void => { const login = (): void => {
if (isLogging.value) {
return;
}
const now = Date.now(); const now = Date.now();
if (now - lastLoginAt < LOGIN_INTERVAL_MS) { if (now - lastLoginAt < LOGIN_INTERVAL_MS) {
return; return;
...@@ -206,6 +231,15 @@ const login = (): void => { ...@@ -206,6 +231,15 @@ const login = (): void => {
doLogin(); doLogin();
}; };
function onLoginPressStart(): void {
if (isLogging.value) return;
isLoginPressing.value = true;
}
function onLoginPressEnd(): void {
isLoginPressing.value = false;
}
function countDown(initial: number): void { function countDown(initial: number): void {
if (initial > 0) { if (initial > 0) {
count.value = initial; count.value = initial;
...@@ -308,10 +342,7 @@ const getSmsCode = async (): Promise<void> => { ...@@ -308,10 +342,7 @@ const getSmsCode = async (): Promise<void> => {
} catch (error) { } catch (error) {
const msg = `${error}`; const msg = `${error}`;
uni.hideLoading(); uni.hideLoading();
uni.showToast({ showError(msg);
title: msg,
icon: "none"
});
} }
}; };
...@@ -376,4 +407,105 @@ function toggleNoSignIn(): void { ...@@ -376,4 +407,105 @@ function toggleNoSignIn(): void {
font-size: 14px; font-size: 14px;
} }
} }
.login-page .login {
width: 452px !important;
padding: 30px 28px 22px !important;
background: rgba(255, 255, 255, 0.92) !important;
border-radius: 16px !important;
box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10) !important;
}
.login-page .login .title {
font-size: 32px !important;
margin-bottom: 6px !important;
color: #1e293b !important;
}
.login-page .login .sub-title {
font-size: 13px !important;
margin: 0 0 16px !important;
color: #7b8ba3 !important;
}
.login-page .login .input {
width: 100% !important;
height: 50px !important;
margin-bottom: 12px !important;
border-radius: 10px !important;
background: #f8fbff !important;
border: 1px solid #d5e1f2 !important;
box-shadow: none !important;
overflow: hidden !important;
box-sizing: border-box !important;
}
.login-page .login .btn {
width: 100% !important;
height: 50px !important;
border-radius: 10px !important;
background: #1677ff !important;
display: flex !important;
flex-direction: row !important;
align-items: center !important;
justify-content: center !important;
transition: transform .12s ease, opacity .12s ease !important;
}
.login-page .login .btn .btn-text {
color: #ffffff !important;
font-size: 17px !important;
font-weight: 600 !important;
line-height: 1 !important;
opacity: 1 !important;
display: block !important;
}
.login-page .login .btn.btn-pressing {
transform: scale(0.98) !important;
opacity: 0.92 !important;
}
.login-page .login .btn.btn-loading {
opacity: 0.9 !important;
}
.login-page .login .error-tip {
width: 100% !important;
min-height: 34px !important;
padding: 0 12px !important;
margin: 0 0 10px !important;
border-radius: 10px !important;
background: #fff1f2 !important;
border: 1px solid #fecdd3 !important;
display: flex !important;
flex-direction: row !important;
align-items: center !important;
box-sizing: border-box !important;
box-shadow: 0 4px 10px rgba(239, 68, 68, 0.10) !important;
overflow: hidden !important;
animation: errorTipFadeIn .18s ease-out !important;
}
.login-page .login .error-tip-text {
margin-left: 6px !important;
font-size: 12px !important;
color: #b42318 !important;
font-weight: 600 !important;
line-height: 1.3 !important;
opacity: 1 !important;
display: block !important;
flex: 1 !important;
}
@keyframes errorTipFadeIn {
0% {
opacity: 0;
transform: translateY(-4px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
</style> </style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%); background-image: linear-gradient(165deg, #eef4ff 0%, #f5f8fd 52%, #f8fafc 100%);
} }
.login { .login {
...@@ -19,20 +19,25 @@ ...@@ -19,20 +19,25 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 452px;
padding: 30px 28px 22px;
background: rgba(255, 255, 255, 0.92);
border-radius: 16px;
box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
.title { .title {
margin-bottom: 16px; margin-bottom: 6px;
font-size: 48px; font-size: 32px;
font-weight: 600; font-weight: 700;
color: #333; color: #1e293b;
text-align: center; text-align: center;
} }
.sub-title { .sub-title {
margin: 24px 0; margin: 0 0 16px;
font-size: 16px; font-size: 13px;
font-weight: 500; font-weight: 500;
color: #1a1a1a; color: #7b8ba3;
} }
.input { .input {
...@@ -40,17 +45,19 @@ ...@@ -40,17 +45,19 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
width: 400px; width: 100%;
height: 56px; height: 50px;
padding-left: 20px; padding-left: 20px;
margin-bottom: 20px; margin-bottom: 12px;
background: #f7f8fa; background: #f8fbff;
border-radius: 28px; border-radius: 10px;
box-shadow: inset 0 0 0 1px #d5e1f2;
.input-control { .input-control {
flex: 1; flex: 1;
height: 100%; height: 100%;
font-size: 16px; font-size: 15px;
color: #334155;
} }
.icon { .icon {
...@@ -65,18 +72,18 @@ ...@@ -65,18 +72,18 @@
.code-btn { .code-btn {
flex-shrink: 0; flex-shrink: 0;
margin-right: 20px; margin-right: 14px;
border: none; border: none;
.code-btn-text { .code-btn-text {
font-size: 16px; font-size: 13px;
font-weight: 500; font-weight: 500;
color: #2c66f7; color: #2c66f7;
} }
} }
.code-disabled { .code-disabled {
color: #9b9b9e; color: #9aa8bc;
} }
} }
...@@ -85,16 +92,20 @@ ...@@ -85,16 +92,20 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 400px; width: 100%;
height: 56px; height: 50px;
background: #2c66f7; background: linear-gradient(135deg, #1677ff 0%, #2f88ff 100%);
border-radius: 28px; border-radius: 10px;
box-shadow: 0 8px 16px rgba(22, 119, 255, 0.24);
} }
.btn-text { .btn-text {
font-size: 20px; font-size: 17px;
font-weight: 600; font-weight: 600;
color: #fff; color: #fff;
line-height: 1;
text-align: center;
display: block;
} }
.btn-disabled { .btn-disabled {
...@@ -105,22 +116,24 @@ ...@@ -105,22 +116,24 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
padding-left: 72px; width: 100%;
margin-top: 20px; padding-left: 2px;
margin-top: 14px;
.autoLogin { .autoLogin {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-right: 10px; margin-right: 10px;
margin-bottom: 19px; margin-bottom: 10px;
.uni-icons { .uni-icons {
margin-right: 4px; margin-right: 4px;
} }
.auto-login-text { .auto-login-text {
color: #2c66f7; font-size: 13px;
color: #5c6f8d;
} }
} }
} }
...@@ -128,7 +141,7 @@ ...@@ -128,7 +141,7 @@
.app-code { .app-code {
position: fixed; position: fixed;
bottom: 10px; bottom: 14px;
left: 50%; left: 50%;
transform: translate(-50%); transform: translate(-50%);
display: flex; display: flex;
...@@ -137,9 +150,9 @@ ...@@ -137,9 +150,9 @@
} }
.app-code-text { .app-code-text {
font-size: 12px; font-size: 11px;
line-height: 20px; line-height: 20px;
color: #999; color: #8fa0b8;
} }
.icon-clone { .icon-clone {
......
/* pages/common/login/styles/landscape.scss */
.layout { .layout {
/* 针对 1920x1080 的样式 */
&.layout-landscape-1920x1080 { &.layout-landscape-1920x1080 {
.login { .login {
width: 600px; width: 500px;
padding-top: 150px; padding-top: 30px;
.title { .title {
font-size: 48px; font-size: 36px;
color: #2c66f7; /* 大屏下强调色 */ color: #1e293b;
} }
.btn { .btn {
height: 100px; height: 54px;
font-size: 36px;
line-height: 100px;
} }
} }
} }
/* 针对 1174x768 的样式 */
&.layout-landscape-1174x768 { &.layout-landscape-1174x768 {
.login { .login {
background-color: red; width: 470px;
} padding-top: 24px;
.title{
color: #fff;
} }
} }
/* 兜底样式 (Common Landscape) */
&.layout-landscape-common { &.layout-landscape-common {
.login { .login {
width: 50%; width: 48%;
min-width: 400px; min-width: 430px;
} }
} }
} }
/* pages/common/login/styles/portrait.scss */
.layout { .layout {
/* 针对竖屏的兜底样式 */
&.layout-portrait-common { &.layout-portrait-common {
.login { .login {
width: 90%; width: 88%;
margin-top: 200px; /* 竖屏下让登录框靠下一点 */ margin-top: 94px;
padding: 24px 18px 18px;
.title { .title {
font-size: 36px; font-size: 28px;
} }
} }
} }
......
...@@ -11,6 +11,15 @@ ...@@ -11,6 +11,15 @@
</view> </view>
<view v-else-if="moduleList.length > 0" class="swiper-custom-wrap fade-in"> <view v-else-if="moduleList.length > 0" class="swiper-custom-wrap fade-in">
<view class="swiper-custom-content"> <view class="swiper-custom-content">
<view class="equity-hero-head">
<view class="hero-title-wrap">
<text class="hero-eyebrow">权益中心</text>
<text class="hero-title">{{ getCurrentModuleTitle() }}</text>
</view>
<view class="hero-indicator-pill">
<text class="hero-indicator-text">{{ currentSwiperIndex + 1 }}/{{ moduleList.length }}</text>
</view>
</view>
<view class="equity-swiper-stack"> <view class="equity-swiper-stack">
<un-swiper <un-swiper
class="equity-swiper" class="equity-swiper"
...@@ -18,18 +27,11 @@ ...@@ -18,18 +27,11 @@
:autoplay="moduleList.length > 1" :autoplay="moduleList.length > 1"
:circular="moduleList.length > 1" :circular="moduleList.length > 1"
:indicator="false" :indicator="false"
height="220"
@change="(e: number) => onSwiperChange(e)" @change="(e: number) => onSwiperChange(e)"
@click="(e: number) => onEquitySlideTap(e)" @click="(e: number) => onEquitySlideTap(e)"
></un-swiper> ></un-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">
{{ equityOverlayName() }}
</text>
<text class="swiper-desc">
{{ equityOverlayDesc() }}
</text>
</view>
<view class="swiper-dots"> <view class="swiper-dots">
<view v-for="(_, i) in moduleList" <view v-for="(_, i) in moduleList"
:key="i" :key="i"
...@@ -41,8 +43,11 @@ ...@@ -41,8 +43,11 @@
</view> </view>
</view> </view>
<view v-else class="swiper-empty fade-in"> <view v-else class="swiper-empty fade-in">
<view class="empty-card">
<text class="empty-title">权益配置中</text>
<text class="empty-text">敬请期待</text> <text class="empty-text">敬请期待</text>
</view> </view>
</view>
</template> </template>
<template #detail> <template #detail>
...@@ -560,12 +565,22 @@ onShow(() => { ...@@ -560,12 +565,22 @@ onShow(() => {
.page-container { .page-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: linear-gradient(180deg, #edf4ff 0%, #f4f8ff 36%, #f8fafd 100%);
}
.swiper-loading {
width: 100%;
height: 100%;
padding: 12px;
box-sizing: border-box;
} }
.swiper-custom-wrap { .swiper-custom-wrap {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
padding: 0;
box-sizing: border-box;
} }
.swiper-custom-content { .swiper-custom-content {
...@@ -573,6 +588,67 @@ onShow(() => { ...@@ -573,6 +588,67 @@ onShow(() => {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 16px;
background: rgba(255, 255, 255, 0.86);
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
overflow: hidden;
}
.equity-hero-head {
width: 100%;
height: 40px;
padding: 0 10px;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(226, 236, 248, 0.8);
background: linear-gradient(135deg, rgba(248, 251, 255, 0.95) 0%, rgba(240, 246, 255, 0.95) 100%);
}
.hero-title-wrap {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.hero-eyebrow {
font-size: 10px;
color: #8ea0ba;
line-height: 12px;
}
.hero-title {
margin-top: 0;
font-size: 14px;
font-weight: 700;
color: #1e293b;
line-height: 18px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.hero-indicator-pill {
height: 22px;
min-width: 44px;
padding: 0 8px;
border-radius: 13px;
background: #e9f1ff;
border: 1px solid #cfe0f8;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.hero-indicator-text {
font-size: 11px;
font-weight: 600;
color: #2a5ecf;
} }
.equity-swiper-stack { .equity-swiper-stack {
...@@ -580,15 +656,16 @@ onShow(() => { ...@@ -580,15 +656,16 @@ onShow(() => {
width: 100%; width: 100%;
min-height: 0; min-height: 0;
position: relative; position: relative;
/* 移除原有的 16px 左右内边距,让图片撑满更多空间 */ padding: 0;
box-sizing: border-box;
} }
.equity-swiper { .equity-swiper {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 8px; border-radius: 10px;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
} }
.equity-swiper-overlay { .equity-swiper-overlay {
...@@ -602,49 +679,33 @@ onShow(() => { ...@@ -602,49 +679,33 @@ onShow(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 40%); background-image: linear-gradient(to top, rgba(30, 58, 138, 0.56) 0%, rgba(30, 58, 138, 0.0) 26%);
border-radius: 8px; border-radius: 10px;
}
.overlay-text-content {
padding: 0 24px 8px;
display: flex;
flex-direction: column;
}
.swiper-name {
color: #fff;
font-size: 20px;
font-weight: 500;
margin-bottom: 6px;
opacity: 0.95;
}
.swiper-desc {
color: rgba(255, 255, 255, 0.7);
font-size: 13px;
line-height: 1.5;
} }
.swiper-dots { .swiper-dots {
position: absolute;
left: 0;
right: 0;
bottom: 2px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
padding: 4px 0 12px; padding: 0;
} }
.dot { .dot {
width: 4px; width: 5px;
height: 4px; height: 5px;
border-radius: 2px; border-radius: 3px;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.42);
margin: 0 4px; margin: 0 3px;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.dot.active { .dot.active {
width: 12px; width: 14px;
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.95);
} }
.swiper-empty { .swiper-empty {
...@@ -655,10 +716,100 @@ onShow(() => { ...@@ -655,10 +716,100 @@ onShow(() => {
box-sizing: border-box; box-sizing: border-box;
} }
.empty-text { .empty-card {
font-size: var(--l-font-sm);
color: #999;
margin: auto; margin: auto;
width: 70%;
min-height: 118px;
border-radius: 18px;
background: rgba(255, 255, 255, 0.86);
box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
border: 1px solid #e3ecf8;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.empty-title {
font-size: 16px;
font-weight: 600;
color: #1e293b;
margin-bottom: 6px;
}
.empty-text {
font-size: 13px;
color: #94a3b8;
}
.page-container :deep(.right-content-box) {
padding: 6px 0 var(--l-spacing-2xl);
}
.page-container :deep(.module-box) {
margin-bottom: 10px;
}
.page-container :deep(.module-box .common-title),
.page-container :deep(.tool-box .common-title) {
height: 44px;
padding-left: 14px;
}
.page-container :deep(.module-box .title-text),
.page-container :deep(.tool-box .title-text) {
font-size: 15px;
font-weight: 600;
color: #1e293b;
}
.page-container :deep(.module-box .content-box) {
padding: 0 2px 2px;
}
.page-container :deep(.tool-box) {
background: rgba(255, 255, 255, 0.9);
border: 1px solid #deebfb;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
flex: 1.25;
min-height: 0;
}
.page-container :deep(.tool-box .common-title) {
border-bottom: 1px solid #e6eef9;
background: linear-gradient(135deg, rgba(243, 248, 255, 0.95) 0%, rgba(236, 244, 255, 0.95) 100%);
}
.page-container :deep(.tool-box .content-box) {
flex: 1;
min-height: 0;
padding: 6px 10px 8px;
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
align-items: center;
}
.page-container :deep(.tool-box .content-box > *) {
width: 100%;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.page-container :deep(.tool-box .content-box .entrance-list) {
justify-content: center;
align-content: flex-start;
padding: 0 4px;
box-sizing: border-box;
}
.page-container :deep(.tool-box .content-box .entrance-item) {
width: 96px;
margin-right: 0;
margin-left: 0;
margin-bottom: 12px;
} }
.detail-content { .detail-content {
......
...@@ -5,21 +5,28 @@ ...@@ -5,21 +5,28 @@
:closeable="true" :closeable="true"
title="设置" title="设置"
@close="close"> @close="close">
<view class="setting-panel">
<view class="setting-content"> <view class="setting-content">
<view class="app-info"> <view class="app-info">
<view class="logo-placeholder"></view> <view class="logo-placeholder">
<text class="logo-text">展</text>
</view>
<text class="app-name">展业助手</text> <text class="app-name">展业助手</text>
<text class="version">版本号:V{{ version }}</text> <text class="version">版本号 V{{ version }}</text>
</view>
<view class="version-bar">
<text class="version-bar-text">当前版本可正常使用</text>
<view class="check-btn" @tap="handleCheck"> <view class="check-btn" @tap="handleCheck">
<text class="check-btn-text">检查更新</text> <text class="check-btn-text">检查更新</text>
</view> </view>
</view> </view>
<view class="btn-group"> <view class="btn-group">
<view class="btn-item" @tap="changeAccount"> <view class="btn-item btn-item-primary" @tap="changeAccount">
<text class="btn-item-text">切换账号</text> <text class="btn-item-text btn-item-text-primary">切换账号</text>
</view>
<view class="btn-item btn-item-ghost" @tap="handleLogout">
<text class="btn-item-text btn-item-text-ghost">退出</text>
</view> </view>
<view class="btn-item logout" @tap="handleLogout">
<text class="btn-item-text">退出</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -78,113 +85,148 @@ defineExpose({ ...@@ -78,113 +85,148 @@ defineExpose({
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.setting-box { .setting-panel {
width: 560px; width: 86vw;
background: #ffffff; max-width: 360px;
border-radius: var(--l-radius-xl); min-width: 280px;
border-radius: 18px;
overflow: hidden; overflow: hidden;
background: #ffffff;
box-shadow: none;
margin: 0 auto;
} }
.setting-header { .setting-content {
height: 80px; padding: 20px;
box-sizing: border-box;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
position: relative;
border-bottom: 1px solid #eee;
} }
.setting-title { .app-info {
font-weight: 500; display: flex;
font-size: var(--l-font-xl); flex-direction: column;
color: #1a1a1a; align-items: center;
margin-bottom: 16px;
} }
.setting-close { .logo-placeholder {
position: absolute; width: 68px;
right: var(--l-spacing-lg); height: 68px;
top: 50%; background: #1677ff;
transform: translateY(-50%); border-radius: 18px;
padding: var(--l-spacing-sm); margin-bottom: 10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-shadow: 0 8px 18px rgba(22, 119, 255, 0.28);
} }
.close-icon { .logo-text {
font-size: 32px; font-size: 28px;
color: #1a1a1a; font-weight: 700;
line-height: 1; color: #ffffff;
} }
.setting-content { .app-name {
padding: var(--l-spacing-xl); font-size: 19px;
font-weight: 700;
color: #1e293b;
margin-bottom: 4px;
} }
.app-info { .version {
display: flex; font-size: 12px;
flex-direction: column; color: #8391a7;
align-items: center;
margin-bottom: 40px;
} }
.logo-placeholder { .version-bar {
width: 64px; width: 100%;
height: 64px; height: 44px;
background: #e8eaef;
border-radius: 12px; border-radius: 12px;
margin-bottom: var(--l-spacing-md); background-color: #eef5ff;
padding: 0 12px;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
} }
.app-name { .version-bar-text {
font-size: var(--l-font-lg); font-size: 12px;
font-weight: 500; color: #5f7ea8;
color: #1a1a1a;
margin-bottom: var(--l-spacing-xs);
} }
.version { .check-btn {
font-size: var(--l-font-sm); height: 28px;
color: #808291; padding: 0 12px;
margin-bottom: var(--l-spacing-md); background: #eaf2ff;
border-radius: 14px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
} }
.check-btn { .check-btn-text {
padding: var(--l-spacing-sm) var(--l-spacing-lg);
background: #e8eaef;
border-radius: var(--l-radius-md);
.check-btn-text {
font-size: 12px; font-size: 12px;
color: #1a1a1a; color: #1677ff;
} font-weight: 600;
} }
.btn-group { .btn-group {
width: 100%;
display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.btn-item { .btn-item {
width: 100px; width: 100%;
height: 38px; height: 44px;
padding: var(--l-spacing-md) var(--l-spacing-lg); border-radius: 12px;
background: #3773f8; display: flex;
border-radius: var(--l-radius-md); flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-bottom: 12px; margin-bottom: 12px;
&:last-child { }
.btn-item:last-child {
margin-bottom: 0; margin-bottom: 0;
}
} }
.btn-item-primary {
background: #1677ff;
box-shadow: 0 8px 16px rgba(22, 119, 255, 0.24);
}
.btn-item-ghost {
background: #ffffff;
border: none;
}
.btn-item-text { .btn-item-text {
font-size: 14px; font-size: 14px;
font-weight: 600;
opacity: 1;
display: block;
}
.btn-item-text-primary {
color: #ffffff; color: #ffffff;
} }
.btn-item.logout {
background: #e8eaef; .btn-item-text-ghost {
color: #1a1a1a; color: #1e293b;
.btn-item-text { }
color: #1a1a1a;
} .setting-panel text {
opacity: 1;
} }
</style> </style>
...@@ -86,7 +86,7 @@ import { computed, ref, onMounted } from "vue"; ...@@ -86,7 +86,7 @@ import { computed, ref, onMounted } from "vue";
import CenterPopup from "@/components/CenterPopup.uvue"; import CenterPopup from "@/components/CenterPopup.uvue";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import SettingBox from "@/components/HomeFrame/SettingBox.uvue"; import SettingBox from "./SettingBox.uvue";
const props = defineProps<{ const props = defineProps<{
userInfo?: null | UTSJSONObject userInfo?: null | UTSJSONObject
......
...@@ -147,6 +147,13 @@ function onTabChange(e: any): void { ...@@ -147,6 +147,13 @@ function onTabChange(e: any): void {
} }
} }
function onTopTabClick(index: number): void {
if (currentTabIndex.value == index) {
return
}
onTabChange({ index } as UTSJSONObject)
}
// ========== 品牌选择 ========== // ========== 品牌选择 ==========
type PerformanceTypeItem = { label: string; value: number } type PerformanceTypeItem = { label: string; value: number }
...@@ -370,6 +377,42 @@ onUnmounted(() => { ...@@ -370,6 +377,42 @@ onUnmounted(() => {
flex-shrink: 0; flex-shrink: 0;
} }
.top-tabs {
height: 50px;
flex-direction: row;
align-items: center;
justify-content: center;
}
.top-tab-item {
min-width: 110px;
height: 50px;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 6px;
box-sizing: border-box;
}
.top-tab-text {
font-size: 16px;
color: #667085;
font-weight: 500;
}
.top-tab-text-active {
color: #1677ff;
font-weight: 700;
}
.top-tab-line {
width: 24px;
height: 3px;
border-radius: 2px;
background-color: #1677ff;
margin-top: 9px;
}
.reception-home-content { .reception-home-content {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
......
...@@ -4,21 +4,20 @@ ...@@ -4,21 +4,20 @@
<text class="title-text">门店客流情况</text> <text class="title-text">门店客流情况</text>
</view> </view>
<view class="funnel-container"> <view class="funnel-container">
<view class="funnel-chart-box"> <view class="flow-layout">
<view class="funnel-box"> <view class="funnel-main">
<view class="funnel-bg-layer"></view> <view class="metric-card">
<view class="funnel-content"> <text class="metric-label">累计交付数</text>
<text class="funnel-text-sm">累计交付数</text> <text class="metric-value">{{ funnelCountDisplay1 }}</text>
<text class="funnel-text-lg">{{ funnelCountDisplay1 }}</text>
<view class="funnel-divider"></view>
<text class="funnel-text-sm">实际触客数</text>
<text class="funnel-text-lg">{{ funnelCountDisplay2 }}</text>
</view> </view>
<view class="metric-card metric-card-secondary">
<text class="metric-label">实际触客数</text>
<text class="metric-value">{{ funnelCountDisplay2 }}</text>
</view> </view>
<view class="funnel-bracket"></view> </view>
<view class="funnel-side"> <view class="rate-badge">
<text class="side-text-sm">实际触客率</text> <text class="rate-caption">触客率</text>
<text class="side-text-lg">{{ contactRateMasked }}%</text> <text class="rate-value">{{ contactRateMasked }}%</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -107,113 +106,89 @@ const contactRateMasked = computed((): string => { ...@@ -107,113 +106,89 @@ const contactRateMasked = computed((): string => {
} }
.funnel-container { .funnel-container {
background-color: rgba(255, 255, 255, 0.6); background: linear-gradient(160deg, rgba(244, 248, 255, 0.96) 0%, rgba(236, 244, 255, 0.96) 100%);
border-radius: 12px; border-radius: 16px;
padding: 12px 16px 12px 16px; padding: 12px 12px 10px;
padding-right: 90px;
margin-top: 10px; margin-top: 10px;
flex-direction: column; flex-direction: column;
align-items: center; overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.8);
overflow: visible;
}
.funnel-title {
font-size: 12px;
font-weight: 500;
color: #64748b;
margin-bottom: 12px;
} }
.funnel-chart-box { .flow-layout {
width: 172px; width: 100%;
height: 100px; min-height: 108px;
flex-direction: row; flex-direction: row;
position: relative;
align-items: center; align-items: center;
justify-content: center; justify-content: space-between;
overflow: visible;
} }
.funnel-box { .funnel-main {
width: 100%; flex: 1;
height: 100%; min-height: 108px;
position: relative;
border-radius: 10px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: stretch;
justify-content: center; justify-content: center;
overflow: hidden; padding-right: 10px;
box-shadow: 0 4px 10px rgba(22, 119, 255, 0.15); box-sizing: border-box;
} }
.funnel-bg-layer { .metric-card {
position: absolute; width: 100%;
left: 0; min-height: 48px;
top: 0; border-radius: 12px;
right: 0; background: rgba(255, 255, 255, 0.86);
bottom: 0; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.10);
background-image: linear-gradient(to right bottom, #1677ff, #469cff); padding: 8px 12px;
border-radius: 10px; box-sizing: border-box;
}
.funnel-content {
position: relative;
flex-direction: column; flex-direction: column;
align-items: center; align-items: flex-start;
justify-content: center; justify-content: center;
} }
.funnel-text-sm { .metric-card-secondary {
font-size: 11px; margin-top: 8px;
color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.74);
} box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
.funnel-text-lg {
font-size: 16px;
font-weight: bold;
color: #ffffff;
}
.funnel-divider {
width: 110px;
height: 1px;
background-color: rgba(255, 255, 255, 0.3);
margin-top: 4px;
margin-bottom: 4px;
} }
.funnel-bracket { .metric-label {
position: absolute; font-size: 11px;
right: -40px; color: #7b90ad;
top: 50%; line-height: 14px;
margin-top: -16px; }
width: 32px;
height: 32px; .metric-value {
border-left-width: 2px; margin-top: 3px;
border-left-style: solid; font-size: 19px;
border-left-color: #60a5fa; font-weight: 700;
border-bottom-width: 2px; color: #1e40af;
border-bottom-style: solid; line-height: 22px;
border-bottom-color: #60a5fa; }
}
.rate-badge {
.funnel-side { width: 94px;
position: absolute; height: 94px;
right: -75px; border-radius: 47px;
top: 50%; background-color: #eaf2ff;
margin-top: -16px; background-image: linear-gradient(145deg, #eaf2ff 0%, #dbeafe 100%);
border: 1px solid #cfe0ff;
box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
padding: 0 8px;
box-sizing: border-box;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center;
} }
.side-text-sm { .rate-caption {
font-size: 11px; font-size: 11px;
color: #1677ff; color: #5f7ea8;
} }
.side-text-lg { .rate-value {
font-size: 14px; margin-top: 2px;
font-weight: bold; font-size: 17px;
color: #1677ff; font-weight: 700;
color: #1d4ed8;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!