You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.5 KiB

{
"type": "form",
"title": "上传素材",
"body": [
{
"label": "渠道类型",
"type": "radios",
"name": "sendChannel",
"required": true,
"options": [
{
"label": "钉钉(工作消息)",
"value": "90"
},
{
"label": "企业微信(机器人)",
"value": "100"
},
{
"label": "企业微信(应用消息)",
"value": "70"
}
]
},
{
"type": "select",
"label": "企业微信机器人",
"name": "sendAccount",
"source": "${ls:backend_url}/account/queryByChannelType?channelType=100&creator=${ls:openId}",
"visibleOn": "this.sendChannel == 100",
"clearValueOnHidden": false,
"required": true,
"size": "lg"
},
{
"type": "select",
"label": "企业微信(应用消息)",
"name": "sendAccount",
"source": "${ls:backend_url}/account/queryByChannelType?channelType=70&creator=${ls:openId}",
"visibleOn": "this.sendChannel == 70",
"clearValueOnHidden": false,
"required": true,
"size": "lg"
},
{
"type": "select",
"label": "钉钉(工作消息)账号",
"name": "sendAccount",
"source": "${ls:backend_url}/account/queryByChannelType?channelType=90&creator=${ls:openId}",
"visibleOn": "this.sendChannel == 90",
"clearValueOnHidden": false,
"required": true,
"size": "lg"
},
{
"type": "radios",
"label": "文件类型",
"name": "fileType",
"required": true,
"options": [
{
"label": "图片",
"value": "10"
},
{
"label": "语音",
"value": "20"
},
{
"label": "普通文件",
"value": "30"
},
{
"label": "视频",
"value": "40"
}
],
"visibleOn": "this.sendChannel == 90 || this.sendChannel == 70"
},
{
"type": "input-file",
"label": "上传素材",
"name": "file",
"required": true,
"asBlob": true
},
{
"type": "static",
"name": "id",
"visibleOn": "typeof data.id !== 'undefined'",
"label": "返回 ID"
}
],
"api": {
"url": "${ls:backend_url}/material/upload",
"method": "post",
"data": {
"sendChannel": "${sendChannel}",
"sendAccount": "${sendAccount}",
"fileType": "${fileType}",
"file": "${file}"
}
}
}