文件
yjyf/yjyf-master-app/pages/master/apply.vue
MiAn 14533eadb7 feat: 用户端与师傅端双小程序架构解耦,新增师傅独立认证及超时自动关单机制
1. 账号体系与数据库解耦:
   - 师傅表 fa_master 解除对 fa_user.id 的外键依赖,升级为独立认证账号主表;
   - 新增师傅端独立支撑表:fa_master_security、fa_master_token、fa_master_wechat、fa_master_agreement_read;
   - 新增工单超时未接单自动关闭与原路退款配置(order_unaccepted_close_days)。

2. 服务端(Server):
   - 新增师傅端独立 API 控制器与认证库(MasterAuth, MasterBase, MasterMessage, MasterSecurity, MasterToken);
   - WxLogin 支持双小程序端(user/master)独立换取 session_key、openid 与 access_token;
   - 新增控制台调度命令 php think order:autoclose,支持订单超时自动关闭与售后退款闭环;
   - 修复 PHP 8.5 兼容性问题(Request.php 的 (bool) 强制转换);
   - 系统业务配置全面收敛至数据库 fa_config 及 site.php。

3. 小程序端:
   - yjyf-app(用户端):彻底剥离师傅端路由、组件及静态资源,增加隐私授权弹窗与评价模块;
   - yjyf-master-app(师傅端):全新独立微信小程序工程(wx140d90ceda786107),实现工作台、接单大厅、资质认证、工单协同与钱包提现完整闭环。
2026-11-23 15:10:30 +08:00

