系统优化

This commit is contained in:
hoteas 2022-04-18 06:28:01 +08:00
parent 48042ecce4
commit a37a33321f
78 changed files with 110 additions and 18098 deletions

View File

@ -3,8 +3,13 @@ package app
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"code.hoteas.com/golang/hotime/dri/ddsms"
"github.com/silenceper/wechat/v2"
"github.com/silenceper/wechat/v2/cache"
"github.com/silenceper/wechat/v2/miniprogram"
"github.com/silenceper/wechat/v2/miniprogram/config"
"github.com/silenceper/wechat/v2/officialaccount"
h5config "github.com/silenceper/wechat/v2/officialaccount/config"
"time"
)
@ -15,9 +20,30 @@ var Project = Proj{
}
var weixin *wechat.Wechat //微信登录实例
var miniProgram *miniprogram.MiniProgram
var h5Program *officialaccount.OfficialAccount
func init() {
func InitApp(app Application) {
weixin = wechat.NewWechat()
memory := cache.NewMemory()
cfg := &config.Config{
AppID: app.Config.GetString("wechatMiniAppID"),
AppSecret: app.Config.GetString("wechatMiniAppSecret"),
//Token: "xxx",
//EncodingAESKey: "xxxx",
Cache: memory,
}
h5cfg := &h5config.Config{
AppID: app.Config.GetString("wechatAppID"),
AppSecret: app.Config.GetString("wechatAppSecret"),
//Token: "xxx",
//EncodingAESKey: "xxxx",
Cache: memory,
}
miniProgram = weixin.GetMiniProgram(cfg)
h5Program = weixin.GetOfficialAccount(h5cfg)
ddsms.DDY.Init(app.Config.GetString("smsKey"))
}
//生成随机码的6位md5
@ -25,3 +51,12 @@ 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
}

View File

