feat(apply): 入驻只收基本信息并新增启动页、材料后补与改服务城市
入驻表单移除身份证与证件材料(服务城市单选下拉,默认北京),只填姓名/手机/性别/城市/简介即可提交;新增 pages/launch 启动页先解析身份再跳转,无身份直接进申请页不再闪现首页;新增 pages/materials 证件材料补传页;个人资料页支持在职陪诊师修改服务城市;appId 更名为 wxapp_companion。
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// pages/launch/index.js
|
||||
// 启动页:冷启动先解析身份再决定去首页还是入驻申请页,
|
||||
// 避免默认首页先渲染一帧再被全局守卫重定向。
|
||||
const role = require('../../utils/role.js')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
error: ''
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.enter()
|
||||
},
|
||||
|
||||
enter() {
|
||||
this.setData({ error: '' })
|
||||
role
|
||||
.ensureRoleSafe(true)
|
||||
.then((detail) => {
|
||||
if (!detail.ok) {
|
||||
this.setData({ error: '网络异常,请重试' })
|
||||
return
|
||||
}
|
||||
if (detail.role === 'none') {
|
||||
wx.reLaunch({ url: '/pages/apply/index' })
|
||||
return
|
||||
}
|
||||
wx.switchTab({ url: '/pages/home/index' })
|
||||
})
|
||||
.catch(() => this.setData({ error: '网络异常,请重试' }))
|
||||
},
|
||||
|
||||
onRetry() {
|
||||
this.enter()
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user