diff --git a/go.mod b/go.mod index daf1be6cd..d3a36b9cb 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/liwei1dao/lego v0.0.0-20220531091126-a21bb3766fbc github.com/spf13/cobra v1.2.1 + github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 go.mongodb.org/mongo-driver v1.5.1 google.golang.org/protobuf v1.28.0 @@ -95,7 +96,6 @@ require ( github.com/smallnest/quick v0.0.0-20220103065406-780def6371e6 // indirect github.com/smallnest/rpcx v1.7.4 // indirect github.com/soheilhy/cmux v0.1.5 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect github.com/tinylib/msgp v1.1.6 // indirect diff --git a/modules/login/module.go b/modules/login/module.go index 282d94a0f..e7bd37df7 100644 --- a/modules/login/module.go +++ b/modules/login/module.go @@ -3,8 +3,11 @@ package login import ( "go_dreamfactory/comm" "go_dreamfactory/modules" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" "github.com/liwei1dao/lego/core" + "github.com/liwei1dao/lego/sys/log" ) func NewModule() core.IModule { @@ -25,3 +28,22 @@ func (this *Login) OnInstallComp() { this.ModuleBase.OnInstallComp() this.user_comp = this.RegisterComp(new(LoginComp)).(*LoginComp) } + +func (this *Login) Start() (err error) { + + if err = configure.RegisterConfigure("tbitem.json", cfg.NewTbItem); err != nil { + return + } + + if data, ret := configure.GetConfigure("tbitem.json"); ret == nil { + _data := data.(*cfg.TbItem).GetDataMap() + for _, v := range _data { + if v.Id > 0 { + break + } + log.Debugf(v.Name) + } + } + + return nil +}