39 lines
896 B
Go
39 lines
896 B
Go
package main
|
|
|
|
import (
|
|
"../../hotime"
|
|
//"../dri/aliyun"
|
|
"../dri/baidu"
|
|
"../dri/ddsms"
|
|
"./admin"
|
|
"./app"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
|
|
fmt.Println(date, date.Unix())
|
|
|
|
baidu.DefaultBaiDuMap.Init("ZeT902EZvVgIoGVWEFK3osUm")
|
|
//fmt.Println("0123456"[1:7])
|
|
appIns := hotime.Init("config/config.json")
|
|
//RESTfull接口适配
|
|
appIns.SetConnectListener(func(context *hotime.Context) bool {
|
|
//支撑权限设置
|
|
return true
|
|
})
|
|
appIns.Router["admin"]["company_inout"] = admin.CompanyInOutCtr
|
|
appIns.Router["admin"]["test"] = admin.TestCtr
|
|
|
|
//makeCode := code.MakeCode{}
|
|
//fmt.Println(common.ObjToStr(makeCode.Db2JSON("admin","test",appIns.Db)))
|
|
if ddsms.DefaultDDY.ApiKey == "" {
|
|
ddsms.DefaultDDY.Init(appIns.Config.GetString("smsKey"))
|
|
}
|
|
|
|
appIns.Run(hotime.Router{
|
|
"app": app.Project,
|
|
})
|
|
}
|