hotime/example/app/init.go

28 lines
547 B
Go
Raw Normal View History

2022-03-14 08:48:19 +00:00
package app
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"github.com/silenceper/wechat/v2"
2022-03-16 01:58:24 +00:00
"github.com/silenceper/wechat/v2/miniprogram"
2022-03-14 08:48:19 +00:00
"time"
)
// Project 管理端项目
var Project = Proj{
2022-03-16 01:58:24 +00:00
"wechat": Wechat,
"websocket": WebsocketCtr,
2022-03-14 08:48:19 +00:00
}
var weixin *wechat.Wechat //微信登录实例
2022-03-16 01:58:24 +00:00
var miniProgram *miniprogram.MiniProgram
2022-03-14 08:48:19 +00:00
2022-03-16 01:58:24 +00:00
func init() {
2022-03-14 08:48:19 +00:00
}
//生成随机码的6位md5
func getSn() string {
x := Rand(8)
return Substr(Md5(ObjToStr(int64(x)+time.Now().UnixNano()+int64(Rand(6)))), 0, 6)
}