29 lines
513 B
Go
29 lines
513 B
Go
|
package provider
|
||
|
|
||
|
import (
|
||
|
. "code.hoteas.com/golang/hotime"
|
||
|
. "code.hoteas.com/golang/hotime/common"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// Project 管理端项目
|
||
|
var Project = Proj{
|
||
|
"salesman": Salesman,
|
||
|
"wechat": Wechat,
|
||
|
}
|
||
|
|
||
|
//生成随机码的6位md5
|
||
|
func getSn() string {
|
||
|
x := Rand(8)
|
||
|
return Substr(Md5(ObjToStr(int64(x)+time.Now().UnixNano()+int64(Rand(6)))), 0, 6)
|
||
|
}
|
||
|
|
||
|
//生成随机码的4位随机数
|
||
|
func getCode() string {
|
||
|
//res := ""
|
||
|
//for i := 0; i < 4; i++ {
|
||
|
res := ObjToStr(RandX(1000, 9999))
|
||
|
//}
|
||
|
return res
|
||
|
}
|