|
|
@@ -444,6 +444,9 @@ module.exports = class extends Base { |
|
|
const { gender, province_code, city_code, district_code, address, hospital, hospital_province_code, hospital_city_code, hospital_district_code, emergency_contact, emergency_phone, documents, tag, sign_income, sign_privacy, sign_privacy_jhr, sign_promise, income_amount, guardian_name, guardian_id_card, guardian_relation, mp_env_version } = this.post(); |
|
|
const { gender, province_code, city_code, district_code, address, hospital, hospital_province_code, hospital_city_code, hospital_district_code, emergency_contact, emergency_phone, documents, tag, sign_income, sign_privacy, sign_privacy_jhr, sign_promise, income_amount, guardian_name, guardian_id_card, guardian_relation, mp_env_version } = this.post(); |
|
|
const user = await this.model('wechat_user').where({ id: mpUser.id, status: 1 }).find(); |
|
|
const user = await this.model('wechat_user').where({ id: mpUser.id, status: 1 }).find(); |
|
|
if (think.isEmpty(user) || !user.patient_id) return this.json({ code: 1, msg: '请先完成实名认证' }); |
|
|
if (think.isEmpty(user) || !user.patient_id) return this.json({ code: 1, msg: '请先完成实名认证' }); |
|
|
|
|
|
const patient = await this.model('patient').field('id, status').where({ id: user.patient_id, is_deleted: 0 }).find(); |
|
|
|
|
|
if (think.isEmpty(patient)) return this.json({ code: 1, msg: '患者信息不存在' }); |
|
|
|
|
|
if (Number(patient.status) === 1) return this.json({ code: 1, msg: '资料已审核通过,不支持重新提交' }); |
|
|
if (!province_code || !city_code || !district_code) return this.json({ code: 1, msg: '请选择省市区' }); |
|
|
if (!province_code || !city_code || !district_code) return this.json({ code: 1, msg: '请选择省市区' }); |
|
|
if (!address) return this.json({ code: 1, msg: '请填写详细地址' }); |
|
|
if (!address) return this.json({ code: 1, msg: '请填写详细地址' }); |
|
|
if (!emergency_contact || !emergency_phone) return this.json({ code: 1, msg: '请填写紧急联系人信息' }); |
|
|
if (!emergency_contact || !emergency_phone) return this.json({ code: 1, msg: '请填写紧急联系人信息' }); |
|
|
|