代码拉取完成,页面将自动刷新
import Config from "./components/config.js";
import lodash from "lodash";
export function supportGuoba() {
return {
configInfo: {
schemas: [
{
field: "GroupList",
label: "群策略",
bottomHelpMessage: "设置需要接收消息推送的群号",
component: "GSubForm",
componentProps: {
multiple: true,
schemas: [
{
field: "group_id",
label: "群号",
component: "Input",
bottomHelpMessage: "设置需要接收消息推送的群号",
required: true,
componentProps: {
placeholder: "请输入群号",
},
},
{
field: "limit",
label: "频率",
component: "InputNumber",
bottomHelpMessage: "每小时最多发送几条消息,不填表示不限制",
componentProps: {
placeholder: "请输入数字",
addonAfter: "次",
},
},
{
field: "nsfw",
label: "NSFW",
component: "Switch",
bottomHelpMessage: "是否推送不适宜在公共场合查看的消息(不包括露点图)",
},
{
field: "bangumi",
label: "新番",
component: "Switch",
bottomHelpMessage: "是否推送每日动漫新番消息",
},
{
field: "meme",
label: "梗图",
component: "Switch",
bottomHelpMessage: "是否推送梗图消息",
},
],
},
},
{
field: "enable",
label: "连接状态",
bottomHelpMessage: "默认开启,关闭后将不会继续推送消息",
component: "Switch",
}
],
getConfigData() {
return Config.getConfig();
},
setConfigData(data, { Result }) {
let config = {}
for (let [keyPath, value] of Object.entries(data)) {
lodash.set(config, keyPath, value)
}
config = lodash.merge({}, Config.getConfig(), config)
config.GroupList = data['GroupList']
Config.setConfig(config)
return Result.ok({}, '保存成功~')
},
},
};
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。