feat(apply): 入驻只收基本信息并新增启动页、材料后补与改服务城市

入驻表单移除身份证与证件材料(服务城市单选下拉,默认北京),只填姓名/手机/性别/城市/简介即可提交;新增 pages/launch 启动页先解析身份再跳转,无身份直接进申请页不再闪现首页;新增 pages/materials 证件材料补传页;个人资料页支持在职陪诊师修改服务城市;appId 更名为 wxapp_companion。
This commit is contained in:
lik
2026-11-10 16:34:00 +08:00
parent 5848d181a6
commit ff1b1664fa
20 changed files with 738 additions and 176 deletions
+4
View File
@@ -44,6 +44,8 @@ const API = {
getMe: () => request.get('/health/employee/me'),
// 首页接单开关:仅在职正式陪诊师可切换
setOnline: (isOnline) => request.patch('/health/employee/me/online', { isOnline }),
// 陪诊师本人修改服务城市(订单池按该城市过滤)
setServiceArea: (serviceArea) => request.patch('/health/employee/me/service-area', { serviceArea }),
// 共享订单时的陪诊师候选(在职陪诊师,含实习)
getShareableAttendants: () => request.get('/health/employee/shareable-attendants'),
},
@@ -52,6 +54,8 @@ const API = {
attendantApplication: {
create: (data) => request.post('/health/attendant-application', data),
getMine: () => request.get('/health/attendant-application/mine'),
// 证件材料后补:只覆盖本次提交的字段
updateMaterials: (data) => request.post('/health/attendant-application/mine/materials', data),
list: (params) => request.get('/health/attendant-application', params),
getMaterials: (id) => request.get(`/health/attendant-application/${id}/materials`),
review: (id, data) => request.post(`/health/attendant-application/${id}/review`, data),
+28
View File
@@ -0,0 +1,28 @@
// utils/city.js
// 服务城市白名单:与 api/health/resource/services.js 的 SERVICE_AREAS 保持一致。
// value 带「市」,用于入库与订单 hospital.province 匹配;label 仅用于展示。
const CITY_OPTIONS = [
{ value: '北京市', label: '北京' },
{ value: '上海市', label: '上海' },
{ value: '天津市', label: '天津' },
{ value: '西安市', label: '西安' }
]
const CITY_LABELS = CITY_OPTIONS.map((item) => item.label)
function cityIndex(value) {
const index = CITY_OPTIONS.findIndex((item) => item.value === value)
return index > -1 ? index : 0
}
function cityLabel(value) {
const item = CITY_OPTIONS.find((option) => option.value === value)
return item ? item.label : (value || '')
}
module.exports = {
CITY_OPTIONS,
CITY_LABELS,
cityIndex,
cityLabel
}
+1 -1
View File
@@ -26,7 +26,7 @@ class Request {
}
return new Promise((resolve, reject) => {
data.appId = 'wxapp-escort-admin'
data.appId = 'wxapp_companion'
wx.request({
url: url.startsWith('http') ? url : `${this.baseURL}${url}`,
+2 -2
View File
@@ -1,14 +1,14 @@
// utils/role.js
// 管理端角色:admin(管理员)/ attendant(在职陪诊员)/ none(无可用身份)
//
// - 管理员身份按登录响应的 apps 判定,只认本小程序(wxapp-escort-admin)。
// - 管理员身份按登录响应的 apps 判定,只认本小程序(wxapp_companion)。
// web-escort-admin 是 Web 后台的授权,不带到小程序:否则 Web 管理员登录小程序
// 会绕过陪诊师入驻流程直接进 tab 页。
// - 陪诊员身份以员工档案为准(GET /health/employee/me),不能用 app role 判断,
// 普通账号首次登录管理端时 user 服务会写入 role: ["user"]
const API = require('./api.js')
const ADMIN_APP_IDS = ['wxapp-escort-admin']
const ADMIN_APP_IDS = ['wxapp_companion']
let cachedRole = null
// 缓存是否来自一次成功的解析:ensureRole 在接口异常时会把 none 写进缓存,