- 所见即所得的开发体验
- 通用无代码,通过图形化编排的方式可实现复杂的功能
- 方便且强大的即时调试能力
// 引入连接器,仓库地址 https://github.com/mybricks/plugin-connector-http
855E
import { call as callConnectorHttp } from '@mybricks/plugin-connector-http'
const env = {
i18n (text: string) {
// 多语言定制
return text
},
callConnector (connector, params) {
//调用连接器
if (connector.type === 'http') {
//服务接口类型
return callConnectorHttp({ script: connector.script }, params)
} else {
return Promise.reject('错误的连接器类型.')
}
},
vars: {
getQuery: () => {
// 返回页面路由参数
return {}
},
get hasPermission() {
return ({ key }) => {
// TOD 操作权限校验
return true
})
},
get getRouter () {
return () => {
reload: () => {
// TOD 刷新页面
},
redirect: ({ url }: { url: string }) => {
// TOD 重定向
},
back: () => {
// TOD 后退
},
forward: () => {
// TOD 前进
},
pushState: ({
state,
title,
url,
}: {
state: any;
title: string;
url: string;
}) => {
// TOD 路由跳转
},
openTab: ({ url, title }: { url: string; title: string }) => {
// TOD 打开新标签页
}
}
}
}
}
如果您在使用过程中碰到问题,可以加入Mybricks社区,获得产品与服务支持!
感谢所有为Mybricks做出贡献的伙伴们!