Browse Source

fix : 审核通过不能提交。更新短信模板

master
leiyun 3 weeks ago
parent
commit
9301c68219
2 changed files with 5 additions and 1 deletions
  1. +2
    -1
      src/config/sms.js
  2. +3
    -0
      src/controller/mp.js

+ 2
- 1
src/config/sms.js View File

@@ -18,7 +18,8 @@ module.exports = {
templates: {
code: '2614777', // 验证码:{1}验证码, {2}分钟有效
// auditApproved: '2614698', // 审核通过(无变量)
auditApproved: '2616905', // 审核通过(无变量)
// auditApproved: '2616905', // 审核通过(无变量,旧模板)
auditApproved: '2655889', // 审核通过(无变量)
auditRejected: '2614700' // 审核失败:{1}驳回原因
},



+ 3
- 0
src/controller/mp.js View File

@@ -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: '请填写紧急联系人信息' });


Loading…
Cancel
Save