@ -3,110 +3,37 @@ package app
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"code.hoteas.com/golang/hotime/dri/download"
"fmt"
"github.com/silenceper/wechat/v2/cache"
"github.com/silenceper/wechat/v2/miniprogram/config"
"time"
//"fmt"
"github.com/silenceper/wechat/v2"
//"github.com/silenceper/wechat/v2/cache"
)
var Wechat = Ctr{
"login": func(that *Context) {
nickname := that.Req.FormValue("nickname")
avatar := that.Req.FormValue("avatarUrl")
retoken := that.Req.FormValue("retoken")
encryptedData := that.Req.FormValue("encryptedData")
iv := that.Req.FormValue("iv")
if that.Session("wechat_id").Data == nil {
that.Display(2, "还没有获取token")
return
}
if nickname == "" || avatar == "" || encryptedData == "" || iv == "" {
if retoken == "" || encryptedData == "" || iv == "" {
that.Display(3, "参数不足")
return
}
if weixin == nil {
weixin = wechat.NewWechat()
memory := cache.NewMemory()
cfg := &config.Config{
AppID: that.Config.GetString("wechatAppID"),
AppSecret: that.Config.GetString("wechatAppSecret"),
//Token: "xxx",
//EncodingAESKey: "xxxx",
Cache: memory,
}
miniProgram = weixin.GetMiniProgram(cfg)
}
wechatId := that.Session("wechat_id").ToCeilInt()
wchat := that.Db.Get("wechat", "*", Map{"id": wechatId})
if wchat == nil {
that.Display(4, "找不到该用户")
return
}
eny := miniProgram.GetEncryptor()
re, e := eny.Decrypt(wchat.GetString("retoken"), encryptedData, iv)
re, e := eny.Decrypt(retoken, encryptedData, iv)
if e != nil {
that.Display(4, e)
return
}
admin := that.Db.Get("admin", "*", Map{"phone": re.PhoneNumber})
if admin == nil {
that.Display(5, "你不是本系统用户,无法使用本系统")
return
}
t := time.Now().Unix()
path := time.Now().Format(that.Config.GetString("imgPath"))
filename := Md5(ObjToStr(t)) + ".jpg"
down := download.Down(avatar, that.Config.GetString("tpt")+"/"+path, filename)
if down {
avatar = path + filename
}
that.Db.Update("wechat", Map{"admin_id": admin.GetCeilInt("id"), "modify_time": t, "avatar": avatar, "nickname": nickname}, Map{"id": wchat.GetCeilInt64("id")})
that.Db.Update("admin", Map{"avatar_img": avatar, "modify_time": t}, Map{"id": admin.GetCeilInt64("id")})
that.Session("admin_id", admin.GetCeilInt64("id"))
that.Display(0, "成功!")
that.Display(0, re.PhoneNumber)
},
"code": func(that *Context) {
that.Session("admin_id", 1)
that.Display(0, Map{"status": 1, "token": that.SessionId})
return
code := that.Req.FormValue("code")
if code == "" {
that.Display(3, "缺少code")
return
}
if weixin == nil {
weixin = wechat.NewWechat()
memory := cache.NewMemory()
cfg := &config.Config{
AppID: that.Config.GetString("wechatAppID"),
AppSecret: that.Config.GetString("wechatAppSecret"),
//Token: "xxx",
//EncodingAESKey: "xxxx",
Cache: memory,
}
miniProgram = weixin.GetMiniProgram(cfg)
}
//mini := weixin.GetMiniProgram(cfg)
a := miniProgram.GetAuth()
re, e := a.Code2Session(code)
fmt.Println(re)
@ -114,164 +41,73 @@ var Wechat = Ctr{
that.Display(4, e)
return
}
wchat := that.Db.Get("wechat", "*", Map{"openid": re.OpenID})
if wchat == nil {
wchat = Map{"openid": re.OpenID,
wchat := Map{"openid": re.OpenID,
"appid": a.AppID,
"state": 0,
"retoken": re.SessionKey,
"modify_time": time.Now().Unix(),
"create_time": time.Now().Unix(),
"unionid": re.UnionID,
}
wchat["id"] = that.Db.Insert("wechat", wchat)
//wchat["id"] = that.Db.Insert("wechat", wchat)
} else {
wchat["modify_time"] = time.Now().Unix()
wchat["retoken"] = re.SessionKey
wchat["unionid"] = re.UnionID
that.Db.Update("wechat", wchat, Map{"id": wchat.GetCeilInt("id")})
}
that.Session("wechat_id", wchat.GetCeilInt("id"))
if wchat.GetCeilInt("admin_id") == 0 {
that.Display(0, Map{"status": 0, "token": that.SessionId})
return
}
that.Session("admin_id", wchat.GetCeilInt("admin_id"))
that.Display(0, Map{"status": 1, "token": that.SessionId})
that.Display(0, wchat)
return
},
////微信注册0已经完整的注册了1还没有注册
//"codebase": func(that *Context) {
// wx := Weixin(that)
// auth := wx.GetOauth()
// resToken, err := auth.GetUserAccessToken(that.Req.FormValue("code"))
// if err != nil {
// that.Display(6, "code错误")
// return
// }
//
// //判断用户是否已经注册
// user := that.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
// if user != nil {
// that.Session("user_id", user.Get("id"))
// that.Display(0, 0)
// return
// }
//
// user_id := that.Db.Insert("user", Map{"time": time.Now().Unix(), "state": 2})
// if user_id == 0 {
// that.Display(4, "创建用户失败")
// return
// }
//
// wid := that.Db.Insert("wechat", Map{"openid": resToken.OpenID, "appid": that.Config.GetString("wechatAppID"), "state": 1, "user_id": user_id})
// if wid == 0 {
// that.Display(4, "关联微信失败!")
// return
// }
//
// that.Session("user_id", user.Get("id"))
//
// that.Display(0, 1)
//},
////微信注册0已经完整的注册了1还没有注册
//"code": func(that *Context) {
//
// orgId := ObjToInt(that.Req.FormValue("org_id"))
// //if orgId==0{
// // that.Display(3, "缺少组织id")
// // return
// //}
//
// wx := Weixin(that)
// auth := wx.GetOauth()
// resToken, err := auth.GetUserAccessToken(that.Req.FormValue("code"))
// if err != nil {
// that.Display(5, "code错误")
// return
// }
//
// //判断用户是否已经注册
// user := that.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
// if user != nil && user.GetCeilInt("id") != 0 && user.GetCeilInt("state") == 0 {
// that.Session("user_id", user.Get("id"))
// that.Display(0, Map{"type": 0, "token": that.SessionId})
// return
// }
// //getUserInfo
// userInfo, err := auth.GetUserInfo(resToken.AccessToken, resToken.OpenID)
// if err != nil {
// that.Display(6, "微信个人信息无法获取")
// return
// }
//
// //wechatInfo := ObjToMap(userInfo)
// t := time.Now().Unix()
// wechatInfo := Map{
// "openid": userInfo.OpenID,
// "acttoken": resToken.AccessToken,
// "retoken": resToken.RefreshToken,
// "appid": that.Config.GetString("wechatAppID"),
// "unionid": userInfo.Unionid,
// "nickname": userInfo.Nickname,
// "avatar": userInfo.HeadImgURL,
// }
// if orgId != 0 {
// wechatInfo["org_id"] = orgId
// wechatInfo["status"] = 0
// }
//
// wechatDb := that.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
//
// if wechatDb != nil {
//
// that.Db.Update("wechat", wechatInfo, Map{"id": wechatDb.GetCeilInt("id")})
// //userInfo["wid"]=wechatDb.GetCeilInt("wid")
// } else {
// wechatInfo["create_time"] = t
// wechatInfo["id"] = that.Db.Insert("wechat", wechatInfo)
// }
// wechatDb = that.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
//
// that.Session("wechatInfo", wechatDb)
// fmt.Println(wechatDb)
// fmt.Println(that.Session("wechatInfo"))
// //that.Display(0, 1)
// that.Display(0, Map{"type": 1, "token": that.SessionId})
//},
//网页签名
//"sign": func(that *Context) {
//
// if that.Req.FormValue("sign_url") == "" {
// that.Display(2, "参数不足")
// return
// }
// signUrl := that.Req.FormValue("sign_url")
// signUrl = "https://hycb.hoteas.com/wxapp"
//
// js := officialAccount.GetJs()
// //js.GetConfig()
// //js := weixin.GetJs()
// cfg1, e := js.GetConfig(signUrl)
// if e != nil {
// that.Display(7, e)
// return
// }
//
// sign := Map{
// "appId": cfg1.AppID,
// "timestamp": cfg1.Timestamp,
// "nonceStr": cfg1.NonceStr,
// "signature": cfg1.Signature,
// }
//
// that.Display(0, sign)
//
//},
"codeh5": func(that *Context) {
auth := h5Program.GetOauth()
//weixin.GetOpenPlatform()
resToken, err := auth.GetUserAccessToken(that.Req.FormValue("code"))
if err != nil {
that.Display(5, "code错误")
return
}
//getUserInfo
userInfo, err := auth.GetUserInfo(resToken.AccessToken, resToken.OpenID, "")
if err != nil {
that.Display(6, "微信个人信息无法获取")
return
}
//wechatInfo := ObjToMap(userInfo)
wechatInfo := Map{
"openid": userInfo.OpenID,
"acttoken": resToken.AccessToken,
"retoken": resToken.RefreshToken,
"appid": that.Config.GetString("wechatAppID"),
"unionid": userInfo.Unionid,
"nickname": userInfo.Nickname,
"avatar": userInfo.HeadImgURL,
}
that.Display(0, wechatInfo)
},
//网页签名
"sign": func(that *Context) {
if that.Req.FormValue("sign_url") == "" {
that.Display(2, "参数不足")
return
}
signUrl := that.Req.FormValue("sign_url")
js := h5Program.GetJs()
cfg1, e := js.GetConfig(signUrl)
if e != nil {
that.Display(7, e)
return
}
sign := Map{
"appId": cfg1.AppID,
"timestamp": cfg1.Timestamp,
"nonceStr": cfg1.NonceStr,
"signature": cfg1.Signature,
}
that.Display(0, sign)
},
}

File diff suppressed because it is too large Load Diff

View File

@ -1,344 +0,0 @@
[
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "idcard",
"strict": false,
"type": ""
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "id",
"strict": true,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "parent_id",
"strict": true,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "status",
"strict": false,
"type": "select"
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "state",
"strict": false,
"type": "select"
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "sex",
"strict": false,
"type": "select"
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "delete",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "lat",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "lng",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "latitude",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "longitude",
"strict": false,
"type": ""
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "index",
"strict": false,
"type": "index"
},
{
"edit": true,
"info": false,
"list": false,
"must": false,
"name": "password",
"strict": false,
"type": "password"
},
{
"edit": true,
"info": false,
"list": false,
"must": false,
"name": "pwd",
"strict": false,
"type": "password"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "info",
"strict": false,
"type": ""
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "version",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "seq",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "sort",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "note",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "description",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "abstract",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "content",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "address",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "full_name",
"strict": false,
"type": ""
},
{
"edit": false,
"info": true,
"list": false,
"must": false,
"name": "create_time",
"strict": true,
"type": "time"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "modify_time",
"strict": true,
"type": "time"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "image",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "img",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "icon",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "avatar",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "file",
"strict": false,
"type": "file"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "age",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "email",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "time",
"strict": false,
"type": "time"
},
{
"edit": false,
"info": true,
"list": false,
"must": false,
"name": "level",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "rule",
"strict": false,
"type": "form"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "table",
"strict": false,
"type": "table"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "table_id",
"strict": false,
"type": "table_id"
}
]

View File

@ -1,344 +0,0 @@
[
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "idcard",
"strict": false,
"type": ""
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "id",
"strict": true,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "parent_id",
"strict": true,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "status",
"strict": false,
"type": "select"
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "state",
"strict": false,
"type": "select"
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "sex",
"strict": false,
"type": "select"
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "delete",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "lat",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "lng",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "latitude",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "longitude",
"strict": false,
"type": ""
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "index",
"strict": false,
"type": "index"
},
{
"edit": true,
"info": false,
"list": false,
"must": false,
"name": "password",
"strict": false,
"type": "password"
},
{
"edit": true,
"info": false,
"list": false,
"must": false,
"name": "pwd",
"strict": false,
"type": "password"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "info",
"strict": false,
"type": ""
},
{
"edit": false,
"info": false,
"list": false,
"must": false,
"name": "version",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "seq",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "sort",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "note",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "description",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "abstract",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "content",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "address",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "full_name",
"strict": false,
"type": ""
},
{
"edit": false,
"info": true,
"list": false,
"must": false,
"name": "create_time",
"strict": true,
"type": "time"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "modify_time",
"strict": true,
"type": "time"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "image",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "img",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "icon",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "avatar",
"strict": false,
"type": "image"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "file",
"strict": false,
"type": "file"
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "age",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": false,
"must": false,
"name": "email",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "time",
"strict": false,
"type": "time"
},
{
"edit": false,
"info": true,
"list": false,
"must": false,
"name": "level",
"strict": false,
"type": ""
},
{
"edit": true,
"info": true,
"list": true,
"must": false,
"name": "rule",
"strict": false,
"type": "form"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "table",
"strict": false,
"type": "table"
},
{
"edit": false,
"info": true,
"list": true,
"must": false,
"name": "table_id",
"strict": false,
"type": "table_id"
}
]

