iedc-go/example/app/init.go
2022-03-16 09:58:24 +08:00

28 lines
547 B
Go

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