Files
wxapp_escort/pages/mine/mine.wxss
T

293 lines
9.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
page {
/* 配色令牌来自 app.wxss(全站唯一来源),本页不再留副本;
页面底色改用暖白纸面,与首页一致 */
background-color: var(--paper);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.container {
min-height: 100vh;
box-sizing: border-box;
display: flex;
flex-direction: column;
/* 给 fixed 的自定义 tabBar 留位,避免底部版权被盖住 */
padding: 0 32rpx calc(140rpx + env(safe-area-inset-bottom));
}
/* 顶部身份行:头像、昵称、出口三项左对齐浮在纸面上,与下方三个区块
共用同一条 32rpx 左基线,并复现首页 hero 的「纸面上 + 主 CTA」语言。
刻意不做成白卡——身份行与功能卡不是一类东西,
按硬约束 3「需区分时先改结构,不要加颜色」,这里用"去卡"而非换色区分;
若改用暖橙框,会与全站浅橙卡"区块收口"的语义打架,
且未登录时浅橙底上再叠实心橙胶囊属暖色叠暖色,故不加色。
微信胶囊底沿约落在 152rpx,上距现取 176rpx(余量 24rpx)。
这是安全距不是设计留白:下限约 160rpx,再小就会与胶囊挤在一起。
纵向 32rpx 内距给身份行本身留出上下呼吸,
同时把整行热区从 128rpx 撑到 192rpx(含内距),未登录点整行也更好点中 */
.header-card {
display: flex;
flex-direction: row;
align-items: center;
margin: 176rpx 0 24rpx;
padding: 32rpx 0;
}
/* 无框行的按下反馈:与首页 .section-link:active 同一手法(整体淡出),
不引入新色值;仅已登录时可点,未登录时 hover-class 传 'none' */
.header-card-hover {
opacity: 0.7;
}
.avatar {
width: 128rpx;
height: 128rpx;
margin-right: 28rpx;
/* 圆角方形而非正圆,与微信「我」页头像同形 */
border-radius: 24rpx;
flex-shrink: 0;
/* 默认头像底座要把 t-icon 居中,位图头像不受影响 */
display: flex;
align-items: center;
justify-content: center;
/* 默认头像底座带 2rpx 描边,border-box 保证尺寸仍是 128rpx 不被撑到 132rpx */
box-sizing: border-box;
}
/* 默认头像底座:浅橙衬底 + 暖陶土线标,走项目既有的「图标衬底」档
(同 .quick-icon 一类),而不是首页 .brand-mark 的实心橙档。
理由是面积:128rpx 实心橙是 .brand-mark(56rpx) 的 5.2 倍,
已从"小体量印记"跨到"色块",而它承载的只是"头像待设置"这一低价值信息;
且 --brand-strong 在本项目的语义是主操作/选中态,让占位头像占用它会误导。
浅橙块按既有规矩靠 2rpx --brand-line 描边托形、不加阴影;
--brand-ink 落 --brand-soft 上 5.96:1,比白字压 #B8520A 的 4.94:1 更高 */
.avatar-default {
background: var(--brand-soft);
border: 2rpx solid var(--brand-line);
}
/* 文字块:主行昵称与副行账号分别贴近头像的上、下沿(各内收 12rpx),
中间的空隙交给 space-between 撑开——它随头像高度自适应,
比写死 margin 稳。align-self: stretch 让文字块撑满 128rpx 头像高度。
min-width 归零,长昵称/长账号才能在右侧出口前收成省略号 */
.header-info {
flex: 1;
min-width: 0;
align-self: stretch;
display: flex;
flex-direction: column;
justify-content: space-between;
/* 两行各向内收 12rpx:与头像边缘严格齐平时读起来"被撑满了",
略微内收后间隙从 57rpx 收到约 33rpx,视觉上更聚拢 */
padding: 12rpx 0;
}
/* 未登录时只有昵称一行,space-between 会把它顶到最上,故改回居中 */
.header-info-single {
justify-content: center;
}
/* 行高收到 1.15(约半行距 3rpx):1.3 的半行距会把字形从块边缘推进 5.5rpx,
"顶部对齐"就会变成"看着差一点"。1.15 把视觉边缘压到与头像边缘相差 3rpx 内,
同时仍留一点余量,不至于配合 overflow: hidden 把字形切掉 */
.user-name {
font-size: 36rpx;
font-weight: 700;
color: var(--ink);
line-height: 1.15;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 副行账号:muted,比主行小两档,与微信副行同层级。
与主行的间距不再用 margin——已由 .header-info 的 space-between 撑开 */
.user-account {
font-size: 26rpx;
color: var(--muted);
line-height: 1.15;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 身份行右侧 chevron:与菜单行的 .menu-arrow 同形同色,
整行因此读成"菜单里的一行",点击暗示不必再添文字 */
.header-arrow {
flex-shrink: 0;
color: var(--muted);
}
/* 未登录时的登录胶囊:右对齐的一枚小胶囊。
它是本页唯一的实心暖橙块,独占「全页同类实心块不超过一处」的额度;
登录成功后整枚换成 chevron,「我的服务」区块随之出现 */
.login-btn {
width: 176rpx;
margin: 0;
padding: 18rpx 0;
border: none;
border-radius: 999rpx;
background: var(--brand-strong);
box-shadow: var(--shadow-cta);
color: var(--white);
font-size: 28rpx;
font-weight: 700;
letter-spacing: 2rpx;
line-height: 1.4;
flex-shrink: 0;
}
.login-btn::after {
border: none;
}
/* 区块间距:卡片改通栏、去掉区块抬头后,组与组之间只靠三样东西分界——
上一块的 2rpx 下边线、这 24rpx 纸面留白、下一块的 2rpx 上边线。
留白与身份行的下距同值,全页只有这一种竖向节奏。
这是全页唯一收窄过的一处:纸面与白面的填充差只有 1.05:1,
分界其实全靠这一条纸面缝在看,所以不能收到贴边,24rpx(12px)是下限。
原「单竖条 + 标题」的抬头样式(.section-head/.section-bar/.section-title)
已随标题一并删除,不留死代码 */
.section + .section {
margin-top: 24rpx;
}
.menu-list {
/* 通栏白卡:左右顶到屏幕两侧,做法与 itemlist 的服务分组同源
(margin 负向抵消容器 32rpx 内距)。圆角必须为 0,
否则满宽块的圆角会切在屏幕边上;上、下各一条 2rpx 发丝线托形。
行内容靠 .menu-item 自己的 32rpx 内距回到同一左基线,
组内分隔线(.menu-item::after)则左缩进到文字左缘,不压到图标 */
margin: 0 -32rpx;
background: var(--white);
border-top: 2rpx solid var(--line);
border-bottom: 2rpx solid var(--line);
box-shadow: var(--shadow-card);
}
.menu-item {
/* 给内嵌分隔线(::after)做定位参照 */
position: relative;
display: flex;
align-items: center;
padding: 32rpx;
}
/* 组内分隔线不横跨整行:左端从文字左缘起,避开图标和它的右侧间距;
右端仍通到卡片边缘。
左缩进 = 行内距 32 + 图标 40 + 图标右距 24 = 96rpx */
.menu-item::after {
content: '';
position: absolute;
left: 96rpx;
right: 0;
bottom: 0;
height: 2rpx;
background: var(--line);
}
.menu-item:last-child::after {
display: none;
}
.menu-item-hover {
background: var(--brand-soft);
}
/* t-icon 未传 color 属性,这里用 CSS 变量着色即可 */
.menu-icon {
margin-right: 24rpx;
color: var(--brand-ink);
}
.menu-text {
flex: 1;
font-size: 30rpx;
font-weight: 400;
/* 比标题层的 --ink 轻一档的暖墨,弱化"导航项"的视觉重量 */
color: var(--ink-2);
}
.menu-arrow {
flex-shrink: 0;
color: var(--muted);
}
/* 退出登录:单独一个通栏白块(与 .menu-list 同法、同语言),
但只有一行、居中、无图标无 chevron——动作与导航的区分交给结构,
不交给颜色(状态色不得用于按钮,见 DESIGN.md §三)。
上距 24rpx 沿用全页唯一的那一种竖向节奏 */
.logout-block {
display: flex;
align-items: center;
justify-content: center;
margin: 24rpx -32rpx 0;
padding: 32rpx;
background: var(--white);
border-top: 2rpx solid var(--line);
border-bottom: 2rpx solid var(--line);
box-shadow: var(--shadow-card);
}
/* 按下反馈与 .menu-item-hover 同源,不引入新色值 */
.logout-block-hover {
background: var(--brand-soft);
}
/* 字色走 --muted:退出是次要动作,不给它主色,也不用状态色 */
.logout-text {
font-size: 30rpx;
color: var(--muted);
}
/* 页脚:B 端合作文字链 + 版本信息,低调可读 */
.footer-section {
display: flex;
flex-direction: column;
align-items: center;
margin-top: auto;
padding-top: 60rpx;
}
.footer-links {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
/* 文字只有 24rpx 高,用 padding 撑热区、等量负外边距抵消,不影响行距 */
.footer-link {
padding: 16rpx 0;
margin: -16rpx 0;
font-size: 24rpx;
color: var(--muted);
letter-spacing: 1rpx;
}
.footer-link:active {
color: var(--brand-strong);
}
/* 细竖线分隔:替代原中点字符,避免一行多点 */
.footer-sep {
width: 2rpx;
height: 20rpx;
margin: 0 24rpx;
background: var(--faint);
flex-shrink: 0;
}
/* 版本 + 版权同处一行,复用 .footer-sep 做竖线分隔 */
.footer-meta {
display: flex;
align-items: center;
}
.version {
font-size: 24rpx;
color: var(--muted);
}
.copyright {
font-size: 24rpx;
color: var(--muted);
}