View File

@ -11,33 +11,9 @@
"timeout": 7200
}
},
"codeConfig": [
{
"config": "config/admin.json",
"mode": 0,
"name": "",
"rule": "config/adminRule.json",
"table": "admin"
},
{
"config": "config/app.json",
"mode": 0,
"name": "app",
"rule": "config/appRule.json",
"table": "admin"
}
],
"codeConfig": [],
"crossDomain": "",
"db": {
"mysql": {
"host": "192.168.6.253",
"name": "rfcb",
"password": "dasda8454456",
"port": "3306",
"prefix": "",
"user": "root"
}
},
"db": {},
"defFile": [
"index.html",
"index.htm"
@ -54,9 +30,11 @@
"port": "8081",
"sessionName": "HOTIME",
"smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa",
"smsLogin": "【政企超链接】您的验证码为:{code}请在5分钟内使用切勿将验证码泄露于他人如非本人操作请忽略。",
"smsLogin": "【政策通】您的验证码为:{code}请在5分钟内使用切勿将验证码泄露于他人如非本人操作请忽略。",
"tpt": "tpt",
"wechatAppID": "wx6126460a528a20e5",
"wechatAppSecret": "1dfdd8079414c795950d71bc92d0f1bd",
"wechatMiniAppID": "wx6126460a528a20e5",
"wechatMiniAppSecret": "1dfdd8079414c795950d71bc92d0f1bd",
"wxFilePath": "wxfile/2006/01/02/"
}

View File

