微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "审核状态",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon",
"t-loading": "tdesign-miniprogram/loading/loading"
}
}

View File

@@ -0,0 +1,99 @@
import { request } from "../../utils/request"
Page({
data: {
statusBarHeight: 0,
loading: true,
status: "pending" as "pending" | "rejected",
application: null as null | {
id: number
site_code: string
role_type: string
phone: string
status: string
reject_reason: string | null
created_at: string
},
},
onLoad() {
const { statusBarHeight } = wx.getSystemInfoSync()
this.setData({ statusBarHeight })
this.fetchStatus()
},
onShow() {
this.fetchStatus()
},
onPullDownRefresh() {
this.fetchStatus().finally(() => {
wx.stopPullDownRefresh()
})
},
async fetchStatus() {
try {
const data = await request({
url: "/api/xcx/me",
method: "GET",
needAuth: true,
})
// 同步 globalData 和 Storage
const app = getApp<IAppOption>()
app.globalData.authUser = {
userId: data.user_id,
status: data.status,
nickname: data.nickname,
}
wx.setStorageSync("userId", data.user_id)
wx.setStorageSync("userStatus", data.status)
// 已通过 → 跳转主页
if (data.status === "approved") {
wx.reLaunch({ url: "/pages/mvp/mvp" })
return
}
// 已禁用 → 跳转无权限页
if (data.status === "disabled") {
wx.reLaunch({ url: "/pages/no-permission/no-permission" })
return
}
// 已拒绝 → 跳转无权限页
if (data.status === "rejected") {
wx.reLaunch({ url: "/pages/no-permission/no-permission" })
return
}
// 全新用户(尚未提交申请)→ 跳回申请页
if (data.status === "new") {
wx.reLaunch({ url: "/pages/apply/apply" })
return
}
this.setData({
loading: false,
status: data.status,
application: data.latest_application || null,
})
} catch (err: any) {
this.setData({ loading: false })
wx.showToast({ title: "获取状态失败", icon: "none" })
}
},
onSwitchAccount() {
const app = getApp<IAppOption>()
app.globalData.token = undefined
app.globalData.refreshToken = undefined
app.globalData.authUser = undefined
wx.removeStorageSync("token")
wx.removeStorageSync("refreshToken")
wx.removeStorageSync("userId")
wx.removeStorageSync("userStatus")
wx.reLaunch({ url: "/pages/login/login" })
},
})

View File

