diff --git a/src/config/sms.js b/src/config/sms.js index 1244c58..a9c5ec9 100644 --- a/src/config/sms.js +++ b/src/config/sms.js @@ -18,7 +18,8 @@ module.exports = { templates: { code: '2614777', // 验证码:{1}验证码, {2}分钟有效 // auditApproved: '2614698', // 审核通过(无变量) - auditApproved: '2616905', // 审核通过(无变量) + // auditApproved: '2616905', // 审核通过(无变量,旧模板) + auditApproved: '2655889', // 审核通过(无变量) auditRejected: '2614700' // 审核失败:{1}驳回原因 }, diff --git a/src/controller/mp.js b/src/controller/mp.js index 1af4a09..a661dcd 100644 --- a/src/controller/mp.js +++ b/src/controller/mp.js @@ -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 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: '请先完成实名认证' }); + 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 (!address) return this.json({ code: 1, msg: '请填写详细地址' }); if (!emergency_contact || !emergency_phone) return this.json({ code: 1, msg: '请填写紧急联系人信息' });