@ -2,10 +2,7 @@ package main
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"code.hoteas.com/golang/hotime/example/app"
"strings"
//. "code.hoteas.com/golang/hotime/common"
"fmt"
"time"
@ -16,301 +13,15 @@ func main() {
fmt.Println(date, date.Unix())
//fmt.Println("0123456"[1:7])
appIns := Init("config/config.json")
app.InitApp(appIns)
//a:=Map{}
//a.GetBool()
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
//that.Session("admin_id", 1)
if len(that.RouterString) == 3 {
if that.HandlerStr == "/app/hotime/test" {
that.Session("admin_id", 1)
that.Display(0, that.SessionId)
return true
}
if that.RouterString[1] == "wechat" || that.RouterString[1] == "websocket" {
if appIns.MethodRouter[that.HandlerStr] != nil {
appIns.MethodRouter[that.HandlerStr](that)
return true
}
}
}
if len(that.RouterString) == 2 {
if that.HandlerStr == "/app/proj" && that.Req.Method == "POST" {
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
companyId := ObjToInt(that.Req.FormValue("company_id"))
userId := ObjToInt(that.Req.FormValue("user_id"))
zoneId := ObjToInt(that.Req.FormValue("zone_id"))
channelId := ObjToInt(that.Req.FormValue("channel_id"))
categoryId := ObjToInt(that.Req.FormValue("category_id"))
projId := that.RespData.GetCeilInt("result")
if companyId != 0 {
cdata := Map{"proj_id": projId}
if userId != 0 {
cdata["user_id"] = userId
}
if zoneId != 0 {
cdata["zone_id"] = zoneId
}
if channelId != 0 {
cdata["channel_id"] = channelId
}
that.Db.Update("company", cdata, Map{"id": companyId})
}
projD := Map{}
if categoryId != 0 {
category := that.Db.Get("category", "*", Map{"id": categoryId})
projD["name"] = category.GetString("name")
}
if companyId != 0 {
company := that.Db.Get("company", "*", Map{"id": companyId})
projD["level"] = company.GetString("level")
}
if len(projD) != 0 {
that.Db.Update("proj", projD, Map{"id": projId})
}
}
}
}
}
//查询详情插入
if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" {
adminId := that.Session("admin_id").ToCeilInt()
loc, _ := time.LoadLocation("Asia/Shanghai")
todayTime, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:00", loc)
taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime.Unix(), "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"})
fmt.Println(todayTime.Format("2006-01-02 15:04:05"))
//如果当天还未签到
that.Display(0, taskAdmin)
return true
}
//查询列表插入
if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" {
if that.Req.FormValue("admin_id") == "" {
that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr())
}
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
taskAdmin := that.RespData.GetMap("result").GetSlice("data")
for k, _ := range taskAdmin {
v := taskAdmin.GetMap(k)
v["task"] = that.Db.Get("task", "*", Map{"id": v.GetCeilInt("task_id")})
}
that.RespData["result"] = Map{"count": that.RespData.GetMap("result").GetCeilInt("count"), "data": taskAdmin}
}
}
}
//查询详情插入
if len(that.RouterString) == 3 && strings.Contains(that.HandlerStr, "/app/task_admin") && that.Req.Method == "GET" {
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
taskAdmin := that.RespData.GetMap("result")
taskAdmin["task"] = that.Db.Get("task", "*", Map{"id": taskAdmin.GetCeilInt("task_id")})
taskAdmin["admins"] = that.Db.Select("task", Map{"[><]admin": "admin.id=task.admin_id"}, "*", Map{"task_id": taskAdmin.GetCeilInt("task_id"), "ORDER": "modify_time DESC"})
}
}
}
//编辑详情插入
if len(that.RouterString) == 3 && strings.Contains(that.HandlerStr, "/app/task_admin") && that.Req.Method == "PUT" {
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
taskAdminID := that.RouterString[2]
taskAdmin := that.Db.Get("task_admin", "*", Map{"id": taskAdminID})
taskAdminStatus := taskAdmin.GetCeilInt64("status")
that.Log["task_id"] = taskAdmin.GetCeilInt("task_id")
that.Log["type"] = 4
//执行者,状态为1部分执行不能审批状态
if taskAdminStatus == 1 {
that.Log["name"] = "执行"
taskData := Map{}
taskAdmins := that.Db.Select("task_admin", "*", Map{"AND": Map{"task_id": taskAdmin.GetCeilInt("task_id"), "role": 0}})
for _, v := range taskAdmins {
if v.GetCeilInt("status") != 1 {
taskData["status"] = 4
break
}
}
//全部执行完成,则变更任务为待审批,同时将所有审批者权限设置为待审批,没有执行完成则全部变部分执行完成,审批者不操作
if taskData.GetCeilInt("status") != 4 {
taskData["status"] = 1
that.Db.Update("task_admin", Map{"status": 1}, Map{"AND": Map{"task_id": taskAdmin.GetCeilInt("task_id"), "role": Slice{1, 3}}})
that.Db.Update("task", Map{"status": 1}, Map{"id": taskAdmin.GetCeilInt("task_id")})
} else {
that.Db.Update("task", taskData, Map{"id": taskAdmin.GetCeilInt("task_id")})
}
}
//审批者,状态为2已完成执行部分审批或全部审批状态
if taskAdminStatus == 2 {
that.Log["name"] = "审批"
taskData := Map{}
taskAdmins := that.Db.Select("task_admin", "*", Map{"AND": Map{"task_id": taskAdmin.GetCeilInt("task_id"), "role": Slice{1, 3}}})
for _, v := range taskAdmins {
if v.GetCeilInt("status") != 2 {
taskData["status"] = 5
break
}
}
//全部审批完成,则变更任务为已审批,同时将所有审批者权限设置为待审批,没有执行完成则全部变部分执行完成,审批者不操作
if taskData.GetCeilInt("status") != 5 {
taskData["status"] = 2
that.Db.Update("task_admin", Map{"status": 2}, Map{"AND": Map{"task_id": taskAdmin.GetCeilInt("task_id")}})
that.Db.Update("task", Map{"status": 2}, Map{"id": taskAdmin.GetCeilInt("task_id")})
} else {
that.Db.Update("task", taskData, Map{"id": taskAdmin.GetCeilInt("task_id")})
}
}
//审批者,状态为3驳回状态则将所有人状态都设置为驳回状态
if taskAdminStatus == 3 {
that.Log["name"] = "驳回"
that.Db.Update("task_admin", Map{"status": 3}, Map{"AND": Map{"task_id": taskAdmin.GetCeilInt("task_id")}})
that.Db.Update("task", Map{"status": 3}, Map{"id": taskAdmin.GetCeilInt("task_id")})
}
}
}
}
if that.HandlerStr == "/app/task" && that.Req.Method == "POST" {
that.RespFunc = func() {
if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 {
executorData := ObjToMap(that.Req.FormValue("executor_data"))
approverData := ObjToMap(that.Req.FormValue("approver_data"))
readerData := ObjToMap(that.Req.FormValue("reader_data"))
taskId := that.RespData.GetCeilInt("result")
task := that.Db.Get("task", "admin_id,name,create_time,modify_time,state,company_id,proj_id,reward,reward_money,reward_description,type,zone_id,extend_data,city_id,status,user_id,zone_id,out_tag_id,visit_tag_id,car_id,seal_tag_id,time_tag_id", Map{"id": taskId})
task["task_id"] = taskId
that.Log["task_id"] = taskId
adminId := task.GetCeilInt64("admin_id")
adminMap := Map{}
if approverData != nil {
admins := approverData.GetMap("admin")
for k, _ := range admins {
admin := admins.GetMap(k)
if admin == nil {
continue
}
task["admin_id"] = admin.GetCeilInt64("id")
adminMap[task.GetString("admin_id")] = task["admin_id"]
task["role"] = 1
that.Db.Insert("task_admin", task)
}
}
if executorData != nil {
admins := executorData.GetMap("admin")
for k, _ := range admins {
admin := admins.GetMap(k)
if admin == nil {
continue
}
task["admin_id"] = admin.GetCeilInt64("id")
//转换为执行&审批者
if adminMap[task.GetString("admin_id")] != nil {
that.Db.Update("task_admin", Map{"role": 3}, Map{"AND": Map{"admin_id": task["admin_id"], "task_id": taskId}})
} else {
adminMap[task.GetString("admin_id")] = task["admin_id"]
task["role"] = 0
that.Db.Insert("task_admin", task)
}
}
}
if readerData != nil {
admins := readerData.GetMap("admin")
for k, _ := range admins {
admin := admins.GetMap(k)
if admin == nil {
continue
}
task["admin_id"] = admin.GetCeilInt64("id")
//已经为执行和审批者不再创建监督者
if adminMap[task.GetString("admin_id")] == nil {
task["admin_id"] = adminId
task["role"] = 2
that.Db.Insert("task_admin", task)
}
}
}
if task.GetCeilInt("type") != 0 {
//that.Db.Update("task",Map{"status":2},Map{"id":taskId})
if executorData == nil {
task["admin_id"] = adminId
task["role"] = 3
//task["status"]=2
that.Db.Insert("task_admin", task)
} else {
//that.Db.Update("task_admin",Map{"status":2},Map{"task_id":taskId})
}
admin := that.Db.Get("admin", "org_id", Map{"id": adminId})
org := that.Db.Get("org", "index", Map{"id": admin.GetCeilInt64("org_id")})
orgstr := strings.Split(org.GetString("index"), ",")
orgs := Slice{}
for _, v := range orgstr {
if v != "" && v != ObjToStr(admin.GetCeilInt64("org_id")) {
orgs = append(orgs, v)
}
}
if len(orgs) != 0 {
admins := that.Db.Select("admin", "id", Map{"org_id": orgs})
for _, v := range admins {
task["admin_id"] = v.GetCeilInt("id")
task["role"] = 2
//task["status"]=2
that.Db.Insert("task_admin", task)
}
}
}
}
}
}
return isFinished
})
//appIns.Db.Action(func(db db.HoTimeDB) (isSuccess bool) {
// return isSuccess
//})
appIns.Run(Router{
"app": app.Project,
})

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.basic-form-info .el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload{height:60px;width:60px;background:#eee;overflow:hidden}.not-show-tab-label .el-tabs__header{display:none}.el-descriptions__body{background:#f0f0f0}.not-show-tab-search{display:none}.el-table__body-wrapper{margin-bottom:4px;padding-bottom:2px}.el-table__body-wrapper::-webkit-scrollbar{width:8px;height:8px}.el-table__body-wrapper::-webkit-scrollbar-track{border-radius:10px;-webkit-box-shadow:inset 0 0 6px hsla(0,0%,93.3%,.3);background-color:#eee}.el-table__body-wrapper::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(145,143,143,.3);background-color:#918f8f}

View File

@ -1 +0,0 @@
.not-show-tab-label .el-tabs__header{display:none}.el-descriptions__body{background:#f0f0f0}.not-show-tab-search{display:none}.el-table__body-wrapper{margin-bottom:4px;padding-bottom:2px}.el-table__body-wrapper::-webkit-scrollbar{width:8px;height:8px}.el-table__body-wrapper::-webkit-scrollbar-track{border-radius:10px;-webkit-box-shadow:inset 0 0 6px hsla(0,0%,93.3%,.3);background-color:#eee}.el-table__body-wrapper::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(145,143,143,.3);background-color:#918f8f}

View File

@ -1 +0,0 @@
.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.el-upload img[data-v-3a110a5c]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-3a110a5c]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.basic-form .el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload,.el-upload-list--picture-card .el-upload-list__item{height:60px;width:60px}.el-upload-list__item.is-success.focusing .el-icon-close-tip{display:none!important}.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.file-upload .el-upload{background:transparent;width:100%;height:auto;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-upload .el-upload .el-button{margin-right:10px}.el-upload img[data-v-d9262c54]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-d9262c54]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
.not-show-tab-label .el-tabs__header{display:none}.el-descriptions__body{background:#f0f0f0}.not-show-tab-search{display:none}.el-table__body-wrapper{margin-bottom:4px;padding-bottom:2px}.el-table__body-wrapper::-webkit-scrollbar{width:8px;height:8px}.el-table__body-wrapper::-webkit-scrollbar-track{border-radius:10px;-webkit-box-shadow:inset 0 0 6px hsla(0,0%,93.3%,.3);background-color:#eee}.el-table__body-wrapper::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(145,143,143,.3);background-color:#918f8f}

View File

@ -1 +0,0 @@
body[data-v-581864d3],dd[data-v-581864d3],dl[data-v-581864d3],form[data-v-581864d3],h1[data-v-581864d3],h2[data-v-581864d3],h3[data-v-581864d3],h4[data-v-581864d3],h5[data-v-581864d3],h6[data-v-581864d3],html[data-v-581864d3],ol[data-v-581864d3],p[data-v-581864d3],pre[data-v-581864d3],tbody[data-v-581864d3],textarea[data-v-581864d3],tfoot[data-v-581864d3],thead[data-v-581864d3],ul[data-v-581864d3]{margin:0;font-size:14px;font-family:Microsoft YaHei}dl[data-v-581864d3],ol[data-v-581864d3],ul[data-v-581864d3]{padding:0}li[data-v-581864d3]{list-style:none}input[data-v-581864d3]{border:none;outline:none;font-family:Microsoft YaHei;background-color:#fff}a[data-v-581864d3]{font-family:Microsoft YaHei;text-decoration:none}[data-v-581864d3]{margin:0;padding:0}.login[data-v-581864d3]{position:relative;width:100%;height:100%;background-color:#353d56}.login-item[data-v-581864d3]{position:absolute;top:calc(50% - 244px);left:calc(50% - 244px);width:488px;height:488px;padding:80px 0 152px 0;box-sizing:border-box;background-size:468px 468px}.login-item .left-title[data-v-581864d3]{display:inline-block;width:236px;height:100%;border-right:2px solid #88919e;text-align:center;padding-top:68px;box-sizing:border-box}.login-item .left-title p[data-v-581864d3]{font-size:30px;line-height:50px;color:#fff}.login-item .right-content[data-v-581864d3]{display:inline-block;vertical-align:top;padding-left:42px;box-sizing:border-box}.login-item .right-content .login-title[data-v-581864d3]{font-size:16px;color:#fff}.errorMsg[data-v-581864d3]{width:100%;height:34px;line-height:34px;color:red;font-size:14px;overflow:hidden}.login-item .right-content .inputWrap[data-v-581864d3]{width:204px;height:36px;line-height:36px;color:#99a3b2;font-size:14px;border-bottom:3px solid #98a2b1;margin-bottom:10px}.login-item .right-content .inputWrap input[data-v-581864d3]{background-color:transparent;color:#99a3b2}.login-btn[data-v-581864d3]{width:88px;height:36px;text-align:center;line-height:36px;font-size:14px;color:#fff;background-color:#4f619b;border-radius:18px;margin-top:60px;cursor:pointer}

View File

@ -1 +0,0 @@
.left-nav-home-bar{background:#2c3759!important}.left-nav-home-bar,.left-nav-home-bar i{color:#fff!important}.el-submenu .el-menu-item{height:40px;line-height:40px}.el-menu .el-submenu__title{height:46px;line-height:46px}.left-nav-home-bar i{margin-bottom:6px!important}.el-menu-item-group__title{padding:0 0 0 20px}.head-left[data-v-cf253d38],.head-right[data-v-cf253d38]{display:flex;justify-content:center;flex-direction:column}.head-right[data-v-cf253d38]{align-items:flex-end}.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.el-upload img[data-v-3a110a5c]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-3a110a5c]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.el-upload img[data-v-3a110a5c]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-3a110a5c]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.basic-form .el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload,.el-upload-list--picture-card .el-upload-list__item{height:60px;width:60px}.el-upload-list__item.is-success.focusing .el-icon-close-tip{display:none!important}.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.file-upload .el-upload{background:transparent;width:100%;height:auto;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-upload .el-upload .el-button{margin-right:10px}.el-upload img[data-v-d9262c54]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-d9262c54]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
body[data-v-581864d3],dd[data-v-581864d3],dl[data-v-581864d3],form[data-v-581864d3],h1[data-v-581864d3],h2[data-v-581864d3],h3[data-v-581864d3],h4[data-v-581864d3],h5[data-v-581864d3],h6[data-v-581864d3],html[data-v-581864d3],ol[data-v-581864d3],p[data-v-581864d3],pre[data-v-581864d3],tbody[data-v-581864d3],textarea[data-v-581864d3],tfoot[data-v-581864d3],thead[data-v-581864d3],ul[data-v-581864d3]{margin:0;font-size:14px;font-family:Microsoft YaHei}dl[data-v-581864d3],ol[data-v-581864d3],ul[data-v-581864d3]{padding:0}li[data-v-581864d3]{list-style:none}input[data-v-581864d3]{border:none;outline:none;font-family:Microsoft YaHei;background-color:#fff}a[data-v-581864d3]{font-family:Microsoft YaHei;text-decoration:none}[data-v-581864d3]{margin:0;padding:0}.login[data-v-581864d3]{position:relative;width:100%;height:100%;background-color:#353d56}.login-item[data-v-581864d3]{position:absolute;top:calc(50% - 244px);left:calc(50% - 244px);width:488px;height:488px;padding:80px 0 152px 0;box-sizing:border-box;background-size:468px 468px}.login-item .left-title[data-v-581864d3]{display:inline-block;width:236px;height:100%;border-right:2px solid #88919e;text-align:center;padding-top:68px;box-sizing:border-box}.login-item .left-title p[data-v-581864d3]{font-size:30px;line-height:50px;color:#fff}.login-item .right-content[data-v-581864d3]{display:inline-block;vertical-align:top;padding-left:42px;box-sizing:border-box}.login-item .right-content .login-title[data-v-581864d3]{font-size:16px;color:#fff}.errorMsg[data-v-581864d3]{width:100%;height:34px;line-height:34px;color:red;font-size:14px;overflow:hidden}.login-item .right-content .inputWrap[data-v-581864d3]{width:204px;height:36px;line-height:36px;color:#99a3b2;font-size:14px;border-bottom:3px solid #98a2b1;margin-bottom:10px}.login-item .right-content .inputWrap input[data-v-581864d3]{background-color:transparent;color:#99a3b2}.login-btn[data-v-581864d3]{width:88px;height:36px;text-align:center;line-height:36px;font-size:14px;color:#fff;background-color:#4f619b;border-radius:18px;margin-top:60px;cursor:pointer}

View File

@ -1 +0,0 @@
.left-nav-home-bar{background:#2c3759!important}.left-nav-home-bar,.left-nav-home-bar i{color:#fff!important}.el-submenu .el-menu-item{height:40px;line-height:40px}.el-menu .el-submenu__title{height:46px;line-height:46px}.left-nav-home-bar i{margin-bottom:6px!important}.el-menu-item-group__title{padding:0 0 0 20px}.head-left[data-v-cf253d38],.head-right[data-v-cf253d38]{display:flex;justify-content:center;flex-direction:column}.head-right[data-v-cf253d38]{align-items:flex-end}.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.el-upload img[data-v-3a110a5c]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-3a110a5c]{font-size:40px;margin:30% 31%;display:block}

View File

@ -1 +0,0 @@
.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.basic-form-info .el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload{height:60px;width:60px;background:#eee;overflow:hidden}.not-show-tab-label .el-tabs__header{display:none}.el-descriptions__body{background:#f0f0f0}.not-show-tab-search{display:none}.el-table__body-wrapper{margin-bottom:4px;padding-bottom:2px}.el-table__body-wrapper::-webkit-scrollbar{width:8px;height:8px}.el-table__body-wrapper::-webkit-scrollbar-track{border-radius:10px;-webkit-box-shadow:inset 0 0 6px hsla(0,0%,93.3%,.3);background-color:#eee}.el-table__body-wrapper::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(145,143,143,.3);background-color:#918f8f}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,75 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>地面图片叠加层</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<style>
body,
html,
#container {
overflow: hidden;
width: 100%;
height: 100%;
margin: 0;
font-family: "微软雅黑";
}
</style>
<script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=您的密钥"></script>
</head>
<body>
<div id="container"></div>
</body>
</html>
<script>
var map = new BMapGL.Map('container');
map.centerAndZoom(new BMapGL.Point(117.200, 36.2437), 18);
map.enableScrollWheelZoom(true);
map.setTilt(45);
map.setDisplayOptions({
poiText: false, // 隐藏poi标注
poiIcon: false, // 隐藏poi图标
building: false // 隐藏楼块
});
map.clearOverlays();//清除地图覆盖物
//思路:利用行政区划点的集合与外围自定义东南西北形成一个环形遮罩层
//1.获取选中行政区划边框点的集合rs.boundaries[0]
var strs = new Array();
var ENWS = "";
for (var i=0;i<strs.length;i++) {
ENWS += strs[i] + ";"
}
//2.自定义外围边框点的集合
var E_JW = "170.672126, 39.623555;"; //东
var EN_JW = "170.672126, 81.291804;"; //东北角
var N_JW = "105.913641, 81.291804;"; //北
var NW_JW = "-169.604276, 81.291804;"; //西北角
var W_JW = "-169.604276, 38.244136;"; //西
var WS_JW = "-169.604276, -68.045308;"; //西南角
var S_JW = "114.15563, -68.045308;"; //南
var SE_JW = "170.672126, -68.045308 ;"; //东南角
//3.添加环形遮罩层
var ply1 = new BMapGL.Polygon(ENWS + E_JW + SE_JW + S_JW + WS_JW + W_JW + NW_JW + N_JW + EN_JW + E_JW, {strokeColor:"#000",strokeOpacity:0.1,fillColor:"#000",fillOpacity:"0.9"}); //建立多边形覆盖物
map.addOverlay(ply1);//遮罩物是半透明的,如果需要纯色可以多添加几层
map.addOverlay(ply1);//遮罩物是半透
map.addOverlay(ply1);//遮罩物是半透
var pStart = new BMapGL.Point(117.19635, 36.24093);
var pEnd = new BMapGL.Point(117.20350, 36.24764);
var bounds = new BMapGL.Bounds(new BMapGL.Point(pStart.lng, pEnd.lat), new BMapGL.Point(pEnd.lng, pStart.lat));
var imgOverlay = new BMapGL.GroundOverlay(bounds, {
type: 'image',
url: '/jsdemo/img/shouhuimap.png',
opacity: 1
});
map.addOverlay(imgOverlay);
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,7 +0,0 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title></title><style>body{
margin: 0px;
}</style><link href="css/chunk-25a9c3c8.172952f0.css" rel="prefetch"><link href="css/chunk-368da0af.c460e209.css" rel="prefetch"><link href="css/chunk-550dc75a.993d1e17.css" rel="prefetch"><link href="css/chunk-69c477a2.26f55e87.css" rel="prefetch"><link href="css/chunk-99497f66.26cbd584.css" rel="prefetch"><link href="css/chunk-c3e0f2d6.f9cf649c.css" rel="prefetch"><link href="js/chunk-25a9c3c8.b8753e3d.js" rel="prefetch"><link href="js/chunk-368da0af.ce39d904.js" rel="prefetch"><link href="js/chunk-550dc75a.d9288626.js" rel="prefetch"><link href="js/chunk-5b2ead63.af868ff8.js" rel="prefetch"><link href="js/chunk-69c477a2.dc1bdb5d.js" rel="prefetch"><link href="js/chunk-99497f66.664e5562.js" rel="prefetch"><link href="js/chunk-a2efa204.8a8a537a.js" rel="prefetch"><link href="js/chunk-c3e0f2d6.b9a0f420.js" rel="prefetch"><link href="js/chunk-d83135a2.4680b3b0.js" rel="prefetch"><link href="css/app.6e46e897.css" rel="preload" as="style"><link href="js/app.1a0b9cd0.js" rel="preload" as="script"><link href="css/app.6e46e897.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but hotime doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/app.1a0b9cd0.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-368da0af"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return r}),n.d(e,"d",function(){return i}),n.d(e,"b",function(){return s}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"f",function(){return d}),n.d(e,"g",function(){return l});var e=n("b0c0"),a=n("b775"),e=n("4328"),o=n.n(e);function r(t,e){return Object(a.b)({url:t,method:"GET",params:e})}function i(t,e){return Object(a.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(a.b)({url:t,method:"DELETE",data:o.a.stringify(e)})}function c(t,e){return Object(a.b)({url:t,method:"PUT",data:o.a.stringify(e)})}function u(t,e){return Object(a.b)({url:t,method:"POST",data:o.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(a.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}function l(n,o){var r=document.createElement("input");r.type="file";r.addEventListener("change",function(){var t,e=r.files[0];0!==e.size?((t=new FormData).append("file",e,e.name),t.append("org_id",n.org_id),Object(a.b)({url:"admin/company_inout/upload",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t}).then(o)):o(null,"文件错误",r)}),r.click()}},"578a":function(t,e,n){"use strict";n.r(e);n("b0c0");var i=n("f2bf");Object(i.N)("data-v-581864d3");var s={class:"login",style:{width:"100%",height:"100vh"}},c={class:"login-item"},u={class:"left-title"},d={class:"right-content"},l=Object(i.o)("p",{class:"login-title"},"登录",-1),f={style:{height:"40px"}},p={class:"inputWrap"},b=Object(i.q)(" 账号:"),m={class:"inputWrap"},h=Object(i.q)(" 密码:");Object(i.L)();var o=n("2934"),r={name:"Login",data:function(){return{showLog:!1,showLogInfo:"",label:"HoTime DashBoard",form:{name:"",password:""}}},methods:{login:function(){var e=this;if(""==this.name||""==this.password)return this.showLogInfo="参数不足!",void(this.showLog=!0);Object(o.a)(window.Hotime.data.name+"/hotime/login",e.form).then(function(t){return 0!=t.status?(e.showLogInfo=t.error.msg,void(e.showLog=!0)):void e.$router.push({path:"/"})})}},mounted:function(){this.label=window.Hotime.data.label}};n("8d39");r.render=function(t,e,n,o,r,a){return Object(i.K)(),Object(i.n)("div",s,[Object(i.o)("div",c,[Object(i.o)("div",u,[Object(i.o)("p",null,Object(i.X)(r.label),1)]),Object(i.o)("div",d,[l,Object(i.o)("div",f,[Object(i.jb)(Object(i.o)("p",{class:"errorMsg"},Object(i.X)(r.showLogInfo),513),[[i.fb,r.showLog]])]),Object(i.o)("p",p,[b,Object(i.jb)(Object(i.o)("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=function(t){return r.form.name=t}),class:"accountVal"},null,512),[[i.eb,r.form.name]])]),Object(i.o)("p",m,[h,Object(i.jb)(Object(i.o)("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=function(t){return r.form.password=t}),class:"passwordVal"},null,512),[[i.eb,r.form.password]])]),Object(i.o)("p",{class:"login-btn",onClick:e[2]||(e[2]=function(){return a.login&&a.login.apply(a,arguments)})},"登录")])])])},r.__scopeId="data-v-581864d3";e.default=r},"85dc":function(t,e,n){},"8d39":function(t,e,n){"use strict";n("85dc")},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var o=n("d3b7"),r=n("bc3a"),o=n.n(r),r=n("4328"),a=n.n(r),i=n("7864"),s=n("56d7"),c="/";o.a.defaults.withCredentials=!0,o.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";o=o.a.create({baseURL:c,timeout:2e5});o.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return a.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),o.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(i.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void s.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=o}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6feafdad"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return r}),n.d(e,"d",function(){return i}),n.d(e,"b",function(){return s}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"f",function(){return d}),n.d(e,"g",function(){return l});var e=n("b0c0"),a=n("b775"),e=n("4328"),o=n.n(e);function r(t,e){return Object(a.b)({url:t,method:"GET",params:e})}function i(t,e){return Object(a.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(a.b)({url:t,method:"DELETE",data:o.a.stringify(e)})}function c(t,e){return Object(a.b)({url:t,method:"PUT",data:o.a.stringify(e)})}function u(t,e){return Object(a.b)({url:t,method:"POST",data:o.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(a.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}function l(n,o){var r=document.createElement("input");r.type="file";r.addEventListener("change",function(){var t,e=r.files[0];0!==e.size?((t=new FormData).append("file",e,e.name),t.append("org_id",n.org_id),Object(a.b)({url:"admin/company_inout/upload",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t}).then(o)):o(null,"文件错误",r)}),r.click()}},"40a7":function(t,e,n){},"578a":function(t,e,n){"use strict";n.r(e);n("b0c0");var i=n("9f9f");Object(i.N)("data-v-581864d3");var s={class:"login",style:{width:"100%",height:"100vh"}},c={class:"login-item"},u={class:"left-title"},d={class:"right-content"},l=Object(i.o)("p",{class:"login-title"},"登录",-1),f={style:{height:"40px"}},p={class:"inputWrap"},b=Object(i.q)(" 账号:"),m={class:"inputWrap"},h=Object(i.q)(" 密码:");Object(i.L)();var o=n("2934"),r={name:"Login",data:function(){return{showLog:!1,showLogInfo:"",label:"HoTime DashBoard",form:{name:"",password:""}}},methods:{login:function(){var e=this;if(""==this.name||""==this.password)return this.showLogInfo="参数不足!",void(this.showLog=!0);Object(o.a)(window.Hotime.data.name+"/hotime/login",e.form).then(function(t){return 0!=t.status?(e.showLogInfo=t.error.msg,void(e.showLog=!0)):void e.$router.push({path:"/"})})}},mounted:function(){this.label=window.Hotime.data.label}};n("8d39");r.render=function(t,e,n,o,r,a){return Object(i.K)(),Object(i.n)("div",s,[Object(i.o)("div",c,[Object(i.o)("div",u,[Object(i.o)("p",null,Object(i.X)(r.label),1)]),Object(i.o)("div",d,[l,Object(i.o)("div",f,[Object(i.jb)(Object(i.o)("p",{class:"errorMsg"},Object(i.X)(r.showLogInfo),513),[[i.fb,r.showLog]])]),Object(i.o)("p",p,[b,Object(i.jb)(Object(i.o)("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=function(t){return r.form.name=t}),class:"accountVal"},null,512),[[i.eb,r.form.name]])]),Object(i.o)("p",m,[h,Object(i.jb)(Object(i.o)("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=function(t){return r.form.password=t}),class:"passwordVal"},null,512),[[i.eb,r.form.password]])]),Object(i.o)("p",{class:"login-btn",onClick:e[2]||(e[2]=function(){return a.login&&a.login.apply(a,arguments)})},"登录")])])])},r.__scopeId="data-v-581864d3";e.default=r},"8d39":function(t,e,n){"use strict";n("40a7")},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var o=n("d3b7"),r=n("bc3a"),o=n.n(r),r=n("4328"),a=n.n(r),i=n("2bea"),s=n("56d7"),c="/";o.a.defaults.withCredentials=!0,o.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";o=o.a.create({baseURL:c,timeout:2e5});o.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return a.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),o.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(i.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void s.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=o}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a2efa204"],{1:function(t,e){},"159b":function(t,e,n){var r,a=n("da84"),i=n("fdbc"),o=n("17c2"),u=n("9112");for(r in i){var c=a[r],c=c&&c.prototype;if(c&&c.forEach!==o)try{u(c,"forEach",o)}catch(t){c.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,n=n("a640")("forEach");t.exports=n?[].forEach:function(t){return r(this,t,1<arguments.length?arguments[1]:void 0)}},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"d",function(){return o}),n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return s}),n.d(e,"f",function(){return f}),n.d(e,"g",function(){return d});var e=n("b0c0"),i=n("b775"),e=n("4328"),r=n.n(e);function a(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function o(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function u(t,e){return Object(i.b)({url:t,method:"DELETE",data:r.a.stringify(e)})}function c(t,e){return Object(i.b)({url:t,method:"PUT",data:r.a.stringify(e)})}function s(t,e){return Object(i.b)({url:t,method:"POST",data:r.a.stringify(e)})}function f(t){var e=new FormData;return e.append("file",t,t.name),Object(i.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}function d(n,r){var a=document.createElement("input");a.type="file";a.addEventListener("change",function(){var t,e=a.files[0];0!==e.size?((t=new FormData).append("file",e,e.name),t.append("org_id",n.org_id),Object(i.b)({url:"admin/company_inout/upload",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t}).then(r)):r(null,"文件错误",a)}),a.click()}},"83c5":function(t,e,n){"use strict";n("159b");e.a={list:{},constructor:function(){this.list={}},$on:function(t,e){this.list[t]=this.list[t]||[],this.list[t].push(e)},$emit:function(t,e){this.list[t]&&this.list[t].forEach(function(t){t(e)})},$off:function(t){this.list[t]&&delete this.list[t]}}},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r(function(){n.call(null,e||function(){throw 1},1)})}},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("d3b7"),a=n("bc3a"),r=n.n(a),a=n("4328"),i=n.n(a),o=n("2bea"),u=n("56d7"),c="/";r.a.defaults.withCredentials=!0,r.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";r=r.a.create({baseURL:c,timeout:2e5});r.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return i.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),r.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(o.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void u.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=r}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a2efa204"],{1:function(t,e){},"159b":function(t,e,n){var r,a=n("da84"),i=n("fdbc"),o=n("17c2"),u=n("9112");for(r in i){var c=a[r],c=c&&c.prototype;if(c&&c.forEach!==o)try{u(c,"forEach",o)}catch(t){c.forEach=o}}},"17c2":function(t,e,n){"use strict";var r=n("b727").forEach,n=n("a640")("forEach");t.exports=n?[].forEach:function(t){return r(this,t,1<arguments.length?arguments[1]:void 0)}},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"d",function(){return o}),n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return s}),n.d(e,"f",function(){return f}),n.d(e,"g",function(){return d});var e=n("b0c0"),i=n("b775"),e=n("4328"),r=n.n(e);function a(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function o(t,e){return Object(i.b)({url:t,method:"GET",params:e})}function u(t,e){return Object(i.b)({url:t,method:"DELETE",data:r.a.stringify(e)})}function c(t,e){return Object(i.b)({url:t,method:"PUT",data:r.a.stringify(e)})}function s(t,e){return Object(i.b)({url:t,method:"POST",data:r.a.stringify(e)})}function f(t){var e=new FormData;return e.append("file",t,t.name),Object(i.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}function d(n,r){var a=document.createElement("input");a.type="file";a.addEventListener("change",function(){var t,e=a.files[0];0!==e.size?((t=new FormData).append("file",e,e.name),t.append("org_id",n.org_id),Object(i.b)({url:"admin/company_inout/upload",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:t}).then(r)):r(null,"文件错误",a)}),a.click()}},"83c5":function(t,e,n){"use strict";n("159b");e.a={list:{},constructor:function(){this.list={}},$on:function(t,e){this.list[t]=this.list[t]||[],this.list[t].push(e)},$emit:function(t,e){this.list[t]&&this.list[t].forEach(function(t){t(e)})},$off:function(t){this.list[t]&&delete this.list[t]}}},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r(function(){n.call(null,e||function(){throw 1},1)})}},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("d3b7"),a=n("bc3a"),r=n.n(a),a=n("4328"),i=n.n(a),o=n("7864"),u=n("56d7"),c="/";r.a.defaults.withCredentials=!0,r.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";r=r.a.create({baseURL:c,timeout:2e5});r.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return i.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),r.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(o.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void u.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=r}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
go.mod
View File

