登陆注册界面优化了
This commit is contained in:
@@ -30,6 +30,12 @@ const router = createRouter({
|
||||
component: () => import("@/views/mobile/MobileLoginView.vue"),
|
||||
meta: { layout: "blank" },
|
||||
},
|
||||
{
|
||||
path: "/m/register",
|
||||
name: "mobile-register",
|
||||
component: () => import("@/views/mobile/MobileRegisterView.vue"),
|
||||
meta: { layout: "blank" },
|
||||
},
|
||||
{
|
||||
path: "/m/profile",
|
||||
name: "mobile-profile",
|
||||
|
||||
@@ -8,7 +8,8 @@ const loading = ref(false);
|
||||
const loadFailed = ref(false);
|
||||
const listings = ref<Listing[]>([]);
|
||||
const filterOpen = ref(false);
|
||||
const activeSort = ref("默认");
|
||||
const activeSort = ref(0);
|
||||
const activeFilter = ref([]);
|
||||
|
||||
const channels = [
|
||||
{ label: "全部", icon: "🔥" },
|
||||
@@ -17,8 +18,18 @@ const channels = [
|
||||
{ label: "扫码号", icon: "📱" },
|
||||
{ label: "包夜", icon: "🌙" },
|
||||
];
|
||||
const sortOptions = ["默认", "价格", "比例", "哈夫币", "筛选"];
|
||||
const quickFilters = ["三角洲行动", "安卓/扫码", "高段位", "可包夜"];
|
||||
const sortOptions = [
|
||||
{ text: "默认", value: 0 },
|
||||
{ text: "价格", value: 1 },
|
||||
{ text: "比例", value: 2 },
|
||||
{ text: "哈夫币", value: 3 },
|
||||
];
|
||||
const quickFilters = [
|
||||
{ text: "三角洲行动", value: "a" },
|
||||
{ text: "安卓/扫码", value: "b" },
|
||||
{ text: "高段位", value: "c" },
|
||||
{ text: "可包夜", value: "d" },
|
||||
];
|
||||
|
||||
const fallbackListings: Listing[] = [
|
||||
{
|
||||
@@ -143,10 +154,13 @@ function formatRatio(item: Listing) {
|
||||
}
|
||||
return `${Math.round(item.haf_coin_amount / item.price_hourly / 10000)}W/元`;
|
||||
}
|
||||
|
||||
const searchValue = ref("");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="mobile-shell">
|
||||
<!-- 顶部品牌区 - 保留手写样式 -->
|
||||
<section class="mobile-hero">
|
||||
<div class="mobile-topbar">
|
||||
<div class="mobile-brand">
|
||||
@@ -159,15 +173,21 @@ function formatRatio(item: Listing) {
|
||||
<button class="mobile-service" type="button">客服</button>
|
||||
</div>
|
||||
|
||||
<label class="mobile-search">
|
||||
<span>🔍</span>
|
||||
<input type="search" placeholder="搜区服 / 段位 / 哈夫币数量" />
|
||||
</label>
|
||||
<!-- 搜索栏 → van-search -->
|
||||
<van-search
|
||||
v-model="searchValue"
|
||||
shape="round"
|
||||
placeholder="搜区服 / 段位 / 哈夫币数量"
|
||||
class="home-search"
|
||||
/>
|
||||
|
||||
<div class="fraud-alert">
|
||||
<span>防骗提示</span>
|
||||
平台担保交易,拒绝私下转账/共享验证码,交接全程留痕。
|
||||
</div>
|
||||
<!-- 防骗提示 → van-notice-bar -->
|
||||
<van-notice-bar
|
||||
left-icon="warning"
|
||||
scrollable
|
||||
text="平台担保交易,拒绝私下转账/共享验证码,交接全程留痕。"
|
||||
class="fraud-notice"
|
||||
/>
|
||||
|
||||
<div class="mobile-banner">
|
||||
<div>
|
||||
@@ -180,13 +200,19 @@ function formatRatio(item: Listing) {
|
||||
</section>
|
||||
|
||||
<section class="mobile-content">
|
||||
<div class="channel-strip" aria-label="快捷频道">
|
||||
<button v-for="item in channels" :key="item.label" type="button">
|
||||
<span>{{ item.icon }}</span>
|
||||
{{ item.label }}
|
||||
</button>
|
||||
</div>
|
||||
<!-- 频道按钮组 → van-grid -->
|
||||
<van-grid :column-num="5" :border="false" class="channel-grid">
|
||||
<van-grid-item v-for="item in channels" :key="item.label">
|
||||
<template #icon>
|
||||
<span class="channel-icon">{{ item.icon }}</span>
|
||||
</template>
|
||||
<template #text>
|
||||
<span class="channel-label">{{ item.label }}</span>
|
||||
</template>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!-- 数据背书面板 - 保留手写样式 -->
|
||||
<div class="trust-panel" aria-label="交易数据背书">
|
||||
<div v-for="item in platformStats" :key="item.label">
|
||||
<strong>{{ item.value }}</strong>
|
||||
@@ -194,31 +220,29 @@ function formatRatio(item: Listing) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sort-bar" aria-label="排序方式">
|
||||
<button
|
||||
v-for="item in sortOptions"
|
||||
:key="item"
|
||||
:class="{ active: activeSort === item }"
|
||||
type="button"
|
||||
@click="
|
||||
item === '筛选' ? (filterOpen = !filterOpen) : (activeSort = item)
|
||||
"
|
||||
>
|
||||
{{ item }}<span v-if="item === '筛选'">▾</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- 排序/筛选 → van-dropdown-menu -->
|
||||
<van-dropdown-menu class="sort-dropdown">
|
||||
<van-dropdown-item v-model="activeSort" :options="sortOptions" />
|
||||
<van-dropdown-item
|
||||
v-model="activeFilter"
|
||||
:options="quickFilters"
|
||||
title="筛选"
|
||||
/>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<div v-if="filterOpen" class="filter-panel">
|
||||
<button v-for="item in quickFilters" :key="item" type="button">
|
||||
{{ item }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p v-if="loadFailed" class="mobile-tip">
|
||||
接口暂不可用,当前展示移动端示例数据。
|
||||
</p>
|
||||
<p v-else-if="loading" class="mobile-tip">正在加载优质账号...</p>
|
||||
<!-- 加载/错误状态 -->
|
||||
<van-loading v-if="loading" class="state-loading" size="24px" vertical>
|
||||
正在加载优质账号...
|
||||
</van-loading>
|
||||
<van-notice-bar
|
||||
v-else-if="loadFailed"
|
||||
left-icon="info-o"
|
||||
color="#6b7a90"
|
||||
background="transparent"
|
||||
text="接口暂不可用,当前展示移动端示例数据。"
|
||||
/>
|
||||
|
||||
<!-- 列表卡片 - 保留手写 mobile-card 样式 -->
|
||||
<div class="mobile-list">
|
||||
<RouterLink
|
||||
v-for="item in displayListings"
|
||||
@@ -262,15 +286,14 @@ function formatRatio(item: Listing) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<nav class="mobile-tabbar" aria-label="底部导航">
|
||||
<RouterLink to="/m" class="tab-item active">首页</RouterLink>
|
||||
<RouterLink to="/m/listings" class="tab-item">租号</RouterLink>
|
||||
<RouterLink to="/m/seller/listings/create" class="publish-tab"
|
||||
>发布</RouterLink
|
||||
>
|
||||
<RouterLink to="/m/orders" class="tab-item">订单</RouterLink>
|
||||
<RouterLink to="/m/profile" class="tab-item">我的</RouterLink>
|
||||
</nav>
|
||||
<!-- 底部 TabBar → van-tabbar route -->
|
||||
<van-tabbar route class="home-tabbar">
|
||||
<van-tabbar-item to="/m" icon="home-o">首页</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/listings" icon="search">租号</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/seller/listings/create" icon="add-o" class="tabbar-publish">发布</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/orders" icon="orders-o">订单</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/profile" icon="manager-o">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -282,6 +305,7 @@ function formatRatio(item: Listing) {
|
||||
padding-bottom: 92px;
|
||||
}
|
||||
|
||||
/* ========== Hero 区域 ========== */
|
||||
.mobile-hero {
|
||||
overflow: hidden;
|
||||
border-radius: 0 0 28px 28px;
|
||||
@@ -292,8 +316,7 @@ function formatRatio(item: Listing) {
|
||||
.mobile-topbar,
|
||||
.mobile-brand,
|
||||
.card-title-row,
|
||||
.card-footer,
|
||||
.mobile-tabbar {
|
||||
.card-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -337,41 +360,40 @@ function formatRatio(item: Listing) {
|
||||
padding: 7px 12px;
|
||||
}
|
||||
|
||||
.mobile-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
/* ========== van-search 覆盖样式 ========== */
|
||||
.home-search {
|
||||
margin-top: 12px;
|
||||
border-radius: 999px;
|
||||
background: #ffffff;
|
||||
padding: 11px 14px;
|
||||
box-shadow: 0 10px 24px rgba(0, 54, 135, 0.12);
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.mobile-search input {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
.home-search :deep(.van-search__content) {
|
||||
border-radius: 999px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 10px 24px rgba(0, 54, 135, 0.12);
|
||||
padding: 8px 14px;
|
||||
}
|
||||
|
||||
.home-search :deep(.van-search__content .van-field__control) {
|
||||
color: #17233d;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.fraud-alert {
|
||||
/* ========== van-notice-bar 防骗提示 ========== */
|
||||
.fraud-notice {
|
||||
margin-top: 12px;
|
||||
border-radius: 12px;
|
||||
background: #ffe27a;
|
||||
color: #5c3b00;
|
||||
padding: 10px 12px;
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.fraud-alert span {
|
||||
margin-right: 6px;
|
||||
font-weight: 800;
|
||||
.fraud-notice :deep(.van-notice-bar__left-icon) {
|
||||
color: #5c3b00;
|
||||
}
|
||||
|
||||
/* ========== Banner ========== */
|
||||
.mobile-banner {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -422,46 +444,39 @@ function formatRatio(item: Listing) {
|
||||
transform: rotate(8deg);
|
||||
}
|
||||
|
||||
/* ========== Content 区 ========== */
|
||||
.mobile-content {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.channel-strip,
|
||||
.sort-bar,
|
||||
.filter-panel {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 2px;
|
||||
scrollbar-width: none;
|
||||
/* ========== van-grid 频道 ========== */
|
||||
.channel-grid {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.channel-strip::-webkit-scrollbar,
|
||||
.sort-bar::-webkit-scrollbar,
|
||||
.filter-panel::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.channel-strip button {
|
||||
display: grid;
|
||||
min-width: 72px;
|
||||
gap: 4px;
|
||||
flex: 0 0 auto;
|
||||
place-items: center;
|
||||
border: 0;
|
||||
border-radius: 16px;
|
||||
.channel-grid :deep(.van-grid-item__content) {
|
||||
padding: 11px 6px;
|
||||
background: #ffffff;
|
||||
color: #24324a;
|
||||
padding: 11px 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 8px 22px rgba(23, 35, 61, 0.06);
|
||||
}
|
||||
|
||||
.channel-strip span {
|
||||
font-size: 18px;
|
||||
.channel-grid :deep(.van-grid-item__content--surround::after) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.channel-icon {
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.channel-label {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
color: #24324a;
|
||||
}
|
||||
|
||||
/* ========== 数据背书面板 ========== */
|
||||
.trust-panel {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
@@ -494,46 +509,38 @@ function formatRatio(item: Listing) {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.sort-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
/* ========== van-dropdown-menu 排序筛选 ========== */
|
||||
.sort-dropdown {
|
||||
margin: 12px -14px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.sort-dropdown :deep(.van-dropdown-menu__bar) {
|
||||
background: rgba(238, 245, 255, 0.92);
|
||||
padding: 10px 14px 8px;
|
||||
backdrop-filter: blur(12px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
padding: 8px 0 2px;
|
||||
}
|
||||
|
||||
.sort-bar button,
|
||||
.filter-panel button {
|
||||
flex: 0 0 auto;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: #ffffff;
|
||||
color: #4d5b73;
|
||||
padding: 9px 12px;
|
||||
.sort-dropdown :deep(.van-dropdown-menu__title) {
|
||||
font-weight: 800;
|
||||
color: #4d5b73;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.sort-bar button.active {
|
||||
background: #1479ff;
|
||||
color: #ffffff;
|
||||
.sort-dropdown :deep(.van-dropdown-menu__title--active) {
|
||||
color: #1479ff;
|
||||
}
|
||||
|
||||
.sort-bar button span {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.mobile-tip {
|
||||
margin: 12px 2px;
|
||||
/* ========== 加载状态 ========== */
|
||||
.state-loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20px 0;
|
||||
color: #6b7a90;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* ========== 卡片列表 ========== */
|
||||
.mobile-list {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
@@ -655,45 +662,59 @@ function formatRatio(item: Listing) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mobile-tabbar {
|
||||
/* ========== van-tabbar 底部导航 ========== */
|
||||
.home-tabbar {
|
||||
position: fixed;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
left: 12px;
|
||||
z-index: 20;
|
||||
justify-content: space-around;
|
||||
height: 60px;
|
||||
border-radius: 22px;
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
box-shadow: 0 16px 36px rgba(23, 35, 61, 0.16);
|
||||
backdrop-filter: blur(14px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
.home-tabbar :deep(.van-tabbar) {
|
||||
border-radius: 22px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.home-tabbar :deep(.van-tabbar-item) {
|
||||
color: #708097;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
.home-tabbar :deep(.van-tabbar-item--active) {
|
||||
color: #1479ff;
|
||||
}
|
||||
|
||||
.publish-tab {
|
||||
display: grid;
|
||||
width: 58px;
|
||||
height: 58px;
|
||||
place-items: center;
|
||||
border: 5px solid #eef5ff;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(180deg, #ffb21a, #ff6a00);
|
||||
color: #ffffff;
|
||||
font-size: 13px;
|
||||
font-weight: 900;
|
||||
transform: translateY(-18px);
|
||||
box-shadow: 0 10px 24px rgba(255, 106, 0, 0.35);
|
||||
.home-tabbar :deep(.van-tabbar-item__icon) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* 发布按钮特殊样式 */
|
||||
.tabbar-publish :deep(.van-tabbar-item__icon) {
|
||||
display: grid;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(180deg, #ffb21a, #ff6a00);
|
||||
color: #ffffff !important;
|
||||
font-size: 22px;
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 8px 20px rgba(255, 106, 0, 0.35);
|
||||
}
|
||||
|
||||
.tabbar-publish :deep(.van-tabbar-item__text) {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
/* ========== 响应式适配 ========== */
|
||||
@media (min-width: 520px) {
|
||||
.mobile-shell {
|
||||
max-width: 430px;
|
||||
@@ -701,7 +722,7 @@ function formatRatio(item: Listing) {
|
||||
box-shadow: 0 0 0 1px rgba(23, 35, 61, 0.08);
|
||||
}
|
||||
|
||||
.mobile-tabbar {
|
||||
.home-tabbar {
|
||||
right: calc((100vw - 430px) / 2 + 12px);
|
||||
left: calc((100vw - 430px) / 2 + 12px);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { onUnmounted, reactive, ref } from "vue";
|
||||
import { RouterLink, useRouter } from "vue-router";
|
||||
import { showToast, showDialog } from "vant";
|
||||
|
||||
import { sendSmsCode } from "@/api/auth";
|
||||
import { useSessionStore } from "@/stores/session";
|
||||
@@ -15,27 +16,61 @@ const form = reactive({
|
||||
code: "",
|
||||
});
|
||||
|
||||
const maskedPhone = computed(() =>
|
||||
form.phone.length >= 7
|
||||
? `${form.phone.slice(0, 3)}****${form.phone.slice(-4)}`
|
||||
: "手机号"
|
||||
);
|
||||
const countDown = ref(0);
|
||||
let timer: ReturnType<typeof setInterval> | null = null;
|
||||
|
||||
function startCountDown() {
|
||||
countDown.value = 60;
|
||||
timer = setInterval(() => {
|
||||
countDown.value--;
|
||||
if (countDown.value <= 0) {
|
||||
clearInterval(timer!);
|
||||
timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
});
|
||||
|
||||
/* --------- 业务方法 --------- */
|
||||
async function handleSendCode() {
|
||||
if (!form.phone.trim()) {
|
||||
showToast("请输入手机号");
|
||||
return;
|
||||
}
|
||||
|
||||
sending.value = true;
|
||||
try {
|
||||
await sendSmsCode(form.phone);
|
||||
window.alert("验证码已发送,开发环境请查看后端日志");
|
||||
} catch {
|
||||
window.alert("验证码发送失败,请稍后重试");
|
||||
showToast("验证码已发送,开发环境请查看后端日志");
|
||||
startCountDown();
|
||||
} catch (error) {
|
||||
showToast(readError(error, "验证码发送失败,请稍后重试"));
|
||||
} finally {
|
||||
sending.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function readError(error: unknown, fallback: string) {
|
||||
if (typeof error === "object" && error && "response" in error) {
|
||||
const response = (error as { response?: { data?: { message?: string } } })
|
||||
.response;
|
||||
return response?.data?.message || fallback;
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
||||
async function handleLogin() {
|
||||
if (!agreed.value) {
|
||||
window.alert("请先阅读并同意用户协议和隐私政策");
|
||||
showDialog({
|
||||
title: "提示",
|
||||
message: "请先阅读并同意用户协议和隐私政策",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +79,7 @@ async function handleLogin() {
|
||||
await session.login(form.phone, form.code);
|
||||
await router.push("/m/profile");
|
||||
} catch {
|
||||
window.alert("登录失败,请检查手机号和验证码");
|
||||
showToast("登录失败,请检查手机号和验证码");
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
@@ -53,222 +88,355 @@ async function handleLogin() {
|
||||
|
||||
<template>
|
||||
<main class="mobile-login-shell">
|
||||
<section class="login-brand-card">
|
||||
<div class="monster-logo">锤</div>
|
||||
<p>大锤商行</p>
|
||||
<small>平台担保 · 安全租号</small>
|
||||
</section>
|
||||
|
||||
<section class="login-panel">
|
||||
<p class="login-eyebrow">SMS LOGIN</p>
|
||||
<h1>登录</h1>
|
||||
<p class="login-subtitle">使用手机号验证码登录,当前开发环境验证码会打印在后端日志。</p>
|
||||
|
||||
<label class="field-card">
|
||||
<span>手机号</span>
|
||||
<input v-model="form.phone" maxlength="11" inputmode="tel" placeholder="请输入手机号" />
|
||||
</label>
|
||||
|
||||
<label class="field-card">
|
||||
<span>验证码</span>
|
||||
<div class="code-line">
|
||||
<input v-model="form.code" maxlength="6" inputmode="numeric" placeholder="6 位验证码" />
|
||||
<button type="button" :disabled="sending" @click="handleSendCode">
|
||||
{{ sending ? "发送中" : "发送" }}
|
||||
</button>
|
||||
<section class="login-card">
|
||||
<!-- 品牌区域 -->
|
||||
<div class="login-top">
|
||||
<div class="monster-logo">锤</div>
|
||||
<div>
|
||||
<p>大锤商行</p>
|
||||
<small>平台担保 · 安全租号</small>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<div class="login-links">
|
||||
<button type="button">忘记密码</button>
|
||||
<span>当前输入:{{ maskedPhone }}</span>
|
||||
</div>
|
||||
|
||||
<label class="agreement-row">
|
||||
<input v-model="agreed" type="checkbox" />
|
||||
<span>我已阅读并同意 <b>《用户协议》</b> 和 <b>《隐私政策》</b></span>
|
||||
</label>
|
||||
<!-- 登录/注册 Tab 切换 -->
|
||||
<div class="auth-switch" aria-label="登录注册切换">
|
||||
<RouterLink to="/m/login" class="active">登录</RouterLink>
|
||||
<RouterLink to="/m/register">注册</RouterLink>
|
||||
</div>
|
||||
|
||||
<button class="primary-login" type="button" :disabled="loading" @click="handleLogin">
|
||||
{{ loading ? "登录中..." : "登录" }}
|
||||
</button>
|
||||
<p class="login-eyebrow">SMS LOGIN</p>
|
||||
<h1>手机号登录</h1>
|
||||
<p class="login-subtitle">验证码登录,开发环境验证码查看后端日志。</p>
|
||||
|
||||
<button class="sms-login" type="button" @click="handleSendCode">
|
||||
使用手机验证码登录
|
||||
</button>
|
||||
<!-- 手机号输入 -->
|
||||
<van-field
|
||||
v-model="form.phone"
|
||||
type="tel"
|
||||
maxlength="11"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
class="login-field"
|
||||
>
|
||||
<template #left-icon>
|
||||
<span class="field-prefix">+86</span>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 验证码输入 -->
|
||||
<van-field
|
||||
v-model="form.code"
|
||||
type="digit"
|
||||
maxlength="6"
|
||||
placeholder="6 位验证码"
|
||||
class="login-field"
|
||||
:left-icon="'shield-o'"
|
||||
>
|
||||
<template #button>
|
||||
<van-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
round
|
||||
:disabled="sending || countDown > 0"
|
||||
:loading="sending"
|
||||
@click="handleSendCode"
|
||||
>
|
||||
{{
|
||||
countDown > 0
|
||||
? `${countDown}s`
|
||||
: sending
|
||||
? "发送中"
|
||||
: "发送验证码"
|
||||
}}
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 底部链接行 -->
|
||||
<div class="login-links">
|
||||
<van-button size="mini" plain type="primary">忘记密码</van-button>
|
||||
</div>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<div class="agreement-row">
|
||||
<van-checkbox v-model="agreed" shape="square" icon-size="16px">
|
||||
我已阅读并同意《<b>用户协议</b>》和《<b>隐私政策</b>》
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<van-button
|
||||
type="primary"
|
||||
block
|
||||
round
|
||||
class="login-button"
|
||||
:loading="loading"
|
||||
loading-text="登录中..."
|
||||
@click="handleLogin"
|
||||
>
|
||||
登录
|
||||
</van-button>
|
||||
|
||||
<!-- 底部注册入口 -->
|
||||
<RouterLink
|
||||
to="/m/register"
|
||||
class="register-entry"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>
|
||||
<van-button
|
||||
plain
|
||||
type="primary"
|
||||
block
|
||||
round
|
||||
size="small"
|
||||
class="register-button"
|
||||
@click="navigate"
|
||||
>
|
||||
没有账号?立即注册
|
||||
</van-button>
|
||||
</RouterLink>
|
||||
</section>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mobile-login-shell {
|
||||
min-height: 100vh;
|
||||
background: radial-gradient(circle at 50% 0, #f0fffb 0, #f7fbff 34%, #ffffff 78%);
|
||||
color: #151c28;
|
||||
padding: 48px 26px 32px;
|
||||
/* ========== Vant 主题变量覆盖 ========== */
|
||||
:root {
|
||||
--van-primary-color: #1777ff;
|
||||
--van-primary-color-light: #5fd4ff;
|
||||
--van-button-primary-background: linear-gradient(135deg, #1777ff, #5fd4ff);
|
||||
--van-button-primary-border-color: transparent;
|
||||
}
|
||||
|
||||
.login-brand-card {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
margin-bottom: 42px;
|
||||
text-align: center;
|
||||
/* ========== 页面容器 ========== */
|
||||
.mobile-login-shell {
|
||||
min-height: 100dvh;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
background: radial-gradient(
|
||||
circle at 50% 0,
|
||||
#eafff9 0,
|
||||
#f7fbff 38%,
|
||||
#ffffff 86%
|
||||
);
|
||||
color: #151c28;
|
||||
padding: 40px 24px;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
display: flex;
|
||||
min-height: calc(100dvh - 80px);
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ========== 品牌区域 ========== */
|
||||
.login-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.monster-logo {
|
||||
display: grid;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
flex: 0 0 auto;
|
||||
place-items: center;
|
||||
border-radius: 22px;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(145deg, #1777ff, #5fd4ff);
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
font-size: 21px;
|
||||
font-weight: 900;
|
||||
box-shadow: 0 14px 36px rgba(23, 119, 255, 0.24);
|
||||
box-shadow: 0 10px 22px rgba(23, 119, 255, 0.2);
|
||||
}
|
||||
|
||||
.login-brand-card p {
|
||||
margin: 12px 0 2px;
|
||||
font-size: 24px;
|
||||
.login-top p {
|
||||
margin: 0 0 2px;
|
||||
font-size: 20px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.login-brand-card small,
|
||||
.login-top small,
|
||||
.login-subtitle {
|
||||
color: #667386;
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
border-radius: 22px;
|
||||
/* ========== Tab 切换 ========== */
|
||||
.auth-switch {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
margin-bottom: 16px;
|
||||
border-radius: 15px;
|
||||
background: #eef4fb;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.auth-switch a {
|
||||
border-radius: 11px;
|
||||
color: #667386;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 900;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.auth-switch a.active {
|
||||
background: #ffffff;
|
||||
color: #111827;
|
||||
box-shadow: 0 8px 18px rgba(23, 35, 61, 0.08);
|
||||
}
|
||||
|
||||
/* ========== 标题区 ========== */
|
||||
.login-eyebrow {
|
||||
margin: 0 0 8px;
|
||||
margin: 0 0 5px;
|
||||
color: #02846e;
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.login-panel h1 {
|
||||
.login-card h1 {
|
||||
margin: 0;
|
||||
font-size: 30px;
|
||||
line-height: 1.2;
|
||||
font-size: 28px;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
margin: 12px 0 28px;
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.field-card {
|
||||
display: block;
|
||||
margin-top: 14px;
|
||||
border: 1px solid #e1e6ee;
|
||||
border-radius: 13px;
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.field-card span {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
color: #5d6674;
|
||||
margin: 7px 0 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.field-card input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
background: #eaf2ff;
|
||||
/* ========== Vant Field 覆盖样式 ========== */
|
||||
.login-field {
|
||||
margin-top: 12px;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
box-shadow: inset 0 1px 3px rgba(23, 35, 61, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-field :deep(.van-field__control) {
|
||||
font-size: 15px;
|
||||
color: #151c28;
|
||||
padding: 11px 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.code-line {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 86px;
|
||||
gap: 8px;
|
||||
.login-field :deep(.van-field__label) {
|
||||
width: auto;
|
||||
margin-right: 8px;
|
||||
color: #333b48;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
}
|
||||
.login-field :deep(.van-field__left-icon) {
|
||||
color: #1777ff;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.code-line button,
|
||||
.sms-login,
|
||||
.primary-login,
|
||||
.login-links button {
|
||||
border: 0;
|
||||
background: none;
|
||||
.login-field :deep(.van-field__right-icon) {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.field-prefix {
|
||||
color: #1777ff;
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.code-line button {
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
color: #3f4652;
|
||||
box-shadow: inset 0 0 0 1px #d6dce6;
|
||||
/* ========== 底部链接行 ========== */
|
||||
.login-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0 12px;
|
||||
color: #566274;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.login-links,
|
||||
/* ========== 协议行 ========== */
|
||||
.agreement-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.login-links {
|
||||
justify-content: space-between;
|
||||
margin: 18px 0 26px;
|
||||
color: #566274;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.login-links button {
|
||||
color: #08b86f;
|
||||
}
|
||||
|
||||
.agreement-row {
|
||||
gap: 10px;
|
||||
.agreement-row :deep(.van-checkbox__label) {
|
||||
margin-left: 6px;
|
||||
color: #333b48;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.agreement-row :deep(.van-checkbox__label b) {
|
||||
color: #1777ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ========== 登录按钮 ========== */
|
||||
.login-button {
|
||||
margin-top: 6px;
|
||||
height: 46px;
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, #1777ff, #5fd4ff) !important;
|
||||
border: none !important;
|
||||
box-shadow: 0 8px 20px rgba(23, 119, 255, 0.25);
|
||||
}
|
||||
|
||||
/* ========== 注册入口按钮 ========== */
|
||||
.register-button {
|
||||
margin-top: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.agreement-row input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
.register-entry {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.agreement-row b {
|
||||
color: #e63145;
|
||||
font-weight: 500;
|
||||
}
|
||||
/* ========== 响应式 ========== */
|
||||
@media (max-height: 620px) {
|
||||
.mobile-login-shell {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.primary-login,
|
||||
.sms-login {
|
||||
width: 100%;
|
||||
height: 52px;
|
||||
margin-top: 22px;
|
||||
border-radius: 11px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.login-card {
|
||||
min-height: calc(100dvh - 20px);
|
||||
}
|
||||
|
||||
.primary-login {
|
||||
background: #050505;
|
||||
color: #ffffff;
|
||||
}
|
||||
.login-top {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.primary-login:disabled {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.monster-logo {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.sms-login {
|
||||
background: #ffffff;
|
||||
color: #151c28;
|
||||
box-shadow: inset 0 0 0 1px #e1e6ee;
|
||||
.auth-switch {
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.login-card h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.login-field {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.login-button {
|
||||
height: 42px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 520px) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useSessionStore } from "@/stores/session";
|
||||
|
||||
const session = useSessionStore();
|
||||
const router = useRouter();
|
||||
const isLoggedIn = computed(() => Boolean(session.token));
|
||||
const displayName = computed(() => session.phone ? `用户${session.phone.slice(-6)}` : `用户${session.userId || 883099}`);
|
||||
const displayId = computed(() => session.userId || 138865);
|
||||
@@ -27,104 +28,457 @@ const serviceIcons = ["👥", "🪙", "💸", "💼", "⚔️", "💎", "⭐", "
|
||||
function logout() {
|
||||
session.logout();
|
||||
}
|
||||
|
||||
function goToLogin() {
|
||||
router.push("/m/login");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="mobile-profile-shell">
|
||||
<!-- 未登录区 → van-empty + van-button -->
|
||||
<template v-if="!isLoggedIn">
|
||||
<section class="guest-card">
|
||||
<div class="guest-logo">锤</div>
|
||||
<h1>登录大锤商行</h1>
|
||||
<p>登录后查看订单、管理发布、提现余额,并享受平台担保交易服务。</p>
|
||||
<RouterLink to="/m/login" class="guest-login">立即登录</RouterLink>
|
||||
<div class="guest-benefits"><span>担保交易</span><span>订单留痕</span><span>安全交接</span></div>
|
||||
<section class="guest-section">
|
||||
<van-empty
|
||||
image="error"
|
||||
description="登录后查看订单、管理发布、提现余额"
|
||||
class="guest-empty"
|
||||
>
|
||||
<template #image>
|
||||
<div class="guest-logo">锤</div>
|
||||
</template>
|
||||
</van-empty>
|
||||
<van-button
|
||||
type="primary"
|
||||
block
|
||||
round
|
||||
class="guest-login-btn"
|
||||
@click="goToLogin"
|
||||
>
|
||||
立即登录
|
||||
</van-button>
|
||||
<div class="guest-benefits">
|
||||
<span>担保交易</span><span>订单留痕</span><span>安全交接</span>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<!-- 已登录区 -->
|
||||
<template v-else>
|
||||
<!-- 头像区 → van-cell + van-image -->
|
||||
<section class="profile-header">
|
||||
<div class="avatar">👤</div>
|
||||
<van-image
|
||||
round
|
||||
width="64px"
|
||||
height="64px"
|
||||
src=""
|
||||
class="avatar-image"
|
||||
>
|
||||
<template #error>
|
||||
<div class="avatar-fallback">👤</div>
|
||||
</template>
|
||||
</van-image>
|
||||
<div class="profile-user">
|
||||
<h1>{{ displayName }}<span>✎</span></h1>
|
||||
<h1>{{ displayName }}<span class="edit-icon">✎</span></h1>
|
||||
<p>ID:{{ displayId }} · {{ maskedPhone }}</p>
|
||||
</div>
|
||||
<button class="setting-btn" type="button">⚙</button>
|
||||
<van-icon name="setting-o" size="24" class="setting-icon" />
|
||||
</section>
|
||||
|
||||
<section class="balance-card">
|
||||
<div><span>账户余额(元)</span><strong>¥0.00</strong><button type="button">查看明细</button></div>
|
||||
<button class="withdraw-btn" type="button">提现</button>
|
||||
</section>
|
||||
<!-- 余额卡片 → van-cell-group + van-cell -->
|
||||
<van-cell-group inset class="balance-group">
|
||||
<van-cell center>
|
||||
<template #title>
|
||||
<div class="balance-info">
|
||||
<span class="balance-label">账户余额(元)</span>
|
||||
<strong class="balance-value">¥0.00</strong>
|
||||
<van-button
|
||||
size="mini"
|
||||
plain
|
||||
hairline
|
||||
type="warning"
|
||||
class="detail-btn"
|
||||
>
|
||||
查看明细
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
<template #value>
|
||||
<van-button
|
||||
type="primary"
|
||||
size="small"
|
||||
class="withdraw-btn"
|
||||
>
|
||||
提现
|
||||
</van-button>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<section class="menu-card">
|
||||
<!-- 订单菜单 → van-grid -->
|
||||
<section class="menu-section">
|
||||
<h2>我的订单</h2>
|
||||
<div class="icon-grid four">
|
||||
<RouterLink v-for="item in sellerOrders" :key="item.label" :to="item.to"><span>{{ item.icon }}</span><em>{{ item.label }}</em></RouterLink>
|
||||
</div>
|
||||
<van-grid :column-num="4" :border="false" class="order-grid">
|
||||
<van-grid-item
|
||||
v-for="item in sellerOrders"
|
||||
:key="item.label"
|
||||
:to="item.to"
|
||||
>
|
||||
<template #icon>
|
||||
<span class="menu-icon">{{ item.icon }}</span>
|
||||
</template>
|
||||
<template #text>
|
||||
<span class="menu-text">{{ item.label }}</span>
|
||||
</template>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</section>
|
||||
|
||||
<section class="menu-card">
|
||||
<!-- 我买的 → van-grid -->
|
||||
<section class="menu-section">
|
||||
<h2>我买的</h2>
|
||||
<div class="icon-grid four">
|
||||
<RouterLink v-for="item in buyerOrders" :key="item.label" :to="item.to"><span>{{ item.icon }}</span><em>{{ item.label }}</em></RouterLink>
|
||||
</div>
|
||||
<van-grid :column-num="4" :border="false" class="order-grid">
|
||||
<van-grid-item
|
||||
v-for="item in buyerOrders"
|
||||
:key="item.label"
|
||||
:to="item.to"
|
||||
>
|
||||
<template #icon>
|
||||
<span class="menu-icon">{{ item.icon }}</span>
|
||||
</template>
|
||||
<template #text>
|
||||
<span class="menu-text">{{ item.label }}</span>
|
||||
</template>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</section>
|
||||
|
||||
<section class="menu-card service-card">
|
||||
<div class="icon-grid service-grid">
|
||||
<button v-for="(item, index) in serviceItems" :key="item" type="button"><span>{{ serviceIcons[index] }}</span><em>{{ item }}</em></button>
|
||||
</div>
|
||||
</section>
|
||||
<!-- 服务菜单 → van-grid -->
|
||||
<van-cell-group inset class="service-group">
|
||||
<van-grid :column-num="4" :border="false" class="service-grid">
|
||||
<van-grid-item
|
||||
v-for="(item, index) in serviceItems"
|
||||
:key="item"
|
||||
>
|
||||
<template #icon>
|
||||
<span class="menu-icon">{{ serviceIcons[index] }}</span>
|
||||
</template>
|
||||
<template #text>
|
||||
<span class="menu-text">{{ item }}</span>
|
||||
</template>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-cell-group>
|
||||
|
||||
<button v-if="isLoggedIn" class="logout-btn" type="button" @click="logout">退出登录</button>
|
||||
<!-- 退出登录 → van-button -->
|
||||
<van-button
|
||||
v-if="isLoggedIn"
|
||||
plain
|
||||
type="danger"
|
||||
block
|
||||
class="logout-btn"
|
||||
@click="logout"
|
||||
>
|
||||
退出登录
|
||||
</van-button>
|
||||
|
||||
<nav class="profile-tabbar" aria-label="底部导航">
|
||||
<RouterLink to="/m" class="tab-item">首页</RouterLink>
|
||||
<RouterLink to="/m/listings" class="tab-item">租号</RouterLink>
|
||||
<RouterLink to="/m/seller/listings/create" class="publish-tab">发布</RouterLink>
|
||||
<RouterLink to="/m/orders" class="tab-item">订单</RouterLink>
|
||||
<RouterLink to="/m/profile" class="tab-item active">我的</RouterLink>
|
||||
</nav>
|
||||
<!-- 底部 TabBar → van-tabbar route -->
|
||||
<van-tabbar route class="profile-tabbar">
|
||||
<van-tabbar-item to="/m" icon="home-o">首页</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/listings" icon="search">租号</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/seller/listings/create" icon="add-o" class="tabbar-publish">发布</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/orders" icon="orders-o">订单</van-tabbar-item>
|
||||
<van-tabbar-item to="/m/profile" icon="manager-o">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mobile-profile-shell { min-height: 100vh; background: linear-gradient(180deg, #fbfaff 0, #fbfaff 210px, #f7f7f7 210px); color: #1a202c; padding: 28px 18px 96px; }
|
||||
.profile-header { display: flex; align-items: center; gap: 14px; min-height: 120px; }
|
||||
.avatar { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #fff; font-size: 32px; box-shadow: 0 10px 24px rgba(24,30,45,.08); }
|
||||
.profile-user { min-width: 0; flex: 1; }
|
||||
.profile-user h1 { overflow: hidden; margin: 0; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.profile-user h1 span { margin-left: 4px; color: #b7bcc6; font-size: 14px; }
|
||||
.profile-user p { margin: 7px 0 0; color: #666f7c; font-size: 13px; }
|
||||
.setting-btn { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: #fff; font-size: 20px; }
|
||||
.balance-card, .menu-card, .guest-card { border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(24,30,45,.06); }
|
||||
.balance-card { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 24px 28px; }
|
||||
.balance-card span, .balance-card strong { display: block; }
|
||||
.balance-card span { color: #8b8f99; font-weight: 700; }
|
||||
.balance-card strong { margin-top: 14px; font-size: 34px; line-height: 1; }
|
||||
.balance-card button { border: 0; border-radius: 6px; font-weight: 800; }
|
||||
.balance-card div button { margin-top: 14px; background: #fff5ee; color: #ff5f00; padding: 6px 8px; box-shadow: inset 0 0 0 1px #ff8a42; }
|
||||
.withdraw-btn { background: #050505; color: #fff; padding: 12px 18px; }
|
||||
.menu-card { margin-top: 12px; padding: 16px 14px; }
|
||||
.menu-card h2 { margin: 0 0 12px; font-size: 18px; }
|
||||
.icon-grid { display: grid; gap: 14px 8px; }
|
||||
.icon-grid.four, .service-grid { grid-template-columns: repeat(4, 1fr); }
|
||||
.icon-grid a, .icon-grid button { display: grid; gap: 7px; place-items: center; border: 0; background: none; color: #5f6671; text-align: center; }
|
||||
.icon-grid span { font-size: 25px; line-height: 1; }
|
||||
.icon-grid em { font-size: 13px; font-style: normal; font-weight: 700; }
|
||||
.service-card { padding-top: 18px; padding-bottom: 18px; }
|
||||
.guest-card { margin-top: 18px; padding: 34px 26px; text-align: center; }
|
||||
.guest-logo { display: grid; width: 74px; height: 74px; margin: 0 auto 18px; place-items: center; border-radius: 22px; background: linear-gradient(145deg, #1777ff, #5ed7ff); color: #fff; font-size: 30px; font-weight: 900; }
|
||||
.guest-card h1 { margin: 0; font-size: 24px; }
|
||||
.guest-card p { margin: 12px 0 22px; color: #667386; font-size: 14px; line-height: 1.7; }
|
||||
.guest-login { display: block; border-radius: 13px; background: #050505; color: #fff; padding: 14px; font-weight: 900; }
|
||||
.guest-benefits { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
|
||||
.guest-benefits span { border-radius: 999px; background: #eef6ff; color: #1777ff; padding: 6px 9px; font-size: 12px; font-weight: 800; }
|
||||
.logout-btn { width: 100%; margin-top: 14px; border: 0; border-radius: 14px; background: #fff; color: #ef4444; padding: 14px; font-weight: 900; box-shadow: 0 8px 26px rgba(24,30,45,.06); }
|
||||
.profile-tabbar { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 20; display: flex; height: 60px; align-items: center; justify-content: space-around; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 16px 36px rgba(23,35,61,.16); backdrop-filter: blur(14px); }
|
||||
.tab-item { color: #708097; font-size: 12px; font-weight: 800; }
|
||||
.tab-item.active { color: #5b6ee1; }
|
||||
.publish-tab { display: grid; width: 58px; height: 58px; place-items: center; border: 5px solid #f7f7f7; border-radius: 50%; background: #536dc8; color: #fff; font-size: 13px; font-weight: 900; transform: translateY(-18px); box-shadow: 0 10px 24px rgba(83,109,200,.35); }
|
||||
@media (min-width: 520px) { .mobile-profile-shell { max-width: 430px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(23,35,61,.08); } .profile-tabbar { right: calc((100vw - 430px) / 2 + 12px); left: calc((100vw - 430px) / 2 + 12px); } }
|
||||
.mobile-profile-shell {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #fbfaff 0, #fbfaff 210px, #f7f7f7 210px);
|
||||
color: #1a202c;
|
||||
padding: 28px 12px 96px;
|
||||
}
|
||||
|
||||
/* ========== 未登录区 ========== */
|
||||
.guest-section {
|
||||
text-align: center;
|
||||
padding: 20px 14px 0;
|
||||
}
|
||||
|
||||
.guest-empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.guest-empty :deep(.van-empty__description) {
|
||||
color: #667386;
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.guest-logo {
|
||||
display: grid;
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
margin: 0 auto 0;
|
||||
place-items: center;
|
||||
border-radius: 22px;
|
||||
background: linear-gradient(145deg, #1777ff, #5ed7ff);
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.guest-login-btn {
|
||||
margin-top: 18px;
|
||||
border-radius: 13px;
|
||||
background: #050505;
|
||||
border-color: #050505;
|
||||
font-size: 16px;
|
||||
font-weight: 900;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.guest-benefits {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.guest-benefits span {
|
||||
border-radius: 999px;
|
||||
background: #eef6ff;
|
||||
color: #1777ff;
|
||||
padding: 6px 9px;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
/* ========== 已登录头像区 ========== */
|
||||
.profile-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.avatar-image {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.avatar-fallback {
|
||||
display: grid;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
place-items: center;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
font-size: 32px;
|
||||
box-shadow: 0 10px 24px rgba(24, 30, 45, 0.08);
|
||||
}
|
||||
|
||||
.profile-user {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.profile-user h1 {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.edit-icon {
|
||||
margin-left: 4px;
|
||||
color: #b7bcc6;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.profile-user p {
|
||||
margin: 7px 0 0;
|
||||
color: #666f7c;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.setting-icon {
|
||||
color: #8b8f99;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ========== 余额卡片 ========== */
|
||||
.balance-group {
|
||||
margin-top: 10px;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 26px rgba(24, 30, 45, 0.06);
|
||||
}
|
||||
|
||||
.balance-group :deep(.van-cell) {
|
||||
padding: 24px 20px;
|
||||
}
|
||||
|
||||
.balance-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
color: #8b8f99;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.balance-value {
|
||||
margin-top: 10px;
|
||||
font-size: 34px;
|
||||
line-height: 1;
|
||||
color: #1a202c;
|
||||
}
|
||||
|
||||
.detail-btn {
|
||||
margin-top: 10px;
|
||||
align-self: flex-start;
|
||||
border-color: #ff8a42;
|
||||
color: #ff5f00;
|
||||
background: #fff5ee;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.withdraw-btn {
|
||||
background: #050505;
|
||||
border-color: #050505;
|
||||
border-radius: 6px;
|
||||
padding: 12px 18px;
|
||||
font-weight: 800;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* ========== 订单菜单 ========== */
|
||||
.menu-section {
|
||||
margin-top: 12px;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
padding: 16px 14px;
|
||||
box-shadow: 0 8px 26px rgba(24, 30, 45, 0.06);
|
||||
}
|
||||
|
||||
.menu-section h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.order-grid :deep(.van-grid-item__content) {
|
||||
padding: 8px 4px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
font-size: 25px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #5f6671;
|
||||
}
|
||||
|
||||
/* ========== 服务菜单 ========== */
|
||||
.service-group {
|
||||
margin-top: 12px;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 26px rgba(24, 30, 45, 0.06);
|
||||
}
|
||||
|
||||
.service-group :deep(.van-cell-group) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.service-grid :deep(.van-grid-item__content) {
|
||||
padding: 14px 4px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* ========== 退出登录 ========== */
|
||||
.logout-btn {
|
||||
margin-top: 14px;
|
||||
border-radius: 14px;
|
||||
font-weight: 900;
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* ========== van-tabbar 底部导航 ========== */
|
||||
.profile-tabbar {
|
||||
position: fixed;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
left: 12px;
|
||||
z-index: 20;
|
||||
height: 60px;
|
||||
border-radius: 22px;
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
box-shadow: 0 16px 36px rgba(23, 35, 61, 0.16);
|
||||
backdrop-filter: blur(14px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.profile-tabbar :deep(.van-tabbar) {
|
||||
border-radius: 22px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.profile-tabbar :deep(.van-tabbar-item) {
|
||||
color: #708097;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.profile-tabbar :deep(.van-tabbar-item--active) {
|
||||
color: #5b6ee1;
|
||||
}
|
||||
|
||||
.profile-tabbar :deep(.van-tabbar-item__icon) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* 发布按钮特殊样式 */
|
||||
.tabbar-publish :deep(.van-tabbar-item__icon) {
|
||||
display: grid;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(180deg, #ffb21a, #ff6a00);
|
||||
color: #ffffff !important;
|
||||
font-size: 22px;
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 8px 20px rgba(255, 106, 0, 0.35);
|
||||
}
|
||||
|
||||
.tabbar-publish :deep(.van-tabbar-item__text) {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
/* ========== 响应式适配 ========== */
|
||||
@media (min-width: 520px) {
|
||||
.mobile-profile-shell {
|
||||
max-width: 430px;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 0 0 1px rgba(23, 35, 61, 0.08);
|
||||
}
|
||||
|
||||
.profile-tabbar {
|
||||
right: calc((100vw - 430px) / 2 + 12px);
|
||||
left: calc((100vw - 430px) / 2 + 12px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
<script setup lang="ts">
|
||||
import { onUnmounted, reactive, ref } from "vue";
|
||||
import { RouterLink, useRouter } from "vue-router";
|
||||
import { showToast } from "vant";
|
||||
|
||||
import { sendSmsCode } from "@/api/auth";
|
||||
import { useSessionStore } from "@/stores/session";
|
||||
|
||||
const router = useRouter();
|
||||
const session = useSessionStore();
|
||||
const loading = ref(false);
|
||||
const sending = ref(false);
|
||||
const agreed = ref(false);
|
||||
const form = reactive({
|
||||
phone: "",
|
||||
code: "",
|
||||
inviteCode: "",
|
||||
});
|
||||
|
||||
/* --------- 验证码倒计时 --------- */
|
||||
const countDown = ref(0);
|
||||
let timer: ReturnType<typeof setInterval> | null = null;
|
||||
|
||||
function startCountDown() {
|
||||
countDown.value = 60;
|
||||
timer = setInterval(() => {
|
||||
countDown.value--;
|
||||
if (countDown.value <= 0) {
|
||||
clearInterval(timer!);
|
||||
timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
});
|
||||
|
||||
/* --------- 业务方法 --------- */
|
||||
async function handleSendCode() {
|
||||
if (!form.phone.trim()) {
|
||||
showToast("请输入手机号");
|
||||
return;
|
||||
}
|
||||
|
||||
sending.value = true;
|
||||
try {
|
||||
await sendSmsCode(form.phone);
|
||||
showToast("验证码已发送,开发环境请查看后端日志");
|
||||
startCountDown();
|
||||
} catch (error) {
|
||||
showToast(readError(error, "验证码发送失败,请稍后重试"));
|
||||
} finally {
|
||||
sending.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function readError(error: unknown, fallback: string) {
|
||||
if (typeof error === "object" && error && "response" in error) {
|
||||
const response = (error as { response?: { data?: { message?: string } } })
|
||||
.response;
|
||||
return response?.data?.message || fallback;
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
||||
async function handleRegister() {
|
||||
if (!agreed.value) {
|
||||
showToast("请先阅读并同意用户协议和隐私政策");
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
await session.login(form.phone, form.code);
|
||||
await router.push("/m/profile");
|
||||
} catch {
|
||||
showToast("注册失败,请检查手机号和验证码");
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="mobile-register-shell">
|
||||
<section class="register-card">
|
||||
<!-- 品牌区域 -->
|
||||
<div class="register-top">
|
||||
<div class="monster-logo">锤</div>
|
||||
<div>
|
||||
<p>加入大锤商行</p>
|
||||
<small>注册后即可租号、下单、发布账号</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 登录/注册 Tab 切换 -->
|
||||
<div class="auth-switch" aria-label="登录注册切换">
|
||||
<RouterLink to="/m/login">登录</RouterLink>
|
||||
<RouterLink to="/m/register" class="active">注册</RouterLink>
|
||||
</div>
|
||||
|
||||
<p class="register-eyebrow">CREATE ACCOUNT</p>
|
||||
<h1>手机号注册</h1>
|
||||
<p class="register-subtitle">
|
||||
先用短信验证码创建账号,后续再补充实名和收款信息。
|
||||
</p>
|
||||
|
||||
<!-- 手机号输入 -->
|
||||
<van-field
|
||||
v-model="form.phone"
|
||||
type="tel"
|
||||
maxlength="11"
|
||||
inputmode="tel"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
class="register-field"
|
||||
>
|
||||
<template #left-icon>
|
||||
<span class="field-prefix">+86</span>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 验证码输入 -->
|
||||
<van-field
|
||||
v-model="form.code"
|
||||
type="digit"
|
||||
maxlength="6"
|
||||
placeholder="6 位验证码"
|
||||
class="register-field"
|
||||
:left-icon="'shield-o'"
|
||||
>
|
||||
<template #button>
|
||||
<van-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
round
|
||||
:disabled="sending || countDown > 0"
|
||||
:loading="sending"
|
||||
@click="handleSendCode"
|
||||
>
|
||||
{{
|
||||
countDown > 0
|
||||
? `${countDown}s`
|
||||
: sending
|
||||
? "发送中"
|
||||
: "发送验证码"
|
||||
}}
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 邀请码输入 -->
|
||||
<van-field
|
||||
v-model="form.inviteCode"
|
||||
maxlength="16"
|
||||
placeholder="选填,有邀请码填入"
|
||||
clearable
|
||||
class="register-field"
|
||||
:left-icon="'friends-o'"
|
||||
/>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<div class="agreement-row">
|
||||
<van-checkbox v-model="agreed" shape="square" icon-size="16px">
|
||||
我已阅读并同意《<b>用户协议</b>》和《<b>隐私政策</b>》
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
<!-- 注册按钮 -->
|
||||
<van-button
|
||||
type="primary"
|
||||
block
|
||||
round
|
||||
class="register-button"
|
||||
:loading="loading"
|
||||
loading-text="注册中..."
|
||||
@click="handleRegister"
|
||||
>
|
||||
注册并登录
|
||||
</van-button>
|
||||
|
||||
<!-- 底部登录入口 -->
|
||||
<RouterLink
|
||||
to="/m/login"
|
||||
class="login-entry"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>
|
||||
<van-button
|
||||
plain
|
||||
type="primary"
|
||||
block
|
||||
round
|
||||
size="small"
|
||||
class="login-link-button"
|
||||
@click="navigate"
|
||||
>
|
||||
已有账号?去登录
|
||||
</van-button>
|
||||
</RouterLink>
|
||||
</section>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* ========== Vant 主题变量覆盖 ========== */
|
||||
:root {
|
||||
--van-primary-color: #1777ff;
|
||||
--van-primary-color-light: #5fd4ff;
|
||||
--van-button-primary-background: linear-gradient(135deg, #1777ff, #5fd4ff);
|
||||
--van-button-primary-border-color: transparent;
|
||||
}
|
||||
|
||||
/* ========== 页面容器 ========== */
|
||||
.mobile-register-shell {
|
||||
min-height: 100dvh;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
background: radial-gradient(
|
||||
circle at 50% 0,
|
||||
#eafff9 0,
|
||||
#f7fbff 38%,
|
||||
#ffffff 86%
|
||||
);
|
||||
color: #151c28;
|
||||
padding: 40px 24px;
|
||||
}
|
||||
|
||||
.register-card {
|
||||
display: flex;
|
||||
min-height: calc(100dvh - 80px);
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ========== 品牌区域 ========== */
|
||||
.register-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.monster-logo {
|
||||
display: grid;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
flex: 0 0 auto;
|
||||
place-items: center;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(145deg, #1777ff, #5fd4ff);
|
||||
color: #ffffff;
|
||||
font-size: 21px;
|
||||
font-weight: 900;
|
||||
box-shadow: 0 10px 22px rgba(23, 119, 255, 0.2);
|
||||
}
|
||||
|
||||
.register-top p {
|
||||
margin: 0 0 2px;
|
||||
font-size: 20px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.register-top small,
|
||||
.register-subtitle {
|
||||
color: #667386;
|
||||
}
|
||||
|
||||
/* ========== Tab 切换 ========== */
|
||||
.auth-switch {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
margin-bottom: 16px;
|
||||
border-radius: 15px;
|
||||
background: #eef4fb;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.auth-switch a {
|
||||
border-radius: 11px;
|
||||
color: #667386;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 900;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.auth-switch a.active {
|
||||
background: #ffffff;
|
||||
color: #111827;
|
||||
box-shadow: 0 8px 18px rgba(23, 35, 61, 0.08);
|
||||
}
|
||||
|
||||
/* ========== 标题区 ========== */
|
||||
.register-eyebrow {
|
||||
margin: 0 0 5px;
|
||||
color: #02846e;
|
||||
font-size: 12px;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.register-card h1 {
|
||||
margin: 0;
|
||||
font-size: 28px;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.register-subtitle {
|
||||
margin: 7px 0 14px;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
/* ========== Vant Field 覆盖样式 ========== */
|
||||
.register-field {
|
||||
margin-top: 12px;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
box-shadow: inset 0 1px 3px rgba(23, 35, 61, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.register-field :deep(.van-field__control) {
|
||||
font-size: 15px;
|
||||
color: #151c28;
|
||||
}
|
||||
|
||||
.register-field :deep(.van-field__label) {
|
||||
width: auto;
|
||||
margin-right: 8px;
|
||||
color: #333b48;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
}
|
||||
.register-field :deep(.van-field__left-icon) {
|
||||
color: #1777ff;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.register-field :deep(.van-field__right-icon) {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.field-prefix {
|
||||
color: #1777ff;
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* ========== 协议行 ========== */
|
||||
.agreement-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.agreement-row :deep(.van-checkbox__label) {
|
||||
margin-left: 6px;
|
||||
color: #333b48;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.agreement-row :deep(.van-checkbox__label b) {
|
||||
color: #1777ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ========== 注册按钮 ========== */
|
||||
.register-button {
|
||||
margin-top: 6px;
|
||||
height: 46px;
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, #1777ff, #5fd4ff) !important;
|
||||
border: none !important;
|
||||
box-shadow: 0 8px 20px rgba(23, 119, 255, 0.25);
|
||||
}
|
||||
|
||||
/* ========== 登录入口按钮 ========== */
|
||||
.login-link-button {
|
||||
margin-top: 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.login-entry {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* ========== 响应式 ========== */
|
||||
@media (max-height: 620px) {
|
||||
.mobile-register-shell {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.register-card {
|
||||
min-height: calc(100dvh - 20px);
|
||||
}
|
||||
|
||||
.register-top {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.monster-logo {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.auth-switch {
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.register-card h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.register-field {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.register-button {
|
||||
height: 42px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 520px) {
|
||||
.mobile-register-shell {
|
||||
max-width: 430px;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 0 0 1px rgba(23, 35, 61, 0.08);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user