|
|
@ -138,12 +138,12 @@ module.exports = function (app, opts) { |
|
|
|
let templateParam = { |
|
|
|
name: corUser[0].username, |
|
|
|
} |
|
|
|
let useTempCode = 'SMS_247900122' |
|
|
|
let useTempCode = 'SMS_248205074' |
|
|
|
// let text = `【${corUser[0].username}】账号下的`
|
|
|
|
if (offArr.length == 1) { |
|
|
|
// text += `【${offArr[0].name}】离线,请及时处理!【${moment(offArr[0].time).format('MM月DD日 HH时mm分')}】`
|
|
|
|
templateParam.deviceName = `【${offArr[0].name}】` |
|
|
|
templateParam.time = moment(offArr[0].time).format('MM月DD日 HH时mm分') |
|
|
|
templateParam.timeRange = moment(offArr[0].time).format('MM月DD日 HH时mm分') |
|
|
|
} else { |
|
|
|
let text = '' |
|
|
|
text += offArr.map(o => `【${o.name}】`).join('') |
|
|
@ -151,11 +151,11 @@ module.exports = function (app, opts) { |
|
|
|
text = text.substring(0, 35) + '...' |
|
|
|
// text += `等${offArr.length}个摄像头离线`
|
|
|
|
templateParam.deviceCount = offArr.length |
|
|
|
useTempCode = 'SMS_247985123' |
|
|
|
useTempCode = 'SMS_248250074' |
|
|
|
} |
|
|
|
templateParam.deviceName = text |
|
|
|
// text += `,请及时处理!【${moment().format('MM月DD日HH时mm分')}-${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】`
|
|
|
|
templateParam.time = `【${moment().format('MM月DD日HH时mm分')} -${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】` |
|
|
|
templateParam.timeRange = `【${moment().format('MM月DD日HH时mm分')} -${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】` |
|
|
|
} |
|
|
|
await pushBySms({ |
|
|
|
phone: receiver, |
|
|
@ -208,11 +208,11 @@ module.exports = function (app, opts) { |
|
|
|
let templateParam = { |
|
|
|
name: corUser[0].username, |
|
|
|
} |
|
|
|
let useTempCode = 'SMS_247820204' |
|
|
|
let useTempCode = 'SMS_248120080' |
|
|
|
if (onArr.length == 1) { |
|
|
|
// text += `【${onArr[0].name}】已恢复上线,请及时处理!【${moment(onArr[0].time).format('MM月DD日 HH时mm分')}】`
|
|
|
|
templateParam.deviceName = `【${onArr[0].name}】` |
|
|
|
templateParam.time = moment(onArr[0].time).format('MM月DD日 HH时mm分') |
|
|
|
templateParam.date = moment(onArr[0].time).format('MM月DD日 HH时mm分') |
|
|
|
} else { |
|
|
|
let text = '' |
|
|
|
text += onArr.map(o => `【${o.name}】`).join('') |
|
|
@ -220,11 +220,11 @@ module.exports = function (app, opts) { |
|
|
|
text = text.substring(0, 35) + '...' |
|
|
|
// text += `等${onArr.length}个摄像头已恢复上线!`
|
|
|
|
templateParam.deviceCount = onArr.length |
|
|
|
useTempCode = 'SMS_247825189' |
|
|
|
useTempCode = 'SMS_248120080' |
|
|
|
} |
|
|
|
templateParam.deviceName = text |
|
|
|
// text += `【${moment().format('MM月DD日HH时mm分')}-${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】!`
|
|
|
|
templateParam.time = `【${moment().format('MM月DD日HH时mm分')}-${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】!` |
|
|
|
templateParam.timeRange = `【${moment().format('MM月DD日HH时mm分')}-${moment(timeNow).subtract(15, 'minutes').format('MM月DD日HH时mm分')}】!` |
|
|
|
} |
|
|
|
await pushBySms({ |
|
|
|
phone: receiver, |
|
|
|