@ -3,16 +3,12 @@ module code.hoteas.com/golang/hotime
go 1.16
require (
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99 // indirect
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13 // indirect
github.com/garyburd/redigo v1.6.3
github.com/go-sql-driver/mysql v1.6.0
github.com/mattn/go-sqlite3 v1.14.12
github.com/silenceper/wechat v1.2.6
github.com/silenceper/wechat/v2 v2.1.2
github.com/sirupsen/logrus v1.8.1
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d
)

21
go.sum
View File

@ -1,11 +1,5 @@
github.com/astaxie/beego v1.7.1/go.mod h1:0R4++1tUqERR0WYFWdfkcrsyoVBCG4DgpDGokT3yb+U=
github.com/bradfitz/gomemcache v0.0.0-20160117192205-fb1f79c6b65a/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0=
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99 h1:K62Lb6bsgLOB++z/VAvRvtiEBdNCuMfmQGTGGWMdPpM=
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99/go.mod h1:9+sJ9zvvkXC5sPjPEZM3Jpb9n2Q2VtcrGZly0UHYF5I=
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13 h1:c1vUDbnwvu5d2ucfzXvMzBWzeu5IxPvtESOFPl3CieA=
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13/go.mod h1:XEYt99iTxMqkv+gW85JX/DdUINHUe43Sbe5AtqSaDAQ=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -14,29 +8,21 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/garyburd/redigo v1.6.3 h1:HCeeRluvAgMusMomi1+6Y5dmFOdYV/JzoRrrbFlkGIc=
github.com/garyburd/redigo v1.6.3/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw=
github.com/gin-gonic/gin v1.1.4/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/golang/protobuf v0.0.0-20161117033126-8ee79997227b/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gomodule/redigo v1.8.1/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc=
github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739/go.mod h1:zUx1mhth20V3VKgL5jbd1BSQcW4Fy6Qs4PZvQwRFwzM=
github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0=
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/silenceper/wechat v1.2.6 h1:FED3ko2yD96YD153xIV0I0bDjII4GxWaggjsYKdjQQc=
github.com/silenceper/wechat v1.2.6/go.mod h1:7Wf0sCqQgJG65zCnl4TcDFk2XYxRCfqwQjg0Cf/lKeM=
github.com/silenceper/wechat/v2 v2.1.2 h1:+QfIMiYfwST2ZloTwmYp0O0p5Y1LYRZxfLWfMuSE30k=
github.com/silenceper/wechat/v2 v2.1.2/go.mod h1:0OprxYCCp2CZAKw06BBlnaczInTk2KxOLsKeiopshGg=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
@ -56,10 +42,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20191125084936-ffdde1057850/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -71,13 +55,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d h1:+Z31q68nGNYelwR3t5pTQ0qjB8zCo5fG4eYc9r972h8=
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d/go.mod h1:HuIcE5yEmuAHBXNX5U4KUQRCki6sXCbLjPauW+ppvI0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v8 v8.18.1/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=
gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=