feat(expert): create dedicated expert apply page and navigate from user center
这个提交包含在:
@@ -261,74 +261,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 大神实名认证与资质入驻申请弹窗 (任务四:真实资料与后台审核) -->
|
||||
<view class="profile-edit-modal-mask" v-if="showExpertCertModal" @click="showExpertCertModal = false">
|
||||
<view class="profile-edit-modal expert-cert-modal" @click.stop>
|
||||
<view class="modal-header">
|
||||
<text class="modal-title">陪伴师 / 大神入驻实名申请</text>
|
||||
<view class="btn-close btn-active" @click="showExpertCertModal = false">
|
||||
<image class="close-svg" :src="ICONS.close" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="modal-body">
|
||||
<view class="cert-alert">
|
||||
<text class="cert-alert-text">提交真实有效资料,平台将在 24 小时内由运营团队人工核验后开通接单工作台。</text>
|
||||
</view>
|
||||
|
||||
<view class="edit-field">
|
||||
<text class="field-label">真实姓名</text>
|
||||
<input class="field-input" v-model="expertCertForm.realName" placeholder="如:张三 (须与身份证一致)" placeholder-class="field-placeholder" />
|
||||
</view>
|
||||
|
||||
<view class="edit-field">
|
||||
<text class="field-label">身份证号码</text>
|
||||
<input class="field-input" v-model="expertCertForm.idCard" maxlength="18" placeholder="18位二代身份证号" placeholder-class="field-placeholder" />
|
||||
</view>
|
||||
|
||||
<view class="edit-field">
|
||||
<text class="field-label">主营陪伴品类</text>
|
||||
<view class="track-chips">
|
||||
<view
|
||||
v-for="trk in ['同城陪吃', 'KTV陪唱', '同城陪喝', '线上电竞', '同城桌游']"
|
||||
:key="trk"
|
||||
class="track-chip btn-active"
|
||||
:class="{ active: expertCertForm.track === trk }"
|
||||
@click="expertCertForm.track = trk"
|
||||
>
|
||||
{{ trk }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="edit-field">
|
||||
<text class="field-label">期望服务单价 (元/小时,平台限价: ¥{{ expertPriceMin }} - ¥{{ expertPriceMax }})</text>
|
||||
<input class="field-input price-num-input" type="number" v-model="expertCertForm.hourlyRate" :placeholder="`推荐单价 ¥${expertDefaultRate}`" placeholder-class="field-placeholder" />
|
||||
</view>
|
||||
|
||||
<view class="edit-field" v-if="expertCandidateTags.length > 0">
|
||||
<text class="field-label">技能专长标签 (最多选6项)</text>
|
||||
<view class="tags-chips">
|
||||
<view
|
||||
v-for="tg in expertCandidateTags"
|
||||
:key="tg"
|
||||
class="tag-pill btn-active"
|
||||
:class="{ active: expertCertForm.tags.includes(tg) }"
|
||||
@click="toggleCertTag(tg)"
|
||||
>
|
||||
{{ tg }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="modal-footer">
|
||||
<button class="btn-modal btn-cancel btn-active" @click="showExpertCertModal = false">取消</button>
|
||||
<button class="btn-modal btn-save btn-active" @click="submitExpertCertForm">提交审核</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部自定义导航栏 (动态自适应发单人4项 / 接单人3项) -->
|
||||
<AppTabBar current="user" />
|
||||
|
||||
@@ -346,7 +278,7 @@ import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey, setTheme, THEME_KEYS, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
import { getCurrentRole, setCurrentRole, ROLE_TYPES, toggleRole as toggleUserRole, isExpertCertified, getExpertCertStatus, setExpertCertStatus, CERT_STATUS } from '@/common/role.js';
|
||||
import { getNavBarInfo } from '@/common/nav.js';
|
||||
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs } from '@/common/api.js';
|
||||
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs, applyExpertCert } from '@/common/api.js';
|
||||
|
||||
const DEFAULT_GUEST_AVATAR = 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=200';
|
||||
const isLoggedIn = ref(true);
|
||||
@@ -895,115 +827,14 @@ const showInvitePoster = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 大神实名入驻认证已全面升级重构为独立专享页面 /pages/expert/apply
|
||||
const showExpertCertModal = ref(false);
|
||||
const expertCertForm = ref({
|
||||
realName: '',
|
||||
idCard: '',
|
||||
track: '同城陪吃',
|
||||
hourlyRate: 88,
|
||||
tags: []
|
||||
});
|
||||
|
||||
const expertPriceMin = computed(() => {
|
||||
return platformConfigs.value.expert_rules?.minHourlyRate || 30;
|
||||
});
|
||||
const expertPriceMax = computed(() => {
|
||||
return platformConfigs.value.expert_rules?.maxHourlyRate || 500;
|
||||
});
|
||||
const expertDefaultRate = computed(() => {
|
||||
return platformConfigs.value.expert_rules?.defaultHourlyRate || 88;
|
||||
});
|
||||
const expertCandidateTags = computed(() => {
|
||||
return platformConfigs.value.expert_rules?.candidateTags || [
|
||||
'国服王者', '声优达人', '幽默风趣', '随叫随到', '暖心倾听',
|
||||
'百星野王', '金牌探店', '量贩麦霸', '微醺搭子'
|
||||
];
|
||||
});
|
||||
|
||||
const toggleCertTag = (tag) => {
|
||||
const idx = expertCertForm.value.tags.indexOf(tag);
|
||||
if (idx > -1) {
|
||||
expertCertForm.value.tags.splice(idx, 1);
|
||||
} else {
|
||||
if (expertCertForm.value.tags.length >= 6) {
|
||||
uni.showToast({ title: '最多选择6个技能标签', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
expertCertForm.value.tags.push(tag);
|
||||
}
|
||||
};
|
||||
|
||||
const submitExpertCertForm = async () => {
|
||||
if (!expertCertForm.value.realName || !expertCertForm.value.realName.trim()) {
|
||||
uni.showToast({ title: '请输入真实姓名', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!expertCertForm.value.idCard || expertCertForm.value.idCard.length < 15) {
|
||||
uni.showToast({ title: '请输入有效身份证号', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const rate = Number(expertCertForm.value.hourlyRate) || expertDefaultRate.value;
|
||||
if (rate < expertPriceMin.value || rate > expertPriceMax.value) {
|
||||
uni.showToast({ title: `单价需在 ¥${expertPriceMin.value} - ¥${expertPriceMax.value} 之间`, icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showLoading({ title: '正在提交认证...' });
|
||||
try {
|
||||
await applyExpertCert({
|
||||
userId: user.value.id || 1001,
|
||||
name: expertCertForm.value.realName.trim(),
|
||||
idCard: expertCertForm.value.idCard.trim(),
|
||||
track: expertCertForm.value.track,
|
||||
hourlyRate: rate,
|
||||
tags: expertCertForm.value.tags,
|
||||
avatar: user.value.avatar,
|
||||
gender: user.value.gender === 'male' ? '男' : '女'
|
||||
});
|
||||
setExpertCertStatus(CERT_STATUS.PENDING);
|
||||
showExpertCertModal.value = false;
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '申请已提交',
|
||||
content: '您的入驻申请已成功提交至平台审核中心,运营团队核准后即可自动开通接单工作台。',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
});
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: e.message || '提交申请失败', icon: 'none' });
|
||||
}
|
||||
};
|
||||
|
||||
const applyExpert = () => {
|
||||
if (!ensureLoggedIn()) return;
|
||||
const certStatus = getExpertCertStatus();
|
||||
if (certStatus === CERT_STATUS.APPROVED) {
|
||||
uni.showToast({
|
||||
title: '您已通过大神实名认证,接单权限正常',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (certStatus === CERT_STATUS.PENDING) {
|
||||
uni.showModal({
|
||||
title: '认证审核中',
|
||||
content: '您的入驻申请正在平台运营端审核中,请耐心等待核准。',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
expertCertForm.value = {
|
||||
realName: '',
|
||||
idCard: '',
|
||||
track: '同城陪吃',
|
||||
hourlyRate: expertDefaultRate.value,
|
||||
tags: []
|
||||
};
|
||||
showExpertCertModal.value = true;
|
||||
uni.navigateTo({
|
||||
url: '/pages/expert/apply'
|
||||
});
|
||||
};
|
||||
|
||||
const contactService = () => {
|
||||
@@ -1854,73 +1685,6 @@ const navTo = (url) => {
|
||||
}
|
||||
}
|
||||
|
||||
.expert-cert-modal {
|
||||
max-height: 85vh;
|
||||
overflow-y: auto;
|
||||
|
||||
.cert-alert {
|
||||
background: rgba(99, 102, 241, 0.08);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.cert-alert-text {
|
||||
font-size: 24rpx;
|
||||
color: #6366F1;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
.track-chips, .tags-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 14rpx;
|
||||
margin-top: 10rpx;
|
||||
|
||||
.track-chip, .tag-pill {
|
||||
font-size: 24rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
background: var(--bg-card, #1E293B);
|
||||
color: #94A3B8;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.active {
|
||||
background: #6366F1;
|
||||
color: #FFFFFF;
|
||||
border-color: #6366F1;
|
||||
box-shadow: 0 4rpx 12rpx rgba(99, 102, 241, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-warm .expert-cert-modal {
|
||||
.cert-alert {
|
||||
background: #FFF7ED;
|
||||
border-color: #FDBA74;
|
||||
|
||||
.cert-alert-text {
|
||||
color: #EA580C;
|
||||
}
|
||||
}
|
||||
|
||||
.track-chips .track-chip, .tags-chips .tag-pill {
|
||||
background: #FDFBF7;
|
||||
color: #78716C;
|
||||
border-color: #E7E2D8;
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #EA580C, #F97316);
|
||||
color: #FFFFFF;
|
||||
border-color: #EA580C;
|
||||
box-shadow: 0 4rpx 14rpx rgba(234, 88, 12, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.guest-badge {
|
||||
font-size: 20rpx;
|
||||
color: #94A3B8;
|
||||
|
||||
在新工单中引用
屏蔽一个用户