This commit is contained in:
hero920103 committed 2026-11-03 09:03:42 +08:00
commit 5d7ed43570
16 files changed
+11811 -1008

No files matched your search

+448 -303
View File
@@ -1,161 +1,195 @@
<template>
<view class="login-page">
<!-- 品牌区 -->
<view class="brand">
<view class="brand-logo">
<FaIcon name="shield-halved" color="#ffffff" :size="20" />
<!-- 背景装饰(纯视觉,不拦截点击) -->
<view class="deco deco-a" />
<view class="deco deco-b" />
<!-- 顶部自绘导航(账号密码 / 选择企业视图) -->
<view v-if="step !== 'main'" class="nav-bar" :style="{ paddingTop: navPadTop }">
<view class="nav-back" :class="{ invisible: !canGoBack }" @tap="onNavBack">
<FaIcon name="chevron-left" color="#1e293b" :size="20" />
</view>
<text class="brand-name">云泽统一认证</text>
<text class="brand-desc">欢迎回来,开启云泽服务</text>
<text class="nav-title">{{ navTitle }}</text>
<view class="nav-side" />
</view>
<view class="card">
<!-- ============ 选择企业(一人多企业) ============ -->
<block v-if="step === 'tenant'">
<view class="panel-head">
<text class="panel-title">选择企业</text>
<text class="panel-sub">该账号已加入多家企业,请选择要进入的空间</text>
<!-- 品牌区 + 表单卡片 -->
<view class="login-body">
<!-- 品牌区 -->
<view class="brand" :class="{ compact: step !== 'main' }" :style="{ paddingTop: brandPadTop }">
<view class="brand-logo">
<FaIcon name="shield-halved" color="#ffffff" :size="22" />
</view>
<text class="brand-name">云泽统一认证</text>
<text class="brand-desc">一次登录,全平台通行</text>
</view>
<view v-if="errorMsg" class="error-box">
<text class="error-text">{{ errorMsg }}</text>
</view>
<view class="tenant-list">
<view
v-for="item in tenants"
:key="item.tid"
class="tenant-item"
:class="{ disabled: submitting }"
@tap="chooseTenant(item)"
>
<view class="tenant-avatar">
<FaIcon name="building" color="#2563eb" :size="18" />
</view>
<view class="tenant-info">
<text class="tenant-name">{{ item.tenant_name || `企业${item.tid}` }}</text>
<text class="tenant-meta">{{ item.name ? `${item.name} · ` : '' }}企业ID {{ item.tid }}</text>
</view>
<FaIcon name="chevron-right" color="#c8cfdf" :size="14" />
<view class="card">
<!-- ============ 主视图:微信一键登录 ============ -->
<block v-if="step === 'main'">
<view class="panel-head">
<text class="panel-title">欢迎登录</text>
<text class="panel-sub">使用微信手机号,一键完成身份认证</text>
</view>
</view>
<view class="back-row" @tap="backToAccount">
<text class="link">不是我的账号?切换账号</text>
</view>
</block>
<!-- ============ 登录(小程序端微信/账号密码 Tab 切换;H5/APK 仅账号密码) ============ -->
<block v-else>
<view class="panel-head">
<text class="panel-title">{{ showMiniLogin && activeTab === 'account' ? '账号登录' : '欢迎登录' }}</text>
<text v-if="!(showMiniLogin && activeTab === 'account')" class="panel-sub">{{ panelSub }}</text>
</view>
<view v-if="errorMsg" class="error-box">
<text class="error-text">{{ errorMsg }}</text>
</view>
<!-- #ifdef MP-WEIXIN -->
<!-- 微信端默认突出一键登录,账号密码作为次要备用入口 -->
<!-- 微信登录面板 -->
<block v-if="showMiniLogin && activeTab === 'wechat'">
<button
class="btn-wechat"
open-type="getPhoneNumber"
:class="{ disabled: submitting }"
@getphonenumber="onGetPhoneNumber"
>
<FaIcon name="weixin" type="brands" color="#ffffff" :size="18" />
<text>{{ submitting ? '登录中...' : '微信一键登录' }}</text>
</button>
<view class="tip-row">
<text class="tip-text">微信安全授权,快捷登录云泽统一认证</text>
<view v-if="errorMsg" class="error-box">
<text class="error-text">{{ errorMsg }}</text>
</view>
<view class="account-entry" @tap="switchTab('account')">
<text class="account-entry-text">账号登录</text>
<!-- #ifdef MP-WEIXIN -->
<!-- 微信端且服务端已开通:一键登录主 CTA -->
<block v-if="showMiniLogin">
<button
class="btn-wechat"
open-type="getPhoneNumber"
:class="{ disabled: submitting }"
@getphonenumber="onGetPhoneNumber"
>
<FaIcon name="weixin" type="brands" color="#ffffff" :size="20" />
<text class="btn-wechat-text">{{ submitting ? '登录中...' : '微信手机号一键登录' }}</text>
</button>
<view class="tip-row">
<text class="tip-text">首次使用请先用账号密码登录一次,自动完成微信绑定后即可一键登录</text>
</view>
</block>
<view v-else class="loading-box">
<text class="tip-text">正在加载登录方式…</text>
</view>
<!-- #endif -->
<!-- 弱化入口:切换到独立的账号密码登录视图 -->
<view class="alt-entry" @tap="goAccount">
<view class="alt-line" />
<text class="alt-text">使用账号密码登录</text>
<FaIcon name="chevron-right" color="#94a3b8" :size="12" />
<view class="alt-line" />
</view>
</block>
<!-- #endif -->
<!-- 账号密码面板(未开通微信登录的端始终展示) -->
<block v-if="!(showMiniLogin && activeTab === 'wechat')">
<view v-if="showMiniLogin" class="account-mode-label" @tap="switchTab('wechat')">
<text class="account-mode-back">‹ 微信一键登录</text>
</view>
<view class="field">
<text class="field-label">账号</text>
<view class="input-wrap">
<input
v-model="account"
class="field-input"
type="text"
placeholder="手机号 / 邮箱 / 企业账号"
placeholder-class="field-placeholder"
/>
<!-- ============ 账号密码登录(独立视图) ============ -->
<block v-else-if="step === 'account'">
<view class="panel-head">
<text class="panel-title">欢迎回来</text>
<text class="panel-sub">请输入您的账号与密码以继续</text>
</view>
</view>
<view class="field">
<text class="field-label">密码</text>
<view class="input-wrap">
<input
v-model="password"
class="field-input"
:password="!showPassword"
placeholder="请输入密码"
placeholder-class="field-placeholder"
@confirm="handleLogin"
/>
<view class="eye-btn" @tap="showPassword = !showPassword">
<FaIcon
:name="showPassword ? 'eye-slash' : 'eye'"
color="#a7b1c7"
:size="16"
<view v-if="errorMsg" class="error-box">
<text class="error-text">{{ errorMsg }}</text>
</view>
<view class="field">
<text class="field-label">账号</text>
<view class="input-wrap">
<FaIcon name="user" color="#94a3b8" :size="16" />
<input
v-model="account"
class="field-input"
type="text"
placeholder="手机号 / 邮箱 / 企业账号"
placeholder-class="field-placeholder"
/>
</view>
</view>
</view>
<view class="row-extra">
<view class="remember" @tap="rememberMe = !rememberMe">
<view class="checkbox" :class="{ on: rememberMe }" />
<text class="remember-text">记住账号</text>
<view class="field">
<text class="field-label">密码</text>
<view class="input-wrap">
<FaIcon name="lock" color="#94a3b8" :size="16" />
<input
v-model="password"
class="field-input"
:password="!showPassword"
placeholder="请输入密码"
placeholder-class="field-placeholder"
@confirm="handleLogin"
/>
<view class="eye-btn" @tap="showPassword = !showPassword">
<FaIcon
:name="showPassword ? 'eye-slash' : 'eye'"
color="#a7b1c7"
:size="16"
/>
</view>
</view>
</view>
<text class="link" @tap="goForget">忘记密码</text>
</view>
<view
class="btn"
:class="{ disabled: submitting }"
@tap="handleLogin"
>
<text>{{ submitting ? '登录中...' : '登 录' }}</text>
</view>
<view class="row-extra">
<view class="remember" @tap="rememberMe = !rememberMe">
<view class="checkbox" :class="{ on: rememberMe }" />
<text class="remember-text">记住账号</text>
</view>
<text class="link" @tap="goForget">忘记密码</text>
</view>
<view class="back-row">
<text class="tip-text">还没有账号?</text>
<text class="link" @tap="goRegister">立即注册</text>
</view>
<view
class="btn"
:class="{ disabled: submitting }"
@tap="handleLogin"
>
<text>{{ submitting ? '登录中...' : '登 录' }}</text>
</view>
<!-- 登录页不提供注册入口:账号由企业管理员在后台统一开通 -->
<view class="back-row">
<text class="tip-text">没有账号?请联系企业管理员开通</text>
</view>
</block>
<!-- 未勾选协议提示:两个 Tab 面板共用 -->
<view v-if="!agreed && showAgreementTip" class="agree-tip">
<FaIcon name="circle-info" color="#f79009" :size="12" />
<text class="agree-tip-text">请先阅读并勾选同意《用户协议》和《隐私政策》</text>
</view>
</block>
<!-- ============ 选择企业(一人多企业) ============ -->
<block v-else>
<view class="panel-head">
<text class="panel-title">请选择企业</text>
<text class="panel-sub">该账号已加入多家企业,请选择要进入的空间</text>
</view>
<view v-if="errorMsg" class="error-box">
<text class="error-text">{{ errorMsg }}</text>
</view>
<view class="tenant-list">
<view
v-for="item in tenants"
:key="item.tid"
class="tenant-item"
:class="{ disabled: submitting }"
@tap="chooseTenant(item)"
>
<view class="tenant-avatar">
<FaIcon name="building" color="#2563eb" :size="18" />
</view>
<view class="tenant-info">
<text class="tenant-name">{{ item.tenant_name || `企业${item.tid}` }}</text>
<text class="tenant-meta">{{ item.name ? `${item.name} · ` : '' }}企业ID {{ item.tid }}</text>
</view>
<FaIcon name="chevron-right" color="#c8cfdf" :size="14" />
</view>
</view>
</block>
<!-- ============ 协议(企业选择视图无需) ============ -->
<block v-if="step !== 'tenant'">
<view class="agreement" @tap="toggleAgree">
<view class="agree-dot" :class="{ on: agreed }" />
<text class="agree-text">
登录即表示同意
<text class="agree-link" @tap.stop="showAgreement">《用户协议》</text>
和
<text class="agree-link" @tap.stop="showAgreement">《隐私政策》</text>
</text>
</view>
<!-- 未勾选协议提示 -->
<view v-if="!agreed && showAgreementTip" class="agree-tip">
<FaIcon name="circle-info" color="#f79009" :size="12" />
<text class="agree-tip-text">请先阅读并勾选同意《用户协议》和《隐私政策》</text>
</view>
</block>
</view>
</view>
<view class="agreement" @tap="toggleAgree">
<view class="agree-dot" :class="{ on: agreed }" />
<text class="agree-text">
登录即表示同意
<text class="agree-link" @tap.stop="openLegal('user-agreement', '用户协议')">《用户协议》</text>
和
<text class="agree-link" @tap.stop="openLegal('privacy-policy', '隐私政策')">《隐私政策》</text>
</text>
<view class="foot-tip">
<FaIcon name="shield-halved" color="#94a3b8" :size="12" />
<text class="foot-tip-text">全程加密传输 · 账号安全可控</text>
</view>
</view>
@@ -189,9 +223,25 @@ import {
import { showGeetest4 } from '@/utils/geetest.js'
import FaIcon from '@/components/FaIcon.vue'
const step = ref('password')
/** 小程序端登录方式 Tab:wechat / account(其他端固定账号密码) */
const activeTab = ref('wechat')
/** 运行端检测:h5 / apk(app-plus) / mp-weixin,决定登录方式优先级 */
const platform = ref('')
// #ifdef H5
platform.value = 'h5'
// #endif
// #ifdef APP-PLUS
platform.value = 'apk'
// #endif
// #ifdef MP-WEIXIN
platform.value = 'mp-weixin'
// #endif
/**
* 视图状态:
* main 微信一键登录主入口(小程序端默认视图)
* account 账号密码登录(独立视图,由主视图弱化入口进入)
* tenant 选择企业(一人多企业)
*/
const step = ref(platform.value === 'mp-weixin' ? 'main' : 'account')
const account = ref('')
const password = ref('')
const showPassword = ref(false)
@@ -207,36 +257,65 @@ const verifyCfg = ref({ needGeetest: false, captchaId: '' })
/** 仅微信小程序端且服务端已开通时展示「一键登录」入口 */
const showMiniLogin = ref(false)
/** 面板副标题:随 Tab 切换提示文案 */
const panelSub = computed(() => {
if (platform.value === 'mp-weixin' && showMiniLogin.value && activeTab.value === 'wechat') {
return '微信授权,安全快捷地登录'
}
if (platform.value === 'mp-weixin' && showMiniLogin.value && activeTab.value === 'account') {
return '使用已注册的账号继续'
}
return '请输入您的账号与密码以继续'
/** 顶部导航标题 */
const navTitle = computed(() => {
if (step.value === 'tenant') return '选择企业'
return '账号密码登录'
})
/** 切换登录方式 Tab:清掉上一次残留的错误提示 */
function switchTab(tab) {
/**
* 状态栏高度(px)。
* 小程序端 env(safe-area-inset-top) 在无刘海的安卓机型返回 0,
* 自绘导航会被状态栏压住,因此这里取系统信息里的真实状态栏高度。
*/
const statusBarHeight = ref(0)
try {
const info =
typeof uni.getWindowInfo === 'function' ? uni.getWindowInfo() : uni.getSystemInfoSync()
statusBarHeight.value = (info && info.statusBarHeight) || 0
} catch (e) {
statusBarHeight.value = 0
}
/** 自绘导航的上内边距:状态栏高度(导航本体固定 88rpx) */
const navPadTop = computed(() => `${statusBarHeight.value}px`)
/** 品牌区上内边距:主视图需让开状态栏,紧凑视图(账号/企业)由导航栏已占位 */
const brandPadTop = computed(() => {
if (step.value !== 'main') return '32rpx'
return `${statusBarHeight.value + uni.upx2px(88)}px`
})
/** 是否存在可返回的上级视图(账号密码视图仅在小程序端可退回主视图) */
const canGoBack = computed(() => {
if (step.value === 'tenant') return true
if (step.value === 'account') return showMiniLogin.value
return false
})
/** 切换到账号密码登录视图 */
function goAccount() {
if (submitting.value) return
if (activeTab.value === tab) return
activeTab.value = tab
step.value = 'account'
errorMsg.value = ''
}
/** 运行端检测:h5 / apk(app-plus) / mp-weixin,决定登录方式优先级 */
const platform = ref('')
// #ifdef H5
platform.value = 'h5'
// #endif
// #ifdef APP-PLUS
platform.value = 'apk'
// #endif
// #ifdef MP-WEIXIN
platform.value = 'mp-weixin'
// #endif
/** 返回微信一键登录主视图 */
function goMain() {
if (submitting.value) return
if (!showMiniLogin.value) return
step.value = 'main'
errorMsg.value = ''
}
/** 顶部导航返回 */
function onNavBack() {
if (step.value === 'tenant') {
backToAccount()
return
}
goMain()
}
onMounted(async () => {
if (isLoggedIn()) {
@@ -248,8 +327,6 @@ onMounted(async () => {
if (remembered.rememberMe) {
rememberMe.value = true
account.value = remembered.account
// 记住了账号,默认落在账号密码 Tab 更顺手
activeTab.value = 'account'
}
loadVerifyConfig()
@@ -278,6 +355,10 @@ async function loadMiniLoginConfig() {
} catch {
showMiniLogin.value = false
}
// 服务端未开通一键登录:直接落到账号密码视图
if (!showMiniLogin.value && step.value === 'main') {
step.value = 'account'
}
}
/* ==================== 登录主流程 ==================== */
@@ -383,9 +464,10 @@ function chooseTenant(item) {
})
}
/** 从「选择企业」退回账号密码视图 */
function backToAccount() {
clearAuthState()
step.value = 'password'
step.value = 'account'
errorMsg.value = ''
}
@@ -509,13 +591,14 @@ function handleMiniError(err) {
confirmText: '账号登录',
confirmColor: '#2563eb',
success: (res) => {
if (res.confirm) switchTab('account')
if (res.confirm) goAccount()
}
})
return
}
if (reason === 'not_configured') {
showMiniLogin.value = false
step.value = 'account'
}
showError(err)
}
@@ -538,11 +621,14 @@ function clearAuthState() {
}
function showError(err) {
errorMsg.value = (err && err.message) || '登录失败,请稍后重试'
}
function goRegister() {
uni.navigateTo({ url: '/pages/login/register' })
const raw = (err && err.message) || ''
// 微信未配置 request 合法域名:原始报错是英文,给出可操作的中文提示
if (/url not in domain list/i.test(raw)) {
errorMsg.value =
'当前小程序未配置服务器域名,请在微信公众平台「开发管理 - 开发设置 - 服务器域名」中添加 api.yunzer.cn 为 request 合法域名'
return
}
errorMsg.value = raw || '登录失败,请稍后重试'
}
/** 勾选/取消用户协议:勾选后自动收起未勾选提示 */
@@ -605,60 +691,123 @@ function goForget() {
<style lang="scss" scoped>
@import '@/src/styles/page-common.scss';
/* ---------- 页面骨架:浅蓝白渐变 ---------- */
.login-page {
position: relative;
min-height: 100vh;
background: linear-gradient(145deg, #eaf6ff 0%, #f7fbff 48%, #dceeff 100%);
padding: calc(env(safe-area-inset-top, 0px) + 24rpx) 32rpx calc(env(safe-area-inset-bottom, 0px) + 40rpx);
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
background: linear-gradient(180deg, #eef4ff 0%, #ffffff 38%, #f7f9fc 100%);
padding: 0 32rpx calc(env(safe-area-inset-bottom, 0px) + 36rpx);
overflow: hidden;
}
.login-page::before,
.login-page::after {
content: '';
/* 主体(品牌 + 卡片):自动上下外边距实现垂直居中,内容超高时不裁切 */
.login-body {
margin: auto 0;
}
/* 背景光斑:纯装饰,径向渐变让边缘自然消隐 */
.deco {
position: absolute;
border-radius: 50%;
pointer-events: none;
}
.login-page::before {
width: 460rpx;
height: 460rpx;
top: -150rpx;
right: -130rpx;
background: rgba(111, 192, 255, 0.28);
.deco-a {
width: 560rpx;
height: 560rpx;
top: -260rpx;
right: -240rpx;
background: radial-gradient(circle, rgba(96, 165, 250, 0.26) 0%, rgba(96, 165, 250, 0) 70%);
}
.login-page::after {
width: 360rpx;
height: 360rpx;
bottom: 100rpx;
left: -180rpx;
background: rgba(151, 218, 255, 0.2);
.deco-b {
width: 520rpx;
height: 520rpx;
bottom: -260rpx;
left: -240rpx;
background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 70%);
}
/* ---------- 顶部自绘导航 ---------- */
.nav-bar {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
/* 高度不含状态栏内边距:padding-top 由脚本按真实状态栏高度注入 */
box-sizing: content-box;
height: 88rpx;
margin-top: 8rpx;
}
.nav-back {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: flex-start;
flex-shrink: 0;
&.invisible {
opacity: 0;
}
}
.nav-side {
width: 64rpx;
flex-shrink: 0;
}
.nav-title {
position: absolute;
left: 50%;
transform: translateX(-50%);
font-size: 32rpx;
font-weight: 600;
color: $color-text;
}
/* ---------- 品牌区 ---------- */
.brand {
position: relative;
z-index: 1;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
padding-top: calc(env(safe-area-inset-top, 0px) + 56rpx);
/* 上内边距由脚本按状态栏高度注入,这里给无脚本时的兜底值 */
padding-top: 88rpx;
padding-bottom: 48rpx;
&.compact {
padding-bottom: 36rpx;
.brand-logo {
width: 76rpx;
height: 76rpx;
border-radius: 22rpx;
}
.brand-name {
margin-top: 16rpx;
font-size: 32rpx;
}
.brand-desc {
font-size: 22rpx;
}
}
}
.brand-logo {
width: 92rpx;
height: 92rpx;
border-radius: 30rpx;
background: linear-gradient(145deg, #79c8ff, #398fe7);
border: 1rpx solid rgba(255, 255, 255, 0.88);
box-shadow: 0 16rpx 36rpx rgba(57, 143, 231, 0.28), inset 0 1rpx 0 rgba(255, 255, 255, 0.48);
width: 96rpx;
height: 96rpx;
border-radius: 28rpx;
background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
box-shadow: 0 14rpx 30rpx rgba(37, 99, 235, 0.28);
display: flex;
align-items: center;
justify-content: center;
@@ -666,28 +815,27 @@ function goForget() {
.brand-name {
margin-top: 22rpx;
font-size: 36rpx;
font-weight: 700;
font-size: 38rpx;
font-weight: 600;
letter-spacing: 2rpx;
color: #173b67;
color: $color-text;
}
.brand-desc {
margin-top: 10rpx;
font-size: 24rpx;
letter-spacing: 1rpx;
color: #7190af;
color: $color-text-secondary;
}
/* ---------- 表单卡片 ---------- */
.card {
position: relative;
z-index: 1;
background: rgba(255, 255, 255, 0.72);
border: 1rpx solid rgba(255, 255, 255, 0.92);
border-radius: 34rpx;
padding: 48rpx 36rpx 40rpx;
box-shadow: 0 24rpx 70rpx rgba(74, 132, 184, 0.16), inset 0 1rpx 0 rgba(255, 255, 255, 0.9);
z-index: 2;
background: $color-card;
border: 1rpx solid rgba(226, 232, 240, 0.9);
border-radius: $radius-lg;
padding: 44rpx 36rpx 32rpx;
box-shadow: 0 2rpx 8rpx rgba(15, 23, 42, 0.04), 0 18rpx 44rpx rgba(37, 99, 235, 0.1);
}
.panel-head {
@@ -723,6 +871,13 @@ function goForget() {
line-height: 1.6;
}
.loading-box {
display: flex;
align-items: center;
justify-content: center;
height: 96rpx;
}
.field {
margin-bottom: 28rpx;
}
@@ -739,9 +894,10 @@ function goForget() {
position: relative;
display: flex;
align-items: center;
background: rgba(248, 252, 255, 0.82);
border: 1rpx solid #d8e9f7;
border-radius: 18rpx;
gap: 14rpx;
background: #f8fafc;
border: 1rpx solid $color-border;
border-radius: $radius-md;
padding: 0 20rpx;
box-shadow: inset 0 2rpx 8rpx rgba(104, 158, 202, 0.05);
}
@@ -749,7 +905,7 @@ function goForget() {
.field-input {
flex: 1;
min-width: 0;
height: 88rpx;
height: 92rpx;
font-size: 28rpx;
color: $color-text;
}
@@ -815,6 +971,7 @@ function goForget() {
color: $color-text-secondary;
}
/* 主按钮(账号密码登录) */
.btn {
height: 92rpx;
border-radius: $radius-md;
@@ -833,20 +990,23 @@ function goForget() {
}
}
/* 主 CTA:微信一键登录(品牌蓝,弱化微信绿以保持蓝白统一) */
.btn-wechat {
margin-top: 8rpx;
margin-top: 0;
height: 96rpx;
border-radius: 20rpx;
background: linear-gradient(110deg, #18b96b 0%, #09a95e 100%);
background: linear-gradient(135deg, #2563eb 0%, #4f8ef7 100%);
color: #ffffff;
box-shadow: 0 14rpx 28rpx rgba(7, 193, 96, 0.2);
font-size: 28rpx;
font-size: 32rpx;
font-weight: 500;
letter-spacing: 2rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
gap: 12rpx;
border: none;
padding: 0;
box-shadow: 0 12rpx 26rpx rgba(37, 99, 235, 0.32);
&::after {
border: none;
@@ -857,83 +1017,13 @@ function goForget() {
}
}
/* 小程序备用登录入口,弱化账号密码路径 */
.account-entry {
margin: 36rpx auto 0;
padding: 8rpx 20rpx;
display: flex;
justify-content: center;
}
.account-entry-text {
font-size: 24rpx;
color: #7995ad;
}
.account-entry-text {
padding-bottom: 4rpx;
border-bottom: 1rpx solid #c9dceb;
}
.account-mode-label {
margin: -14rpx 0 22rpx;
display: flex;
align-items: center;
justify-content: flex-start;
}
.account-mode-back {
font-size: 24rpx;
color: #5688b7;
padding: 8rpx 0;
}
/* 登录方式 Tab:微信登录 / 账号密码登录 */
.login-tabs {
display: flex;
align-items: center;
gap: 48rpx;
margin-bottom: 36rpx;
border-bottom: 1rpx solid $color-border;
}
.login-tab {
position: relative;
padding: 0 4rpx 20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.login-tab-text {
font-size: 28rpx;
color: $color-text-secondary;
}
.login-tab.on .login-tab-text {
font-size: 30rpx;
font-weight: 600;
color: #2563eb;
}
.login-tab-bar {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 6rpx;
border-radius: 6rpx;
background: #2563eb;
transition: width 0.2s ease;
}
.login-tab.on .login-tab-bar {
width: 56rpx;
.btn-wechat-text {
font-size: 32rpx;
color: #ffffff;
}
.tip-row {
margin-top: 16rpx;
margin-top: 18rpx;
display: flex;
justify-content: center;
}
@@ -944,6 +1034,46 @@ function goForget() {
line-height: 1.6;
}
/* 弱化入口:切换账号密码登录 */
.alt-entry {
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
margin-top: 44rpx;
}
.alt-line {
width: 80rpx;
height: 1rpx;
background: $color-border;
}
.alt-text {
font-size: 26rpx;
color: $color-text-muted;
}
/* 弱化入口:切换账号密码登录 */
.alt-entry {
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
margin-top: 44rpx;
}
.alt-line {
width: 80rpx;
height: 1rpx;
background: $color-border;
}
.alt-text {
font-size: 26rpx;
color: $color-text-muted;
}
.back-row {
display: flex;
align-items: center;
@@ -954,7 +1084,7 @@ function goForget() {
.link {
font-size: 26rpx;
color: #2563eb;
color: $color-primary;
}
/* ---------- 企业选择 ---------- */
@@ -1023,8 +1153,8 @@ function goForget() {
display: flex;
align-items: flex-start;
gap: 12rpx;
margin-top: 30rpx;
padding: 0 8rpx;
margin-top: 36rpx;
padding: 0 4rpx;
}
/* 协议勾选框:对号用 CSS 绘制(不依赖字体图标,任何端渲染一致) */
@@ -1033,14 +1163,14 @@ function goForget() {
width: 34rpx;
height: 34rpx;
border-radius: 8rpx;
border: 2rpx solid #bad3e8;
background: rgba(255, 255, 255, 0.76);
border: 2rpx solid #cbd5e1;
background: $color-card;
flex-shrink: 0;
margin-top: 2rpx;
&.on {
background: #ffffff;
border-color: #ffffff;
background: $color-primary;
border-color: $color-primary;
}
/* 对号:两条边 + 旋转 45°,比图标字体更清晰 */
@@ -1053,21 +1183,20 @@ function goForget() {
height: 16rpx;
margin-left: -5rpx;
transform: translateY(-50%) rotate(45deg);
border-right: 3rpx solid #1e3a8a;
border-bottom: 3rpx solid #1e3a8a;
border-right: 3rpx solid #ffffff;
border-bottom: 3rpx solid #ffffff;
}
}
.agree-text {
flex: 1;
font-size: 22rpx;
color: #6e8da8;
color: $color-text-secondary;
line-height: 1.7;
}
.agree-link {
color: #347fbd;
font-weight: 500;
color: $color-primary;
}
/* 未勾选协议时的行内提示 */
@@ -1078,13 +1207,29 @@ function goForget() {
margin-top: 16rpx;
padding: 12rpx 18rpx;
border-radius: $radius-sm;
background: rgba(247, 144, 9, 0.16);
background: #fff7e6;
border: 1rpx solid #ffe0a3;
}
.agree-tip-text {
font-size: 22rpx;
color: #ad6400;
color: #b45309;
line-height: 1.5;
}
</style>
/* ---------- 页脚 ---------- */
.foot-tip {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
margin-top: 40rpx;
}
.foot-tip-text {
font-size: 22rpx;
color: $color-text-muted;
}
</style>