@@ -0,0 +1,116 @@
<!-- pages/reviewing/reviewing.wxml — 按 H5 原型结构迁移 -->
<view class="page" style="padding-top: {{statusBarHeight}}px;">
<!-- 十字纹背景图案H5 bg-pattern -->
<view class="bg-pattern"></view>
<!-- 顶部渐变装饰 -->
<view class="top-gradient top-gradient--{{status}}"></view>
<!-- 加载中 -->
<view class="content content--loading" wx:if="{{loading}}">
<view class="loading-box">
<t-loading theme="circular" size="42rpx" text="加载中..." />
</view>
</view>
<!-- 主体内容 -->
<view class="content" wx:else>
<!-- 图标区域 -->
<view class="icon-area float-animation">
<!-- 背景光晕 -->
<view class="icon-glow icon-glow--{{status}}"></view>
<!-- 主图标 -->
<view class="icon-box icon-box--{{status}}">
<image wx:if="{{status === 'pending'}}" class="icon-main-img" src="/assets/icons/icon-clock-circle.svg" mode="aspectFit" />
<t-icon wx:else name="close-circle" size="98rpx" color="#fff" />
</view>
<!-- 装饰点 -->
<view class="icon-dot icon-dot--{{status}} dot-1 pulse-soft"></view>
<view class="icon-dot icon-dot--{{status}} dot-2 pulse-soft"></view>
</view>
<!-- 标题区域 -->
<view class="title-area">
<text class="main-title">{{status === 'pending' ? '申请审核中' : '申请未通过'}}</text>
<text class="sub-title" wx:if="{{status === 'pending'}}">您的访问申请已提交成功,正在等待管理员审核,请耐心等待</text>
<text class="sub-title" wx:else>很抱歉,您的申请未通过审核</text>
</view>
<!-- 进度提示卡片(仅审核中显示) -->
<view class="progress-card" wx:if="{{status === 'pending'}}">
<view class="progress-header">
<view class="progress-icon-box">
<t-icon name="info-circle-filled" size="35rpx" color="#ed7b2f" />
</view>
<view class="progress-header-text">
<text class="progress-title">审核进度</text>
<text class="progress-desc">通常需要 1-3 个工作日</text>
</view>
</view>
<!-- 进度步骤 -->
<view class="progress-steps">
<view class="step-group">
<view class="step-dot step-dot--done">
<t-icon name="check" size="28rpx" color="#fff" />
</view>
<text class="step-label step-label--done">已提交</text>
</view>
<view class="step-line">
<view class="step-line-fill"></view>
</view>
<view class="step-group">
<view class="step-dot step-dot--active">
<view class="step-dot-inner pulse-soft"></view>
</view>
<text class="step-label step-label--active">审核中</text>
</view>
<view class="step-line"></view>
<view class="step-group">
<view class="step-dot step-dot--pending"></view>
<text class="step-label step-label--pending">通过</text>
</view>
</view>
</view>
<!-- 拒绝原因卡片 -->
<view class="reject-card" wx:if="{{status === 'rejected' && application && application.reject_reason}}">
<view class="reject-header">
<t-icon name="error-circle-filled" size="32rpx" color="#e34d59" />
<text class="reject-title">拒绝原因</text>
</view>
<text class="reject-reason">{{application.reject_reason}}</text>
</view>
<!-- 申请信息摘要 -->
<view class="info-card" wx:if="{{application}}">
<text class="info-card-title">申请信息</text>
<view class="info-row">
<text class="info-label">球房ID</text>
<text class="info-value">{{application.site_code}}</text>
</view>
<view class="info-row">
<text class="info-label">申请身份</text>
<text class="info-value">{{application.role_type}}</text>
</view>
<view class="info-row">
<text class="info-label">手机号</text>
<text class="info-value">{{application.phone}}</text>
</view>
</view>
<!-- 联系提示 -->
<view class="contact-hint">
<t-icon name="chat" size="28rpx" color="#a6a6a6" />
<text class="contact-text">如有疑问,请联系管理员</text>
</view>
</view>
<!-- 底部按钮区域 -->
<view class="bottom-area" wx:if="{{!loading}}">
<view class="switch-btn" bindtap="onSwitchAccount">
<t-icon name="logout" size="28rpx" color="#5e5e5e" />
<text class="switch-btn-text">更换登录账号</text>
</view>
</view>
</view>
<dev-fab />

View File

