diff --git a/api/app/lib/controllers/patrolManage/yujingguanli.js b/api/app/lib/controllers/patrolManage/yujingguanli.js index b7264e4..0d87b77 100644 --- a/api/app/lib/controllers/patrolManage/yujingguanli.js +++ b/api/app/lib/controllers/patrolManage/yujingguanli.js @@ -3,7 +3,7 @@ async function varfiyCode(ctx) { try { const { models } = ctx.fs.dc; const { pushBySms, pushByEmail } = ctx.app.fs.utils - const { phone, type ,email} = ctx.request.body + const { phone, type ,email,struction,point,number} = ctx.request.body // 伪造的请求可能由相同的sig参数组成 // const checkSigUsed = await models.PhoneValidateCode.findOne({ @@ -29,15 +29,18 @@ async function varfiyCode(ctx) { phone: phone, templateCode: 'SMS_273640525', templateParam: { - code: varifyCode + struction, + point, + number }, }) } if(type.includes(2)){ await pushByEmail({ email: email, - title: '测试', - text:'你知道吗' + title: '隧道智慧运维助手', + text: ` + 您好,${struction}中${point}点位故障问题已重复累积发生${number}次,存在一定风险。可能原因是设备老化或其他隐患问题导致,售后工程师正在排查。` }) } diff --git a/api/app/lib/utils/push.js b/api/app/lib/utils/push.js index 18f0df9..a73d40e 100644 --- a/api/app/lib/utils/push.js +++ b/api/app/lib/utils/push.js @@ -16,7 +16,7 @@ module.exports = function (app, opts) { }); const SendSmsRes = await client.request('SendSms', { "PhoneNumbers": phone.join(','),//接收短信的手机号码。 - "SignName": "飞尚尚视",//短信签名名称。必须是已添加、并通过审核的短信签名。 + "SignName": "隧道智慧运维助手",//短信签名名称。必须是已添加、并通过审核的短信签名。 "TemplateCode": templateCode,//短信模板ID。必须是已添加、并通过审核的短信签名;且发送国际/港澳台消息时,请使用国际/港澳台短信模版。 "TemplateParam": JSON.stringify(templateParam)//短信模板变量对应的实际值,JSON格式。 }, { diff --git a/web/client/src/sections/patrolManage/components/xiafagaojin.js b/web/client/src/sections/patrolManage/components/xiafagaojin.js index 516570a..f6a8e4a 100644 --- a/web/client/src/sections/patrolManage/components/xiafagaojin.js +++ b/web/client/src/sections/patrolManage/components/xiafagaojin.js @@ -34,7 +34,8 @@ const PlanModal = ({ visible, onCancel, dispatch, type, curRecord, tableRef, che console.log('user,',userlist) let usedata = userlist.filter(i=>i?.username===values.name) console.log(usedata,'usedata') - dispatch(putxinxi({phone:[params.name],email:[usedata[0]?.email],type:params.type})).then(res=>{ + dispatch(putxinxi({phone:[params.name],email:[usedata[0]?.email],type:params.type,struction:curRecord?.points?.project?.name + ,point:curRecord?.points?.itemData?.name,number:curRecord?.patrolRecordIssueHandles[0]?.yanshoucishu})).then(res=>{ console.log(res,'res') }).then(()=>{ dispatch(modifyPatrolRecordIssueHandle(curRecord?.patrolRecordIssueHandles[0]?.id,{