请求后端地址读取localStorage

master
3y 3 years ago
parent fb2ac510e4
commit 32f518bdfe

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<title>amis admin</title>
<title>austin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta
name="viewport"
@ -38,6 +38,9 @@
<div id="root" class="app-wrapper"></div>
<script>
(function () {
// 请求后端的url
localStorage.setItem("backend_url", "http://localhost:8080");
let amis = amisRequire('amis/embed');
const match = amisRequire('path-to-regexp').match;

@ -4,7 +4,7 @@
"body": [
{
"type": "crud",
"api": "http://localhost:8080/account/list",
"api": "${ls:backend_url}/account/list",
"bodyClassName": "panel-default",
"name": "sample",
"columns": [
@ -54,7 +54,7 @@
"level": "danger",
"actionType": "ajax",
"confirmText": "您确认要删除?",
"api": "delete:http://localhost:8080/account/delete/$id"
"api": "delete:${ls:backend_url}/account/delete/$id"
}
]
}

@ -179,7 +179,7 @@
"visibleOn": "this.sendChannel ==110",
"mode": "normal",
"inline": true,
"label": "飞书机器人消息样例:{\n \"webhook\": \"https://open.feishu.cn/open-apis/bot/v2/hook/c24b09ef-9aa3-4aad-9239-a7e05fcaf6ec\"\n}"
"label": "飞书机器人消息样例:{\n \"webhook\": \"https://open.feishu.cn/open-apis/bot/v2/hook/xxxx-9aa3-xxx-9239-xxxxxx\"\n}"
}
]
}
@ -191,7 +191,7 @@
"bodyClassName": "text-lg",
"redirect": "/crud/account/list?page=1",
"api": {
"url": "http://localhost:8080/account/save",
"url": "${ls:backend_url}/account/save",
"method": "post",
"data": {
"name": "${name}",

@ -255,7 +255,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,
@ -265,7 +265,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,
@ -326,14 +326,14 @@
},
{
"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"
},
{
"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,
@ -343,7 +343,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,
@ -362,7 +362,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>"
},
@ -370,7 +370,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,
@ -432,7 +432,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,
@ -473,7 +473,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,
@ -503,7 +503,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,
@ -513,7 +513,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,
@ -523,7 +523,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,
@ -911,7 +911,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": {
@ -958,7 +958,7 @@
"isDeleted": "${isDeleted}"
}
},
"initApi": "http://localhost:8080/messageTemplate/query/${params.id}"
"initApi": "${ls:backend_url}/messageTemplate/query/${params.id}"
}
],
"toolbar": [

@ -4,7 +4,7 @@
"body": [
{
"type": "crud",
"api": "http://localhost:8080/messageTemplate/list",
"api": "${ls:backend_url}/messageTemplate/list?page=1&perPage=10",
"bodyClassName": "panel-default",
"name": "sample",
"filter": {
@ -34,7 +34,7 @@
"type": "button",
"level": "danger",
"actionType": "ajax",
"api": "delete:http://localhost:8080/messageTemplate/delete/$ids",
"api": "delete:${ls:backend_url}/messageTemplate/delete/$ids",
"confirmText": "确定要批量删除?"
}
],
@ -118,14 +118,14 @@
"type": "button",
"label": "测试",
"level": "primary",
"initApi": "post:http://localhost:8080/messageTemplate/query/$id",
"initApi": "post:${ls:backend_url}/messageTemplate/query/$id",
"actionType": "dialog",
"dialog": {
"title": "测试一条消息",
"body": {
"type": "form",
"api": {
"url": "http://localhost:8080/messageTemplate/test",
"url": "${ls:backend_url}/messageTemplate/test",
"method": "post",
"requestAdaptor": "api.data.msgContent = JSON.stringify(api.data.testParam[0])\nreturn api;",
"data": {
@ -144,7 +144,7 @@
},
{
"type": "service",
"schemaApi": "http://localhost:8080/messageTemplate/test/content?id=${id}"
"schemaApi": "${ls:backend_url}/messageTemplate/test/content?id=${id}"
}
]
}
@ -170,7 +170,7 @@
"level": "success",
"actionType": "ajax",
"confirmText": "您确认要启动吗?",
"api": "post:http://localhost:8080/messageTemplate/start/$id",
"api": "post:${ls:backend_url}/messageTemplate/start/$id",
"visibleOn": "this.templateType==10 && this.msgStatus!=30"
},
{
@ -179,7 +179,7 @@
"level": "success",
"actionType": "ajax",
"confirmText": "您确认要暂停吗?",
"api": "post:http://localhost:8080/messageTemplate/stop/$id",
"api": "post:${ls:backend_url}/messageTemplate/stop/$id",
"visibleOn": "this.templateType==10 && this.msgStatus==30"
},
{
@ -188,7 +188,7 @@
"level": "warning",
"actionType": "ajax",
"confirmText": "您确认要复制?",
"api": "post:http://localhost:8080/messageTemplate/copy/$id"
"api": "post:${ls:backend_url}/messageTemplate/copy/$id"
},
{
"type": "button",
@ -196,7 +196,7 @@
"level": "danger",
"actionType": "ajax",
"confirmText": "您确认要撤回?",
"api": "post:http://localhost:8080/messageTemplate/recall/$id"
"api": "post:${ls:backend_url}/messageTemplate/recall/$id"
},
{
"type": "button",
@ -204,7 +204,7 @@
"level": "danger",
"actionType": "ajax",
"confirmText": "您确认要删除?",
"api": "delete:http://localhost:8080/messageTemplate/delete/$id"
"api": "delete:${ls:backend_url}/messageTemplate/delete/$id"
}
]
}

@ -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": {

@ -243,7 +243,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,
@ -253,7 +253,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,
@ -314,14 +314,14 @@
},
{
"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"
},
{
"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,
@ -331,7 +331,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,
@ -350,7 +350,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>"
},
@ -359,7 +359,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,
@ -421,7 +421,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,
@ -463,7 +463,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,
@ -492,7 +492,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,
@ -503,7 +503,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,
@ -513,7 +513,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,
@ -909,7 +909,7 @@
"affixFooter": true,
"panelClassName": "Panel--default",
"bodyClassName": "text-lg",
"initApi": "http://localhost:8080/messageTemplate/query/${params.id}"
"initApi": "${ls:backend_url}/messageTemplate/query/${params.id}"
}
],
"toolbar": [

@ -30,7 +30,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,
@ -40,7 +40,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,
@ -50,7 +50,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,
@ -60,7 +60,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,
@ -105,7 +105,7 @@
}
],
"api": {
"url": "http://localhost:8080/material/upload",
"url": "${ls:backend_url}/material/upload",
"method": "post",
"data": {
"sendChannel": "${sendChannel}",

@ -44,7 +44,7 @@
"replaceChartOption": true,
"clearPersistDataAfterSubmit": true,
"api": {
"url": "http://localhost:8080/trace/messageTemplate",
"url": "${ls:backend_url}/trace/messageTemplate",
"method": "post",
"data": {
"businessId": "${name}"

@ -24,7 +24,7 @@
"type": "crud",
"name": "my_crud",
"api": {
"url": "http://localhost:8080/trace/sms",
"url": "${ls:backend_url}/trace/sms",
"method": "post",
"data": {
"receiver": "${phone}",

@ -18,7 +18,7 @@
"type": "crud",
"name": "my_crud",
"api": {
"url": "http://localhost:8080/trace/user",
"url": "${ls:backend_url}/trace/user",
"method": "post",
"data": {
"receiver": "${keywords}"

Loading…
Cancel
Save