@@ -0,0 +1,427 @@
/* pages/reviewing/reviewing.wxss — 按 H5 原型精确转换 */
/* 一屏页面height + box-sizing 确保 padding 不增加总高度 */
.page {
height: 100vh;
box-sizing: border-box;
display: flex;
flex-direction: column;
background-color: #f8fafc;
position: relative;
}
/* H5: bg-pattern 十字纹背景 — 用 WXML view + repeating-linear-gradient 模拟 */
/* 背景纹理间距不缩放,保持原值 */
.bg-pattern {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image:
repeating-linear-gradient(0deg, transparent, transparent 58rpx, rgba(0,82,217,0.03) 58rpx, rgba(0,82,217,0.03) 62rpx, transparent 62rpx, transparent 120rpx),
repeating-linear-gradient(90deg, transparent, transparent 58rpx, rgba(0,82,217,0.03) 58rpx, rgba(0,82,217,0.03) 62rpx, transparent 62rpx, transparent 120rpx);
z-index: 0;
pointer-events: none;
}
/* ---- 顶部渐变装饰 ---- */
.top-gradient {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 448rpx;
z-index: 0;
}
/* H5: from-warning/10 = rgba(237,123,47,0.10) */
.top-gradient--pending {
background: linear-gradient(to bottom, rgba(237, 123, 47, 0.10), transparent);
}
.top-gradient--rejected {
background: linear-gradient(to bottom, rgba(227, 77, 89, 0.1), transparent);
}
/* ---- 主体内容 ---- */
.content {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 56rpx;
position: relative;
z-index: 1;
box-sizing: border-box;
}
.content--loading {
justify-content: flex-start;
padding-top: 350rpx;
}
/* ---- 加载中 ---- */
.loading-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* ---- 图标区域 ---- */
.icon-area {
position: relative;
margin-bottom: 56rpx;
}
/* H5: w-32 h-32 bg-warning/20 rounded-full blur-xl — 小程序不支持 filter:blur用更大尺寸 + radial-gradient 模拟 */
.icon-glow {
position: absolute;
width: 280rpx;
height: 280rpx;
border-radius: 50%;
top: -42rpx;
left: -42rpx;
}
.icon-glow--pending {
background: radial-gradient(circle, rgba(237, 123, 47, 0.18) 0%, rgba(237, 123, 47, 0.06) 50%, transparent 75%);
}
.icon-glow--rejected {
background: radial-gradient(circle, rgba(227, 77, 89, 0.18) 0%, rgba(227, 77, 89, 0.06) 50%, transparent 75%);
}
/* H5: w-28 h-28 = 112px = 224rpx, rounded-3xl = 48rpx */
.icon-box {
position: relative;
width: 196rpx;
height: 196rpx;
border-radius: 42rpx;
display: flex;
align-items: center;
justify-content: center;
}
/* H5: bg-gradient-to-br from-amber-400 to-orange-500, shadow-xl shadow-warning/30 */
.icon-box--pending {
background: linear-gradient(135deg, #f59e0b, #f97316);
box-shadow: 0 14rpx 42rpx rgba(237, 123, 47, 0.3);
}
.icon-box--rejected {
background: linear-gradient(135deg, #f87171, #e34d59);
box-shadow: 0 14rpx 42rpx rgba(227, 77, 89, 0.3);
}
/* 主图标图片 — H5: w-14 h-14 = 56px = 112rpx */
.icon-main-img {
width: 98rpx;
height: 98rpx;
}
.icon-dot {
position: absolute;
border-radius: 50%;
}
/* dot-1: bg-warning = #ed7b2f; dot-2: bg-amber-300 = #fcd34d */
.icon-dot--pending.dot-1 { background: #ed7b2f; }
.icon-dot--pending.dot-2 { background: #fcd34d; }
.icon-dot--rejected { background: #e34d59; }
/* H5: -top-2 -right-2 w-4 h-4 = 32rpx */
.dot-1 {
width: 28rpx;
height: 28rpx;
top: -14rpx;
right: -14rpx;
}
/* H5: -bottom-1 -left-3 w-3 h-3 = 24rpx, opacity 0.7, animation-delay 0.5s */
.dot-2 {
width: 22rpx;
height: 22rpx;
bottom: -8rpx;
left: -22rpx;
opacity: 0.7;
animation-delay: 0.5s;
}
/* ---- 标题区域 ---- */
/* H5: text-center mb-8 = 64rpx */
.title-area {
text-align: center;
margin-bottom: 56rpx;
}
/* H5: text-2xl = 48rpx, font-bold = 700, text-gray-10 = #4b4b4b, mb-3 = 24rpx */
.main-title {
display: block;
font-size: 42rpx;
font-weight: 700;
color: #4b4b4b;
margin-bottom: 22rpx;
}
/* H5: text-sm = 28rpx, text-gray-7 = #8b8b8b, leading-relaxed = 1.625, max-w-xs ≈ 640rpx */
.sub-title {
display: block;
font-size: 24rpx;
color: #8b8b8b;
line-height: 1.625;
max-width: 560rpx;
margin: 0 auto;
}
/* ---- 进度提示卡片 ---- */
/* H5: w-full max-w-sm bg-white rounded-2xl p-5 shadow-lg shadow-gray-200/50 mb-6 */
.progress-card {
width: 100%;
max-width: 482rpx;
background: #ffffff;
border-radius: 28rpx;
padding: 36rpx;
margin-bottom: 42rpx;
box-shadow: 0 8rpx 28rpx rgba(0, 0, 0, 0.06);
}
/* H5: flex items-center gap-4 = 32rpx mb-4 = 32rpx */
.progress-header {
display: flex;
flex-direction: row;
align-items: center;
gap: 28rpx;
margin-bottom: 28rpx;
}
/* H5: w-10 h-10 = 80rpx, bg-warning/10, rounded-xl = 24rpx */
.progress-icon-box {
width: 70rpx;
height: 70rpx;
min-width: 70rpx;
background: rgba(237, 123, 47, 0.1);
border-radius: 22rpx;
display: flex;
align-items: center;
justify-content: center;
}
.progress-header-text {
display: flex;
flex-direction: column;
}
/* H5: text-sm = 28rpx, font-medium = 500, text-gray-13 = #242424 */
.progress-title {
font-size: 24rpx;
font-weight: 500;
color: #242424;
margin-bottom: 4rpx;
}
/* H5: text-xs = 24rpx, text-gray-6 = #a6a6a6 */
.progress-desc {
font-size: 22rpx;
color: #a6a6a6;
}
/* ---- 进度步骤 ---- */
/* H5: flex items-center gap-3 = 24rpx */
.progress-steps {
display: flex;
flex-direction: row;
align-items: center;
gap: 22rpx;
}
.step-group {
display: flex;
flex-direction: row;
align-items: center;
gap: 14rpx;
flex-shrink: 0;
}
/* H5: w-6 h-6 = 48rpx */
.step-dot {
width: 42rpx;
height: 42rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.step-dot--done { background: #00a870; }
.step-dot--active { background: rgba(237, 123, 47, 0.2); }
.step-dot--pending { background: #f3f3f3; }
/* H5: w-2 h-2 = 16rpx */
.step-dot-inner {
width: 14rpx;
height: 14rpx;
background: #ed7b2f;
border-radius: 50%;
}
/* H5: text-xs = 24rpx */
.step-label {
font-size: 22rpx;
color: #c5c5c5;
white-space: nowrap;
}
.step-label--done { color: #5e5e5e; }
.step-label--active { color: #a6a6a6; }
.step-label--pending { color: #c5c5c5; }
/* H5: flex-1 h-0.5 = 4rpx, bg-gray-200 = #eeeeee, gap-3 = 24rpx 两侧 */
.step-line {
flex: 1;
height: 4rpx;
background: #eeeeee;
border-radius: 2rpx;
overflow: hidden;
}
/* H5: w-1/2 bg-warning */
.step-line-fill {
width: 50%;
height: 100%;
background: #ed7b2f;
border-radius: 2rpx;
}
/* ---- 拒绝原因卡片 ---- */
.reject-card {
width: 100%;
background: #fff5f5;
border: 2rpx solid rgba(227, 77, 89, 0.15);
border-radius: 28rpx;
padding: 28rpx;
margin-bottom: 22rpx;
}
.reject-header {
display: flex;
align-items: center;
gap: 10rpx;
margin-bottom: 14rpx;
}
.reject-title {
font-size: 24rpx;
font-weight: 500;
color: #e34d59;
}
.reject-reason {
font-size: 22rpx;
color: #5e5e5e;
line-height: 1.625;
}
/* ---- 申请信息卡片 ---- */
.info-card {
width: 100%;
background: #ffffff;
border-radius: 28rpx;
padding: 28rpx;
margin-bottom: 22rpx;
box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.03);
}
.info-card-title {
display: block;
font-size: 24rpx;
font-weight: 500;
color: #242424;
margin-bottom: 22rpx;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14rpx 0;
border-bottom: 2rpx solid #f5f5f5;
}
.info-row:last-child { border-bottom: none; }
.info-label {
font-size: 24rpx;
color: #8b8b8b;
}
.info-value {
font-size: 24rpx;
color: #242424;
font-weight: 500;
}
/* ---- 联系提示 ---- */
/* H5: flex items-center gap-2 text-gray-6 mb-8 */
.contact-hint {
display: flex;
align-items: center;
gap: 14rpx;
margin-bottom: 56rpx;
}
/* H5: text-xs = 24rpx */
.contact-text {
font-size: 22rpx;
color: #a6a6a6;
}
/* ---- 底部按钮区域 ---- */
/* H5: px-8 = 64rpx, pb-12 = 96rpx */
.bottom-area {
padding: 0 56rpx 84rpx;
position: relative;
z-index: 1;
}
/* 原生按钮替代 TDesign — H5: w-full py-3.5=56rpx bg-white border border-gray-200 rounded-xl */
.switch-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 14rpx;
width: 100%;
padding: 24rpx 0;
background: #ffffff;
border: 2rpx solid #eeeeee;
border-radius: 22rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
}
.switch-btn-text {
font-size: 24rpx;
font-weight: 500;
color: #5e5e5e;
}
/* ---- 动画 ---- */
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-18rpx); }
}
.float-animation {
animation: float 3s ease-in-out infinite;
}
@keyframes pulse-soft {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
.pulse-soft {
animation: pulse-soft 2s ease-in-out infinite;
}