This commit is contained in:
cdle
2023-06-29 21:59:20 +08:00
parent d2c599dd68
commit 70bf5a33a6
4 changed files with 50 additions and 6 deletions
+2 -2
View File
@@ -535,12 +535,12 @@ func initPlugin(data string, uuid string) (*common.Function, []func(), error) {
return false
})
vm.Set("s", ss)
vm.Set("InitAdapter", func(plt, botid string) *Factory {
vm.Set("InitAdapter", func(plt, botid string, params map[string]interface{}) *Factory {
f := &Factory{
uuid: uuid,
vm: vm,
}
f.Init(plt, botid, nil)
f.Init(plt, botid, params)
return f
})
vm.Set("initAdapter", func(plt, botid string) *Factory {
+7 -2
View File
@@ -360,10 +360,15 @@ func initWeb() {
})
// logs.Info("Http服务(%s)开始运行", port)
logs.Info("管理员面板:")
logs.Info(" > 本机: http://localhost:%s", port)
logs.Info(" > 本机: http://localhost:%s/admin", port)
local_ip := getLocalIP()
logs.Info(" > 局域网: http://%s:%s", local_ip, port)
logs.Info(" > 局域网: http://%s:%s/admin", local_ip, port)
ip := sillyGirl.GetString("ip")
if ip != "" {
logs.Info(" > 广域网: http://%s:%s/admin", ip, port)
}
sillyGirl.Set("local_ip", local_ip)
go func() {
if err := srvs[0].ListenAndServe(); err != nil && err != http.ErrServerClosed {