|
|
|
@ -150,7 +150,7 @@
|
|
|
|
|
"required": true,
|
|
|
|
|
"label": "人群文件上传",
|
|
|
|
|
"accept": ".csv",
|
|
|
|
|
"receiver": "http://localhost:8080/messageTemplate/upload",
|
|
|
|
|
"receiver": "${ls:backend_url}/messageTemplate/upload",
|
|
|
|
|
"remark": null,
|
|
|
|
|
"labelRemark": null,
|
|
|
|
|
"mode": "",
|
|
|
|
@ -271,7 +271,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "发送账号",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=20",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=20",
|
|
|
|
|
"visibleOn": "this.sendChannel == 20",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -313,7 +313,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "服务号账号",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=50",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=50",
|
|
|
|
|
"visibleOn": "this.sendChannel == 50",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -323,7 +323,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "选择模板",
|
|
|
|
|
"name": "templateId",
|
|
|
|
|
"source": "http://localhost:8080/officialAccount/template/list?id=${sendAccount}",
|
|
|
|
|
"source": "${ls:backend_url}/officialAccount/template/list?id=${sendAccount}",
|
|
|
|
|
"visibleOn": "this.sendChannel == 50",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -384,7 +384,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "service",
|
|
|
|
|
"schemaApi": "http://localhost:8080/officialAccount/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
|
|
|
|
|
"schemaApi": "${ls:backend_url}/officialAccount/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
|
|
|
|
|
"visibleOn": "this.sendChannel == 50",
|
|
|
|
|
"description": "<font color=\"#990000\">请点击【新增】填入文案</font>"
|
|
|
|
|
},
|
|
|
|
@ -393,7 +393,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "小程序账号",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=60",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=60",
|
|
|
|
|
"visibleOn": "this.sendChannel == 60",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -403,7 +403,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "选择模板",
|
|
|
|
|
"name": "templateId",
|
|
|
|
|
"source": "http://localhost:8080/miniProgram/template/list?id=${sendAccount}",
|
|
|
|
|
"source": "${ls:backend_url}/miniProgram/template/list?id=${sendAccount}",
|
|
|
|
|
"visibleOn": "this.sendChannel == 60",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -422,7 +422,7 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "service",
|
|
|
|
|
"schemaApi": "http://localhost:8080/miniProgram/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
|
|
|
|
|
"schemaApi": "${ls:backend_url}/miniProgram/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
|
|
|
|
|
"visibleOn": "this.sendChannel == 60",
|
|
|
|
|
"description": "<font color=\"#990000\">请点击【新增】填入文案</font>"
|
|
|
|
|
},
|
|
|
|
@ -431,7 +431,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "邮件账号",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=40",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=40",
|
|
|
|
|
"visibleOn": "this.sendChannel == 40",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -461,7 +461,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "飞书机器人",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=110",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=110",
|
|
|
|
|
"visibleOn": "this.sendChannel == 110",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -523,7 +523,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "企业微信应用",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=70",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=70",
|
|
|
|
|
"visibleOn": "this.sendChannel == 70",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -533,7 +533,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "钉钉群机器人",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=80",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=80",
|
|
|
|
|
"visibleOn": "this.sendChannel == 80",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -543,7 +543,7 @@
|
|
|
|
|
"type": "select",
|
|
|
|
|
"label": "钉钉应用",
|
|
|
|
|
"name": "sendAccount",
|
|
|
|
|
"source": "http://localhost:8080/account/queryByChannelType?channelType=90",
|
|
|
|
|
"source": "${ls:backend_url}/account/queryByChannelType?channelType=90",
|
|
|
|
|
"visibleOn": "this.sendChannel == 90",
|
|
|
|
|
"clearValueOnHidden": false,
|
|
|
|
|
"required": true,
|
|
|
|
@ -944,7 +944,7 @@
|
|
|
|
|
"bodyClassName": "text-lg",
|
|
|
|
|
"redirect": "/crud/list",
|
|
|
|
|
"api": {
|
|
|
|
|
"url": "http://localhost:8080/messageTemplate/save",
|
|
|
|
|
"url": "${ls:backend_url}/messageTemplate/save",
|
|
|
|
|
"method": "post",
|
|
|
|
|
"requestAdaptor": "\nlet jsonObj = {};\n\nlet content = JSON.parse(api.data.msgContent).content\nlet url = JSON.parse(api.data.msgContent).url\nlet title = JSON.parse(api.data.msgContent).title\nlet sendType = JSON.parse(api.data.msgContent).sendType\nlet picUrl = JSON.parse(api.data.msgContent).picUrl\n\n\n// push通知栏\nif(api.data.sendChannel == '20'){\n jsonObj.content = content\n jsonObj.url = url\n jsonObj.title = title\n}\n// 短信\nif(api.data.sendChannel == '30'){\n jsonObj.url = url\n jsonObj.content = content\n}\n// 邮件\nif(api.data.sendChannel == '40'){\n jsonObj.content = content\n jsonObj.title = title\n}\n// 企业微信\nif (api.data.sendChannel == '70') {\n // 文本类型\n if (sendType == '10') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n }\n}\n// 微信服务号\nif (api.data.sendChannel == '50') {\n jsonObj.path = api.data.path\n jsonObj.miniProgramId = api.data.miniProgramId\n jsonObj.templateId = api.data.templateId\n jsonObj.url = url\n jsonObj.linkType = api.data.linkType\n\n // 模板参数\n jsonObj.officialAccountParam = JSON.stringify(api.data.officialAccountParam[0])\n}\n// 微信小程序\nif (api.data.sendChannel == '60') {\n jsonObj.page = api.data.page\n jsonObj.templateId = api.data.templateId\n // 模板参数\n jsonObj.miniProgramParam = JSON.stringify(api.data.miniProgramParam[0])\n}\n\n// 钉钉机器人\nif (api.data.sendChannel == '80') {\n // 文本类型(text)\n if (sendType == '10') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n }\n // 图文类型(FeedCard)\n if (sendType == '40') {\n jsonObj.sendType = sendType\n jsonObj.feedCards = JSON.stringify(api.data.feedCards)\n }\n // markdown类型(markdown)\n if (sendType == '80') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n jsonObj.title = title\n }\n // 链接类型(link)\n if (sendType == '110') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n jsonObj.title = title\n jsonObj.picUrl = picUrl\n jsonObj.url = url\n }\n // 卡片跳转(actionCard)\n if (sendType == '120') {\n jsonObj.title = title\n jsonObj.content = content\n jsonObj.btnOrientation = api.data.btnOrientation\n jsonObj.btns = JSON.stringify(api.data.btns)\n jsonObj.sendType = sendType\n }\n}\n// 钉钉工作消息\nif (api.data.sendChannel == '90') {\n // 文本类型\n if (sendType == '10') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n }\n // 语音类型\n if (sendType == '20') {\n jsonObj.sendType = sendType\n jsonObj.duration = api.data.duration\n jsonObj.mediaId = api.data.mediaId\n }\n // 文件类型 || 图片类型\n if (sendType == '60' || sendType == '100') {\n jsonObj.sendType = sendType\n jsonObj.mediaId = api.data.mediaId\n }\n // 链接类型\n if (sendType == '110') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n jsonObj.title = title\n jsonObj.mediaId = api.data.mediaId\n jsonObj.url = url\n }\n // markdown类型(markdown)\n if (sendType == '80') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n jsonObj.title = title\n }\n // 卡片跳转(actionCard)\n if (sendType == '120') {\n jsonObj.title = title\n jsonObj.content = content\n jsonObj.btnOrientation = api.data.btnOrientation\n jsonObj.btns = JSON.stringify(api.data.btns)\n jsonObj.sendType = sendType\n }\n \n // OA(actionCard)\n if (sendType == '130') {\n \n // 头部\n var head = {}\n head.bgcolor = api.data.dingDingOaHeadBgColor\n head.text = api.data.dingDingOaHeadTitle\n jsonObj.dingDingOaHead = head\n \n // body\n var body = {}\n body.title = api.data.dingDingOaTitle\n body.content = api.data.dingDingOaContent\n body.image = api.data.mediaId\n body.author = api.data.dingDingOaAuthor\n jsonObj.dingDingOaBody = body\n \n // 通用\n jsonObj.sendType = sendType\n jsonObj.url = url\n }\n}\n\n// 飞书群机器人\nif (api.data.sendChannel == '110') {\n // 文本类型\n if (sendType == '10') {\n jsonObj.content = content\n jsonObj.sendType = sendType\n }\n\n // 通用\n jsonObj.sendType = sendType\n jsonObj.url = url\n}\n\napi.data.msgContent = JSON.stringify(jsonObj)\nreturn api;",
|
|
|
|
|
"data": {
|
|
|
|
|