@use '../variables' as *; .side-nav { display: flex; flex-direction: column; width: 2rem; height: var(--app-height, 100vh); background: $bg-white; color: #fff; padding: 0.2rem 0.12rem; box-sizing: border-box; position: fixed; left: 0; top: 0; &__header { display: flex; align-items: center; gap: 0.08rem; padding: 0.1rem 0.08rem; margin-bottom: 0.2rem; } &__avatar { width: 0.36rem; height: 0.36rem; border-radius: 50%; background: #2e3142; display: flex; align-items: center; justify-content: center; font-size: 0.18rem; } &__logo-text { font-size: 0.16rem; font-weight: 600; color: #fff; } // Logo 图片 &__logo-img { width: 1.32rem; height: 0.34rem; display: block; } &__menu { display: flex; flex-direction: column; gap: 0.04rem; flex: 1; } &__item { display: flex; align-items: center; gap: 0.04rem; padding: 0.1rem 0.12rem; border-radius: 0.08rem; color: #9598ab; text-decoration: none; cursor: pointer; transition: background 0.2s, color 0.2s; font-size: 0.14rem; &:hover { background: #EDF9FA; color: $accent; svg{ color: $btn-dark; } } &--active { background: #EDF9FA; color: $accent; } } &__item-icon { width: 0.2rem; height: 0.2rem; object-fit: contain; font-size: 0.16rem; } &__item-label { } &__badge { background: #e85635; color: #fff; font-size: 0.1rem; padding: 0.02rem 0.06rem; border-radius: 0.2rem; font-weight: 600; } /* 索引0菜单项的"全网"小标签 */ &__tag-quanwang { display: flex; align-items: center; justify-content: center; padding: 0.02rem 0.04rem; min-width: 0.28rem; height: 0.17rem; background: linear-gradient(128.17deg, #52CAD1 0%, #82D79B 100%); border-radius: 0.04rem; font-family: 'MiSans'; font-style: normal; font-weight: 520; font-size: 0.10rem; line-height: 0.13rem; text-align: center; color: #FFFFFF; flex: none; } &__footer { display: flex; flex-direction: column; gap: 0.04rem; padding-top: 0.12rem; } } .side-nav__dialog-overlay { position: fixed; top: 0; left: 0; width: 100%; height: var(--app-height, 100vh); background: $overlay-bg; display: flex; align-items: center; justify-content: center; z-index: 1000; } .side-nav__dialog { background: $bg-white; border-radius: 0.12rem; width: 4rem; max-width: 90vw; box-shadow: 0 0.04rem 0.2rem rgba(0, 0, 0, 0.15); } .side-nav__dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 0.16rem 0.2rem; border-bottom: 1px solid $border-color; font-size: 0.16rem; font-weight: 600; color: $text-dark; } .side-nav__dialog-close { cursor: pointer; display: flex; align-items: center; justify-content: center; width: 0.24rem; height: 0.24rem; border-radius: 4px; transition: background 0.2s; &:hover { background: rgba(0, 0, 0, 0.05); } svg { width: 0.14rem; height: 0.14rem; } } .side-nav__dialog-body { padding: 0.2rem; font-size: 0.14rem; color: $text-dark; } // ==================== 消息通知弹窗(左右分栏) ==================== .side-nav__message-dialog { box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; padding: 0.24rem 0.32rem; gap: 0.24rem; width: 8rem; height: 6rem; max-width: 90vw; max-height: 90vh; background: linear-gradient(180deg, #EDF9FA 0%, #FFFFFF 12.08%); border: 1px solid #F0F0F0; box-shadow: 0 0 0.16rem rgba(0, 0, 0, 0.05); border-radius: 0.12rem; } .side-nav__message-dialog-header { display: flex; align-items: center; justify-content: space-between; width: 100%; flex-shrink: 0; span:first-child { font-weight: 520; font-size: 0.18rem; line-height: 0.24rem; color: $text-dark; } } .side-nav__message-dialog-content { display: flex; flex-direction: row; align-items: flex-start; gap: 0.16rem; width: 100%; flex: 1; overflow: hidden; background: $bg-white; } // 左侧消息列表 .side-nav__message-list { display: flex; flex-direction: column; gap: 0.04rem; width: 2.24rem; height: 100%; overflow-y: auto; flex-shrink: 0; } .side-nav__message-list-item { display: flex; flex-direction: column; align-items: flex-start; padding: 0.16rem 0.12rem; border-radius: 0.08rem; cursor: pointer; transition: background 0.2s; &:hover { background: #F6F6F6; } &--active { background: #EDF9FA; } } // 列表项内部行布局 .side-nav__message-list-item-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; } .side-nav__message-list-item-left { display: flex; flex-direction: row; align-items: center; gap: 0.08rem; } .side-nav__message-unread-dot { width: 0.08rem; height: 0.08rem; border-radius: 50%; background: $accent; flex-shrink: 0; } .side-nav__message-list-title { font-weight: 520; font-size: 0.14rem; line-height: 0.19rem; color: $text-dark; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side-nav__message-list-date { font-weight: 330; font-size: 0.12rem; line-height: 0.16rem; color: $text-light; flex-shrink: 0; } .side-nav__message-list-loading, .side-nav__message-list-empty { padding: 0.16rem; text-align: center; font-size: 0.12rem; color: $text-light; } // 右侧消息详情 .side-nav__message-detail { flex: 1; height: 100%; overflow-y: auto; position: relative; padding: 0.16rem 0.24rem; } .side-nav__message-detail-header { display: flex; justify-content: space-between; align-items: center; } .side-nav__message-detail-title { font-weight: 630; font-size: 0.22rem; line-height: 0.29rem; color: $text-dark; } .side-nav__message-detail-time { font-weight: 330; font-size: 0.12rem; line-height: 0.16rem; color: $text-middle; flex-shrink: 0; } .side-nav__message-detail-divider { width: 100%; height: 1px; background: #F0F0F0; margin: 0.16rem 0; } .side-nav__message-detail-content { font-weight: 330; font-size: 0.14rem; line-height: 0.24rem; color: $text-dark; white-space: pre-wrap; word-break: break-word; } .side-nav__message-detail-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.14rem; color: $text-light; } // 反馈弹窗 .feedback-dialog { padding: 0.28rem 0.24rem; width: 4.83rem; &__title { font-size: 0.2rem; font-weight: 700; color: $text-dark; margin-bottom: 0.24rem; } &__section { margin-bottom: 0.2rem; } &__label { font-size: 0.14rem; font-weight: 600; color: $text-dark; margin-bottom: 0.12rem; } &__options { display: flex; flex-direction: column; gap: 0.08rem; } &__option { padding: 0.08rem 0.16rem; background: $bg-main; border-radius: 0.08rem; font-size: 0.14rem; color: $text-dark; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; &:hover { background: $theme-color; border-color: $accent; } &--active { background: $theme-color; border-color: $accent; color: $accent-hover; } } &__textarea { width: 100%; padding: 0.12rem 0.14rem; background: $bg-main; border: 1px solid transparent; border-radius: 0.08rem; font-size: 0.13rem; color: $text-dark; resize: none; outline: none; box-sizing: border-box; font-family: inherit; transition: border-color 0.2s; &::placeholder { color: $text-light; } &:focus { border-color: $accent; } } &__actions { display: flex; gap: 0.12rem; margin-top: 0.24rem; } &__btn { flex: 1; padding: 0.12rem 0; border-radius: 0.24rem; font-size: 0.14rem; font-weight: 500; cursor: pointer; transition: all 0.2s; border: 1px solid $border-color; &--cancel { background: $bg-white; color: $text-dark; &:hover { background: $bg-main; } } &--submit { background: $btn-dark; color: $bg-white; border-color: $btn-dark; &:hover { background: $btn-dark-hover; border-color: $btn-dark-hover; } } } } // ==================== 邀请会员卡片 ==================== .side-nav__referral-card { width: 100%; background: linear-gradient(128.17deg, #52CAD1 0%, #82D79B 100%); border-radius: 0.08rem; padding: 0.16rem; box-sizing: border-box; margin-top: 0.12rem; } .side-nav__referral-title { font-size: 0.16rem; font-weight: 630; color: #FFFFFF; line-height: 0.21rem; } .side-nav__referral-subtitle { font-size: 0.10rem; font-weight: 330; color: #EAFBFC; line-height: 0.13rem; margin-top: 0.04rem; } .side-nav__referral-panel { background: #FFFFFF; box-shadow: 0px 0.02rem 0.06rem rgba(26, 26, 26, 0.05); border-radius: 0.06rem; padding: 0.10rem 0.08rem; margin-top: 0.10rem; } .side-nav__referral-row { display: flex; align-items: center; justify-content: space-between; } .side-nav__referral-label { font-size: 0.10rem; font-weight: 330; color: #6B7280; line-height: 0.13rem; } .side-nav__referral-value { font-size: 0.10rem; font-weight: 520; color: #52CAD1; line-height: 0.13rem; } .side-nav__referral-track { width: 100%; height: 0.02rem; background: #D7F1F3; border-radius: 9999px; margin-top: 0.06rem; overflow: hidden; } .side-nav__referral-fill { height: 100%; background: #52CAD1; border-radius: 9999px; } .side-nav__referral-divider { width: 100%; border-top: 0.01rem solid #8C8C8C; margin-top: 0.08rem; } .side-nav__referral-tip { font-size: 0.10rem; font-weight: 330; color: #1A1A1A; line-height: 0.13rem; margin-top: 0.08rem; strong { font-weight: 630; } } .side-nav__referral-action { font-size: 0.11rem; font-weight: 520; color: #52CAD1; line-height: 0.15rem; text-align: center; margin-top: 0.08rem; cursor: pointer; &:hover { opacity: 0.8; } } // ==================== 用户信息模块 ==================== .side-nav__user-info { display: flex; align-items: center; justify-content: space-between; width: 100%; background: #fff; border-radius: 0.08rem; padding: 0.12rem 0.16rem; box-sizing: border-box; margin-top: 0.12rem; cursor: pointer; &:hover, &:active, &--active { background: #F3F4F6; } } .side-nav__user-left { display: flex; flex-direction: column; gap: 0.04rem; } .side-nav__user-phone { font-size: 0.14rem; font-weight: 330; color: #1A1A1A; line-height: 0.19rem; } .side-nav__user-member-tag { display: inline-flex; align-items: center; justify-content: center; padding: 0.02rem 0.04rem; border-radius: 0.04rem; font-size: 0.10rem; font-weight: 520; line-height: 0.13rem; width: fit-content; // 正式会员:主题色字 + 浅绿底 &--formal { color: #52CAD1; background: #EDF9FA; } // 试用会员:橙色字 + 浅橙底 &--trial { color: #F59E0B; background: #FFFBF5; } // 免费用户:中灰字 + 灰底 &--free { color: #6A7282; background: #F3F4F6; } } .side-nav__user-bell { width: 0.20rem; height: 0.20rem; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; svg { width: 100%; height: 100%; } &:hover { opacity: 0.7; } } // 铃铛右上角未读红点 .side-nav__user-bell-dot { position: absolute; top: -0.005rem; right: 0.01rem; width: 0.08rem; height: 0.08rem; background: #EF4444; border-radius: 50%; } // ==================== 账户弹窗 ==================== .side-nav__user-info-wrapper { position: relative; margin-top: 0.12rem; } .side-nav__account-popup { position: absolute; bottom: calc(100% + 0.08rem); left: 0; width: 100%; background: #FFFFFF; border: 1px solid #F0F0F0; box-shadow: 0px 0.02rem 0.08rem rgba(0, 0, 0, 0.04); border-radius: 0.08rem; overflow: hidden; z-index: 100; } .side-nav__account-popup-header { padding: 0.16rem; background: linear-gradient(180deg, #EDF9FA 0%, #FFFFFF 38.18%); border-radius: 0.08rem 0.08rem 0 0; } .side-nav__account-popup-header-row { display: flex; align-items: center; justify-content: space-between; } .side-nav__account-popup-header-left { display: flex; flex-direction: column; gap: 0.04rem; } .side-nav__account-popup-member-type { font-size: 0.14rem; font-weight: 450; line-height: 0.19rem; // 正式会员 — 主题色 &--formal { color: $accent; } // 试用会员 — 橙色 &--trial { color: #F59E0B; } // 免费用户 — 中灰色 &--free { color: $text-middle; } } .side-nav__account-popup-expire { font-size: 0.12rem; font-weight: 330; color: $text-light; line-height: 0.16rem; } .side-nav__account-popup-detail { font-size: 0.12rem; font-weight: 330; color: $text-light; line-height: 0.16rem; cursor: pointer; &:hover { color: $accent; } } .side-nav__account-popup-item { padding: 0.12rem 0.16rem; font-size: 0.12rem; font-weight: 330; color: #000000; line-height: 0.16rem; cursor: pointer; &:hover { background: $bg-main; } }