From 9301c68219c150e524efbac78822a9e7730bdd19 Mon Sep 17 00:00:00 2001 From: leiyun Date: Tue, 2 Jun 2026 15:57:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=8F=90=E4=BA=A4=E3=80=82=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/sms.js | 3 ++- src/controller/mp.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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: '请填写紧急联系人信息' });