1128 行
34 KiB
Vue

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<template>
<view class="page">
<YjyfNavBar theme="white" :title="info && info.master && info.master.verify_status === 'pass' ? '师傅资料' : '师傅入驻'" :border="true" />
<view class="loading-box" v-if="loading">
<text class="loading-txt">正在加载认证信息...</text>
</view>
<template v-else>
<!-- 审核状态提示条 -->
<view class="status-banner" v-if="info && info.applied && info.master && info.master.verify_status !== 'pass'" :class="'st-' + info.master.verify_status">
<view class="sb-top">
<text class="sb-title">审核状态:{{ statusText }}</text>
</view>
<text class="sb-msg" v-if="info.master.audit_msg">审核说明:{{ info.master.audit_msg }}</text>
</view>
<!-- 入驻或驳回修改表单 -->
<template v-if="canEdit">
<!-- 未登录引导条 -->
<view class="login-tip-bar" v-if="!loggedIn">
<text class="login-tip-txt">请先登录账号,再上传证件并提交实名入驻</text>
<view class="login-tip-btn clickable-hover" @tap="toLogin">
<text class="login-tip-btn-txt">去登录</text>
</view>
</view>
<!-- 轻量三步导引条 -->
<view class="step-bar">
<view class="step-item" :class="{ done: step1Done, active: !step1Done }">
<view class="step-num"><text class="step-num-txt">1</text></view>
<text class="step-label">上传证件</text>
</view>
<view class="step-line" :class="{ done: step1Done }"></view>
<view class="step-item" :class="{ done: step2Done, active: step1Done && !step2Done }">
<view class="step-num"><text class="step-num-txt">2</text></view>
<text class="step-label">核对资料</text>
</view>
<view class="step-line" :class="{ done: step2Done }"></view>
<view class="step-item" :class="{ done: step3Done, active: step1Done && step2Done && !step3Done }">
<view class="step-num"><text class="step-num-txt">3</text></view>
<text class="step-label">服务类目</text>
</view>
</view>
<!-- 第一步:上传身份证件(支持 AI 智能识别) -->
<view class="card">
<view class="section-head">
<text class="section-title">1. 上传身份证件</text>
<text class="section-sub">自动识别姓名与证件号</text>
</view>
<view class="cert-grid">
<view class="cert-box clickable-hover" @tap="uploadCert('front')">
<view v-if="uploadingSide === 'front'" class="cert-ph">
<text class="cert-ph-t">上传识别中...</text>
</view>
<template v-else-if="form.idcard_front">
<image class="cert-img" :src="getWatermarkUrl(form.idcard_front)" mode="aspectFit" />
<view class="cert-reupload">
<text class="cert-reupload-txt">点击更换</text>
</view>
</template>
<view v-else class="cert-ph">
<image class="cert-cam" src="/static/icons/camera.svg" mode="aspectFit" />
<text class="cert-ph-t">身份证人像面</text>
<text class="cert-ph-s">点击拍摄 / 上传</text>
</view>
</view>
<view class="cert-box clickable-hover" @tap="uploadCert('back')">
<view v-if="uploadingSide === 'back'" class="cert-ph">
<text class="cert-ph-t">上传核验中...</text>
</view>
<template v-else-if="form.idcard_back">
<image class="cert-img" :src="getWatermarkUrl(form.idcard_back)" mode="aspectFit" />
<view class="cert-reupload">
<text class="cert-reupload-txt">点击更换</text>
</view>
</template>
<view v-else class="cert-ph">
<image class="cert-cam" src="/static/icons/camera.svg" mode="aspectFit" />
<text class="cert-ph-t">身份证国徽面</text>
<text class="cert-ph-s">点击拍摄 / 上传</text>
</view>
</view>
</view>
<view class="expired-tip" v-if="isExpired">
<text class="expired-tip-txt">检测到身份证已过期({{ validDate }}),请更换有效证件后提交</text>
</view>
</view>
<!-- 第二步:核对实名与接单资料 -->
<view class="card">
<view class="section-head">
<text class="section-title">2. 核对实名与接单资料</text>
</view>
<view class="fi">
<text class="fk">真实姓名</text>
<input class="fv" v-model="form.realname" placeholder="上传人像面后自动识别,可核对修改" />
</view>
<view class="fi">
<text class="fk">身份证号</text>
<input class="fv" v-model="form.idcard_no" maxlength="18" placeholder="上传人像面后自动识别,可核对修改" />
</view>
<view class="fi">
<text class="fk">联系电话</text>
<input class="fv" v-model="form.mobile" type="number" maxlength="11" placeholder="请输入 11 位接单手机号" />
</view>
<view class="fi no-border">
<text class="fk">服务地区</text>
<view class="picker-row region-picker clickable-hover" @tap="showRegionDrawer = true">
<text class="picker-val" :class="{ placeholder: !displayRegion }">{{ displayRegion || '点击选择服务地区' }}</text>
<image class="picker-arrow" src="/static/icons/arrow-right.svg" mode="aspectFit" />
</view>
</view>
</view>
<!-- 第三步:主营服务类目 + 提交 -->
<view class="card">
<view class="section-head">
<text class="section-title">3. 主营服务类目(可多选)</text>
<text class="section-sub" v-if="skills.length">已选 {{ skills.length }} 项</text>
</view>
<view class="cats" v-if="cats.length">
<view
v-for="c in cats"
:key="c.id"
class="cat clickable-hover"
:class="{ on: skills.indexOf(c.id) > -1 }"
@tap="toggleSkill(c.id)"
>
<text class="cat-txt">{{ c.name }}</text>
</view>
</view>
<view class="cats-empty" v-else>
<text class="cats-empty-txt">{{ catsError ? '服务类目加载失败' : '暂无可选服务类目' }}</text>
<view class="cats-retry clickable-hover" @tap="loadCats">
<text class="cats-retry-txt">重新加载</text>
</view>
</view>
<!-- 入驻协议勾选 -->
<view class="agree-row" @tap="agreed = !agreed">
<image
class="agree-ico"
:src="agreed ? '/static/icons/invoice-check-on.svg' : '/static/icons/invoice-check-off.svg'"
mode="aspectFit"
/>
<text class="agree-txt">我已阅读并同意</text>
<text class="agree-link" @tap.stop="openAgreement">《师傅入驻与履约服务协议》</text>
</view>
<view class="submit-btn clickable-hover" :class="{ disabled: submitting }" @tap="submit">
<text class="submit-txt">{{ submitting ? '正在进行实名核验...' : '提交实名认证' }}</text>
</view>
</view>
</template>
<!-- 已认证师傅:可编辑资料与实名档案分别展示 -->
<template v-else-if="info && info.master && info.master.verify_status === 'pass'">
<view class="card profile-card">
<view class="profile-heading">
<text class="profile-title">基本资料</text>
<text class="profile-subtitle">设置头像与接单联系电话</text>
</view>
<view class="profile-avatar-row clickable-hover" @tap="chooseProfileAvatar" role="button" aria-label="更换师傅头像">
<text class="profile-label">头像</text>
<view class="profile-avatar-action">
<image class="profile-avatar-image" :src="info.master.avatar || '/static/icons/avatar-master.svg'" mode="aspectFill" />
<text class="profile-action-text">{{ profileUploading ? '上传中...' : '更换' }}</text>
<image class="profile-arrow" src="/static/icons/arrow-right.svg" mode="aspectFit" />
</view>
</view>
<view class="profile-phone-row">
<text class="profile-label">接单电话</text>
<input class="profile-input" v-model="profileMobile" type="number" maxlength="11" placeholder="请输入接单手机号" />
</view>
</view>
<view class="card profile-card identity-card">
<view class="profile-heading">
<text class="profile-title">实名档案</text>
<text class="identity-status">已认证</text>
</view>
<view class="identity-row"><text class="identity-label">真实姓名</text><text class="identity-value">{{ info.master.realname }}</text></view>
<view class="identity-row"><text class="identity-label">身份证号</text><text class="identity-value">{{ info.master.idcard_no }}</text></view>
<view class="identity-row"><text class="identity-label">服务城市</text><text class="identity-value">{{ info.master.city || '-' }}</text></view>
<view class="identity-row"><text class="identity-label">综合评分</text><text class="identity-value">{{ info.master.score }} 分</text></view>
<view class="identity-row identity-row-last"><text class="identity-label">累计完单</text><text class="identity-value">{{ info.master.order_count }} 单</text></view>
</view>
<view class="profile-save clickable-hover" :class="{ disabled: profileSaving || profileUploading }" @tap="saveProfile">
<text>{{ profileSaving ? '保存中...' : '保存资料' }}</text>
</view>
</template>
<!-- 已提交待审档案 -->
<view class="card badge-card" v-else-if="info && info.master">
<view class="badge-top">
<view class="badge-avatar-wrap">
<image class="badge-avatar-img" :src="info.master.avatar || '/static/icons/avatar-master.svg'" mode="aspectFill" />
<view class="v-auth-badge">
<image class="v-badge-ico" src="/static/icons/v-auth.svg" mode="aspectFit" />
<text class="v-badge-txt">审核中</text>
</view>
</view>
</view>
<view class="badge-info-row">
<text class="badge-master-name">{{ masterTitleName }}</text>
<text class="badge-master-mobile">{{ info.master.mobile }}</text>
</view>
<view class="badge-divider"></view>
<view class="li"><text class="k">真实姓名</text><text class="v">{{ info.master.realname }}</text></view>
<view class="li"><text class="k">身份证号</text><text class="v">{{ info.master.idcard_no }}</text></view>
<view class="li"><text class="k">服务城市</text><text class="v">{{ info.master.city || '-' }}</text></view>
<view class="li"><text class="k">综合评分</text><text class="v">{{ info.master.score }} 分</text></view>
<view class="li no-border"><text class="k">累计完单</text><text class="v">{{ info.master.order_count }} 单</text></view>
<view class="go-btn clickable-hover" @tap="goWorkbench">
<text class="go-txt">进入师傅工作台</text>
<image class="go-arrow" src="/static/icons/arrow-right-white.svg" mode="aspectFit" />
</view>
</view>
</template>
<RegionPickerDrawer
v-model:visible="showRegionDrawer"
:province="form.province"
:city="form.city"
:district="form.district"
:allow-city-level="true"
@confirm="onDrawerRegionConfirm"
/>
<YjyfPrivacyPopup />
</view>
</template>
<script setup>
import { ref, reactive, computed } from 'vue';
import { masterProfilePayload } from '@/utils/profile-form.mjs';
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
import RegionPickerDrawer from '@/components/RegionPickerDrawer.vue';
import YjyfPrivacyPopup from '@/components/YjyfPrivacyPopup.vue';
import api from '@/utils/api.js';
import { isLogin, toLogin, getUser, setUser } from '@/utils/request.js';
import { useShare } from '@/utils/share.js';
const MASTER_AGREEMENT_EVENT = 'master_apply_agreement_confirm';
const profileMobile = ref('');
const profileAvatar = ref('');
const profileUploading = ref(false);
const profileSaving = ref(false);
const loading = ref(true);
const loggedIn = ref(isLogin());
const info = ref(null);
const cats = ref([]);
const catsError = ref(false);
const skills = ref([]);
const submitting = ref(false);
const agreed = ref(false);
const showRegionDrawer = ref(false);
const form = reactive({
realname: '',
mobile: '',
idcard_no: '',
province: '',
city: '',
district: '',
idcard_front: '',
idcard_back: ''
});
const displayRegion = computed(() => {
const parts = [];
[form.province, form.city, form.district].forEach(p => {
const s = (p || '').trim();
if (s && !parts.some(ep => ep.includes(s))) parts.push(s);
});
return parts.join(' ');
});
const step1Done = computed(() => !!(form.idcard_front && form.idcard_back && !isExpired.value));
const step2Done = computed(() => !!(form.realname.trim() && form.idcard_no.trim() && form.mobile.trim() && displayRegion.value));
const step3Done = computed(() => skills.value.length > 0 && agreed.value);
useShare(() => ({
title: '优匠优服师傅入驻 · 实名技能认证接同城工单',
path: '/pages/master/apply',
query: ''
}));
const statusText = computed(() => {
if (!info.value || !info.value.master) return '未入驻';
const m = info.value.master;
return { pending: '审核中,请耐心等待', pass: '实名认证已通过', reject: '审核未通过,请修改后重提' }[m.verify_status] || m.verify_status;
});
const masterTitleName = computed(() => {
if (!info.value || !info.value.master || !info.value.master.realname) return '优匠师傅';
const rn = info.value.master.realname.trim();
if (!rn) return '优匠师傅';
if (rn.includes('师傅')) return rn;
return rn.slice(0, 1) + '师傅';
});
const canEdit = computed(() => !info.value || !info.value.applied || info.value.master.verify_status === 'reject');
function parseCityFallback(cityStr) {
const parts = String(cityStr || '').trim().split(/\s+/).filter(Boolean);
if (parts.length === 1) {
form.city = parts[0];
} else if (parts.length === 2) {
form.province = parts[0];
form.city = parts[0];
form.district = parts[1];
} else if (parts.length >= 3) {
form.province = parts[0];
form.city = parts[1];
form.district = parts[2];
}
}
function onDrawerRegionConfirm(reg) {
if (!reg) return;
form.province = reg.province || '';
form.city = reg.city || '';
form.district = reg.district || '';
}
function toggleSkill(id) {
const i = skills.value.indexOf(id);
if (i > -1) skills.value.splice(i, 1);
else skills.value.push(id);
}
function chooseProfileAvatar() {
if (profileUploading.value || profileSaving.value) return;
uni.chooseImage({ count: 1, sizeType: ['compressed'], success: async (res) => {
profileUploading.value = true;
try {
const uploaded = await api.upload(res.tempFilePaths[0], 'avatar');
profileAvatar.value = uploaded.url;
info.value.master.avatar = uploaded.fullurl || res.tempFilePaths[0];
} catch (e) {} finally { profileUploading.value = false; }
} });
}
async function saveProfile() {
if (profileSaving.value || profileUploading.value) return;
let payload;
try { payload = masterProfilePayload(profileMobile.value, profileAvatar.value); }
catch (e) { uni.showToast({ title: e.message, icon: 'none' }); return; }
profileSaving.value = true;
try {
await api.masterSaveProfile(payload);
profileAvatar.value = '';
await load();
uni.showToast({ title: '保存成功' });
} catch (e) {} finally { profileSaving.value = false; }
}
function goWorkbench() {
uni.reLaunch({ url: '/pages/master/hall?tab=3' });
}
function openAgreement() {
uni.navigateTo({
url: `/pages/agreement/detail?type=master&title=${encodeURIComponent('师傅入驻与履约服务协议')}&confirmEvent=${encodeURIComponent(MASTER_AGREEMENT_EVENT)}`
});
}
function handleMasterAgreementConfirm() {
agreed.value = true;
}
const uploadingCert = ref(false);
const uploadingSide = ref('');
const isSelectingImage = ref(false);
const hasInitialLoaded = ref(false);
const isExpired = ref(false);
const validDate = ref('');
// 腾讯云数据万象动态防伪水印(仅用于前端预览)
function getWatermarkUrl(url) {
if (!url) return '';
if ((url.includes('myqcloud.com') || url.includes('cos.')) && !url.includes('watermark')) {
const b64Text = '5LuF55So5LqO6Lqr5Lu95L-h5oGv6K6k6K-B';
const b64Color = 'I0ZGRkZGRg';
const delim = url.includes('?') ? '&' : '?';
return `${url}${delim}watermark/2/text/${b64Text}/fill/${b64Color}/fontsize/40/dissolve/85/shadow/60/gravity/center/degree/340`;
}
return url;
}
function uploadCert(side) {
if (!isLogin()) { toLogin(); return; }
if (uploadingSide.value || submitting.value) return;
isSelectingImage.value = true;
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: async (res) => {
const temp = res.tempFilePaths[0];
uploadingSide.value = side;
uploadingCert.value = true;
uni.showLoading({ title: '证件上传中...', mask: true });
let toastPayload = null;
try {
const up = await api.upload(temp, 'cert');
const imgUrl = up.fullurl || up.url;
if (side === 'front') {
form.idcard_front = imgUrl;
uni.showLoading({ title: 'AI 识别信息中...', mask: true });
try {
const ocrRes = await api.masterOcrIdCard({ image: imgUrl, side: 'front' });
if (ocrRes && (ocrRes.name || ocrRes.idcard_no)) {
if (ocrRes.name) form.realname = ocrRes.name;
if (ocrRes.idcard_no) form.idcard_no = ocrRes.idcard_no;
toastPayload = {
title: `已识别:${ocrRes.name || '姓名与证件号已填入'}`,
icon: 'success',
duration: 2000
};
} else {
toastPayload = { title: '已上传,请核对姓名与证件号', icon: 'none' };
}
} catch (ocrErr) {
const msg = ocrErr?.message || ocrErr?.msg || '未能清晰识别,请手动核对';
toastPayload = { title: msg, icon: 'none', duration: 2500 };
}
} else {
form.idcard_back = imgUrl;
try {
const ocrBack = await api.masterOcrIdCard({ image: imgUrl, side: 'back' });
if (ocrBack && ocrBack.valid_date) {
validDate.value = ocrBack.valid_date;
if (ocrBack.is_expired) {
isExpired.value = true;
uni.hideLoading();
uni.showModal({
title: '身份证已过期提醒',
content: `检测到该身份证有效期截止至【${ocrBack.valid_date}】,已过有效期限,无法通过实名认证,请上传最新有效证件。`,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#E8331B'
});
} else {
isExpired.value = false;
toastPayload = { title: '国徽面校验通过(' + (ocrBack.expire_info?.text || ocrBack.valid_date) + ')', icon: 'success' };
}
} else {
toastPayload = { title: '国徽面已上传', icon: 'none' };
}
} catch (e) {
toastPayload = { title: '国徽面已上传', icon: 'none' };
}
}
} catch (e) {
toastPayload = { title: '上传失败,请重新选择', icon: 'none' };
} finally {
uploadingSide.value = '';
uploadingCert.value = false;
isSelectingImage.value = false;
uni.hideLoading();
if (toastPayload) {
uni.showToast(toastPayload);
}
}
},
fail: () => {
isSelectingImage.value = false;
}
});
}
async function load() {
loggedIn.value = isLogin();
if (!loggedIn.value) {
loading.value = false;
return;
}
try {
const res = await api.masterInfo();
info.value = res.applied ? res : null;
if (res.applied && res.master) {
profileMobile.value = res.master.mobile || '';
if (!form.realname && res.master.realname) form.realname = res.master.realname;
if (!form.mobile && res.master.mobile) form.mobile = res.master.mobile;
if (!form.province && !form.city && !form.district) {
if (res.master.province || res.master.district) {
form.province = res.master.province || '';
form.city = res.master.city || '';
form.district = res.master.district || '';
} else if (res.master.city) {
parseCityFallback(res.master.city);
}
}
if (!form.idcard_no && res.master.idcard_no) form.idcard_no = res.master.idcard_no;
if (!form.idcard_front && (res.master.idcard_front_raw || res.master.idcard_front)) {
form.idcard_front = res.master.idcard_front_raw || res.master.idcard_front;
}
if (!form.idcard_back && (res.master.idcard_back_raw || res.master.idcard_back)) {
form.idcard_back = res.master.idcard_back_raw || res.master.idcard_back;
}
if (!skills.value.length && res.skills) {
skills.value = res.skills.map(s => s.cat_id).filter(Boolean);
}
} else {
const u = getUser();
if (u && !form.mobile) form.mobile = u.mobile || '';
}
hasInitialLoaded.value = true;
} catch (e) {
} finally {
loading.value = false;
}
}
async function loadCats() {
catsError.value = false;
try {
const res = await api.cats();
cats.value = res.list || [];
} catch (e) {
catsError.value = true;
}
}
async function submit() {
if (!isLogin()) { toLogin(); return; }
if (submitting.value || uploadingCert.value) {
if (uploadingCert.value) uni.showToast({ title: '证件图片上传中,请稍候', icon: 'none' });
return;
}
if (!form.idcard_front || !form.idcard_back) {
uni.showToast({ title: '请先上传身份证人像面和国徽面照片', icon: 'none' });
return;
}
if (isExpired.value) {
uni.showToast({ title: '身份证已过有效期限,无法提交认证', icon: 'none', duration: 2500 });
return;
}
const realname = form.realname.trim();
const mobile = form.mobile.trim();
const idcardNo = form.idcard_no.trim().toUpperCase();
if (!realname || !mobile || !idcardNo) {
uni.showToast({ title: '请完整核对姓名、身份证号与手机号', icon: 'none' });
return;
}
if (!idcardNo.includes('*') && !/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dX]$/.test(idcardNo)) {
uni.showToast({ title: '请输入有效的 18 位身份证号码', icon: 'none' });
return;
}
if (!/^1\d{10}$/.test(mobile)) {
uni.showToast({ title: '请输入正确的 11 位手机号', icon: 'none' });
return;
}
if (!displayRegion.value) {
uni.showToast({ title: '请选择常驻服务省市区', icon: 'none' });
return;
}
if (!skills.value.length) {
uni.showToast({ title: '请至少选择一项主营服务类目', icon: 'none' });
return;
}
if (!agreed.value) {
uni.showToast({ title: '请先阅读并勾选入驻服务协议', icon: 'none' });
return;
}
submitting.value = true;
try {
const payload = {
realname,
mobile,
idcard_no: idcardNo,
province: form.province.trim(),
city: (form.city || displayRegion.value).trim(),
district: form.district.trim(),
idcard_front: form.idcard_front,
idcard_back: form.idcard_back,
valid_date: validDate.value || ''
};
skills.value.forEach((id, i) => { payload['skills[' + i + ']'] = id; });
await api.masterApply(payload);
const u = await api.profile();
setUser(u);
uni.showToast({ title: '提交成功,等待审核', icon: 'success' });
setTimeout(() => {
uni.reLaunch({ url: '/pages/master/hall?tab=3' });
}, 1200);
} catch (e) {
// request.js 已统一弹出具体失败原因 Toast,此处保留 submits 防重恢复即可
} finally {
submitting.value = false;
}
}
onLoad(() => {
uni.$on(MASTER_AGREEMENT_EVENT, handleMasterAgreementConfirm);
});
onUnload(() => {
uni.$off(MASTER_AGREEMENT_EVENT, handleMasterAgreementConfirm);
});
onShow(async () => {
if (isSelectingImage.value) {
return;
}
loggedIn.value = isLogin();
if (!hasInitialLoaded.value) {
await load();
}
if (!cats.value.length) {
await loadCats();
}
});
</script>
<style lang="scss" scoped>
@import '@/uni.scss';
.profile-card { padding: 0 32rpx; }
.profile-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16rpx; padding: 30rpx 0 20rpx; }
.profile-title { font-size: $yjyf-font-title; color: $yjyf-text-main; font-weight: 700; flex-shrink: 0; }
.profile-subtitle { font-size: $yjyf-font-sub; color: $yjyf-text-secondary; text-align: right; }
.profile-avatar-row, .profile-phone-row { min-height: 108rpx; display: flex; align-items: center; justify-content: space-between; border-top: 1rpx solid $yjyf-border-color; }
.profile-avatar-row { min-height: 136rpx; }
.profile-label { font-size: $yjyf-font-body; color: $yjyf-text-regular; flex-shrink: 0; }
.profile-avatar-action { display: flex; align-items: center; gap: 16rpx; }
.profile-avatar-image { width: 88rpx; height: 88rpx; border-radius: 50%; background: $yjyf-primary-bg; }
.profile-action-text { font-size: $yjyf-font-body; color: $yjyf-text-secondary; }
.profile-arrow { width: 24rpx; height: 24rpx; }
.profile-input { text-align: right; flex: 1; min-width: 0; height: 100rpx; font-size: $yjyf-font-body; color: $yjyf-text-main; }
.identity-status { font-size: $yjyf-font-sub; color: $yjyf-success; }
.identity-row { display: flex; justify-content: space-between; align-items: center; gap: 20rpx; min-height: 84rpx; border-top: 1rpx solid $yjyf-border-color; }
.identity-label { font-size: $yjyf-font-body; color: $yjyf-text-secondary; flex-shrink: 0; }
.identity-value { font-size: $yjyf-font-body; color: $yjyf-text-main; text-align: right; word-break: break-all; }
.profile-save { height: 88rpx; margin: 40rpx $yjyf-space-md 0; border-radius: $yjyf-radius-pill; background: $yjyf-gradient-primary; color: $yjyf-text-inverse; display: flex; align-items: center; justify-content: center; font-size: $yjyf-font-body; font-weight: 700; }
.profile-save.disabled { opacity: 0.6; }
.page {
min-height: 100vh;
background: $yjyf-bg-page;
padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
}
.loading-box {
padding: 120rpx 0;
text-align: center;
}
.loading-txt {
font-size: $yjyf-font-sub;
color: $yjyf-text-secondary;
}
.status-banner {
margin: 20rpx $yjyf-space-md 0;
padding: 22rpx 24rpx;
background: $yjyf-primary-bg;
border-radius: $yjyf-radius-md;
display: flex;
flex-direction: column;
}
.status-banner.st-pass {
background: rgba(47, 168, 79, 0.1);
}
.status-banner.st-reject {
background: rgba(232, 51, 27, 0.08);
}
.sb-title {
font-size: $yjyf-font-body;
color: $yjyf-primary;
font-weight: 700;
}
.status-banner.st-pass .sb-title {
color: $yjyf-success;
}
.status-banner.st-reject .sb-title {
color: $yjyf-danger;
}
.sb-msg {
margin-top: 8rpx;
font-size: $yjyf-font-sub;
color: $yjyf-text-regular;
}
/* 未登录提示条 */
.login-tip-bar {
margin: 20rpx $yjyf-space-md 0;
padding: 18rpx 24rpx;
background: $yjyf-primary-bg;
border: 1rpx solid $yjyf-primary-border;
border-radius: $yjyf-radius-md;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
}
.login-tip-txt {
flex: 1;
font-size: $yjyf-font-sub;
color: $yjyf-text-regular;
}
.login-tip-btn {
flex-shrink: 0;
height: 52rpx;
padding: 0 24rpx;
border-radius: $yjyf-radius-pill;
background: $yjyf-gradient-primary;
display: flex;
align-items: center;
justify-content: center;
}
.login-tip-btn-txt {
font-size: $yjyf-font-sub;
color: $yjyf-text-inverse;
font-weight: 600;
}
/* 轻量三步导引条 */
.step-bar {
margin: 20rpx $yjyf-space-md 0;
padding: 20rpx 24rpx;
background: $yjyf-bg-card;
border-radius: $yjyf-radius-md;
box-shadow: $yjyf-shadow-card;
display: flex;
align-items: center;
justify-content: space-between;
}
.step-item {
display: flex;
align-items: center;
gap: 10rpx;
flex-shrink: 0;
}
.step-num {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background: $yjyf-bg-page;
display: flex;
align-items: center;
justify-content: center;
}
.step-num-txt {
font-size: $yjyf-font-micro;
color: $yjyf-text-secondary;
font-weight: 700;
}
.step-label {
font-size: $yjyf-font-sub;
color: $yjyf-text-secondary;
}
.step-item.active .step-num {
background: $yjyf-primary;
}
.step-item.active .step-num-txt {
color: $yjyf-text-inverse;
}
.step-item.active .step-label {
color: $yjyf-text-main;
font-weight: 600;
}
.step-item.done .step-num {
background: $yjyf-success;
}
.step-item.done .step-num-txt {
color: $yjyf-text-inverse;
}
.step-item.done .step-label {
color: $yjyf-success;
font-weight: 600;
}
.step-line {
flex: 1;
height: 2rpx;
background: $yjyf-border-color;
margin: 0 12rpx;
}
.step-line.done {
background: $yjyf-success;
}
.card {
margin: 20rpx $yjyf-space-md 0;
padding: $yjyf-space-md;
background: $yjyf-bg-card;
border-radius: $yjyf-radius-md;
box-shadow: $yjyf-shadow-card;
}
.section-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
.section-title {
font-size: $yjyf-font-body;
font-weight: 700;
color: $yjyf-text-main;
}
.section-sub {
font-size: $yjyf-font-micro;
color: $yjyf-text-secondary;
}
.fi {
display: flex;
align-items: center;
min-height: 92rpx;
border-bottom: 1rpx solid $yjyf-border-color;
}
.fi.no-border {
border-bottom: none;
}
.fk {
width: 168rpx;
font-size: $yjyf-font-body;
color: $yjyf-text-regular;
flex-shrink: 0;
}
.fv {
flex: 1;
height: 88rpx;
font-size: $yjyf-font-body;
color: $yjyf-text-main;
}
.region-picker {
flex: 1;
}
.picker-row {
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.picker-val {
font-size: $yjyf-font-body;
color: $yjyf-text-main;
}
.picker-val.placeholder {
color: $yjyf-text-disabled;
}
.picker-arrow {
width: 24rpx;
height: 24rpx;
}
.cats {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
padding-top: 4rpx;
}
.cat {
height: 64rpx;
padding: 0 28rpx;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: $yjyf-radius-pill;
background: $yjyf-bg-page;
border: 2rpx solid transparent;
}
.cat.on {
background: $yjyf-primary-bg;
border-color: $yjyf-primary;
}
.cat-txt {
font-size: $yjyf-font-sub;
color: $yjyf-text-regular;
}
.cat.on .cat-txt {
color: $yjyf-primary;
font-weight: 600;
}
.cats-empty {
padding: 28rpx 0;
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
}
.cats-empty-txt {
font-size: $yjyf-font-sub;
color: $yjyf-text-secondary;
}
.cats-retry {
padding: 8rpx 20rpx;
border-radius: $yjyf-radius-pill;
background: $yjyf-primary-bg;
}
.cats-retry-txt {
font-size: $yjyf-font-sub;
color: $yjyf-primary;
font-weight: 600;
}
.cert-grid {
display: flex;
gap: 20rpx;
}
.cert-box {
position: relative;
flex: 1;
height: 196rpx;
border: 2rpx dashed $yjyf-text-disabled;
border-radius: $yjyf-radius-sm;
display: flex;
align-items: center;
justify-content: center;
background: $yjyf-bg-page;
overflow: hidden;
}
.cert-img {
width: 100%;
height: 100%;
}
.cert-reupload {
position: absolute;
right: 8rpx;
bottom: 8rpx;
padding: 4rpx 14rpx;
border-radius: $yjyf-radius-pill;
background: rgba(31, 31, 31, 0.65);
}
.cert-reupload-txt {
font-size: $yjyf-font-micro;
color: $yjyf-text-inverse;
}
.cert-ph {
display: flex;
flex-direction: column;
align-items: center;
}
.cert-cam {
width: 40rpx;
height: 40rpx;
margin-bottom: 8rpx;
}
.cert-ph-t {
font-size: $yjyf-font-sub;
font-weight: 600;
color: $yjyf-text-regular;
}
.cert-ph-s {
font-size: $yjyf-font-micro;
color: $yjyf-text-muted;
margin-top: 4rpx;
}
.expired-tip {
margin-top: 16rpx;
padding: 14rpx 18rpx;
border-radius: $yjyf-radius-sm;
background: rgba(232, 51, 27, 0.08);
}
.expired-tip-txt {
font-size: $yjyf-font-sub;
color: $yjyf-danger;
}
.agree-row {
margin-top: 20rpx;
padding: 16rpx 0;
display: flex;
align-items: center;
}
.agree-ico {
width: 34rpx;
height: 34rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
.agree-txt {
font-size: $yjyf-font-sub;
color: $yjyf-text-secondary;
}
.agree-link {
font-size: $yjyf-font-sub;
color: $yjyf-info;
font-weight: 500;
}
.submit-btn {
height: 88rpx;
margin-top: 16rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: $yjyf-radius-pill;
background: $yjyf-gradient-primary;
box-shadow: $yjyf-shadow-button;
}
.submit-txt {
color: $yjyf-text-inverse;
font-size: $yjyf-font-body;
font-weight: 700;
}
.submit-btn.disabled {
opacity: 0.6;
}
.li {
display: flex;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1rpx solid $yjyf-border-color;
}
.li.no-border {
border-bottom: none;
}
.k {
font-size: $yjyf-font-body;
color: $yjyf-text-secondary;
}
.v {
font-size: $yjyf-font-body;
color: $yjyf-text-main;
font-weight: 500;
}
.go-btn {
margin-top: 28rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: $yjyf-radius-pill;
background: $yjyf-gradient-primary;
box-shadow: $yjyf-shadow-button;
}
.go-txt {
color: $yjyf-text-inverse;
font-size: $yjyf-font-body;
font-weight: 700;
}
.go-arrow {
width: 24rpx;
height: 24rpx;
margin-left: 8rpx;
}
/* 电子工牌大卡 */
.badge-card {
padding: 36rpx 32rpx;
}
.badge-top {
display: flex;
justify-content: center;
margin-bottom: 24rpx;
}
.badge-avatar-wrap {
width: 140rpx;
height: 140rpx;
border-radius: 70rpx;
border: 4rpx solid $yjyf-primary-light;
background: $yjyf-primary-bg;
display: flex;
align-items: center;
justify-content: center;
position: relative;
box-shadow: $yjyf-shadow-card;
}
.badge-avatar-img {
width: 128rpx;
height: 128rpx;
border-radius: 64rpx;
}
.v-auth-badge {
position: absolute;
bottom: -12rpx;
left: 50%;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
width: max-content;
height: 36rpx;
padding: 0 14rpx 0 8rpx;
background: $yjyf-primary-bg;
border: 1rpx solid $yjyf-primary-light;
border-radius: $yjyf-radius-pill;
box-shadow: $yjyf-shadow-card;
white-space: nowrap;
}
.v-badge-ico {
width: 24rpx;
height: 24rpx;
margin-right: 4rpx;
flex-shrink: 0;
}
.v-badge-txt {
font-size: $yjyf-font-micro;
font-weight: 700;
color: $yjyf-primary;
line-height: 1;
white-space: nowrap;
flex-shrink: 0;
}
.badge-info-row {
display: flex;
flex-direction: column;
align-items: center;
padding: 12rpx 10rpx 24rpx;
}
.badge-master-name {
font-size: $yjyf-font-lg;
font-weight: 700;
color: $yjyf-text-main;
line-height: 1.3;
margin-bottom: 8rpx;
}
.badge-master-mobile {
font-size: $yjyf-font-body;
color: $yjyf-text-regular;
font-family: monospace;
}
.badge-divider {
height: 1rpx;
background: $yjyf-border-color;
margin-bottom: 20rpx;
}
</style>