|
@@ -8,7 +8,6 @@ import (
|
8
|
8
|
"crypto/md5"
|
9
|
9
|
"encoding/json"
|
10
|
10
|
"fmt"
|
11
|
|
- "github.com/astaxie/beego"
|
12
|
11
|
"github.com/jinzhu/gorm"
|
13
|
12
|
"strconv"
|
14
|
13
|
"strings"
|
|
@@ -1992,7 +1991,6 @@ func (this *NewDialysisApiController) LoginOut() {
|
1992
|
1991
|
this.Ctx.SetCookie("logout_cookie", "1")
|
1993
|
1992
|
this.Ctx.SetCookie("token_cookie", "")
|
1994
|
1993
|
id, _ := this.GetInt64("id")
|
1995
|
|
- fmt.Println("id------------------------------------------", id)
|
1996
|
1994
|
loginLog := models.SgjUserAdminLoginLog{
|
1997
|
1995
|
AdminUserId: id,
|
1998
|
1996
|
OrgId: 0,
|
|
@@ -2361,18 +2359,16 @@ func (this *NewDialysisApiController) GetCurrentOrg() {
|
2361
|
2359
|
nowTime := time.Now().Unix()
|
2362
|
2360
|
adminInfo := this.GetMobileAdminUserInfo()
|
2363
|
2361
|
orgId := adminInfo.Org.Id
|
2364
|
|
- fxKey := beego.AppConfig.String("fxtokenkey")
|
2365
|
|
- stringA := fmt.Sprintf("org_id=%d&time=%d", orgId, nowTime)
|
2366
|
2362
|
|
|
2363
|
+ var key = "kN*5&AHqLP7&IGRKvHoElJm*2YY6Nw*QSScJ4ff&DH&ofGnbfQIks1A1NT9AbIDB"
|
|
2364
|
+ stringA := fmt.Sprintf("org_id=%d&time=%d", orgId, nowTime)
|
2367
|
2365
|
data := []byte(stringA)
|
2368
|
2366
|
has := md5.Sum(data)
|
2369
|
2367
|
md5str := fmt.Sprintf("%x", has)
|
2370
|
|
- stringB := fmt.Sprintf("string=%s&key=%s", md5str, fxKey)
|
2371
|
|
-
|
|
2368
|
+ stringB := fmt.Sprintf("string=%s&key=%s", md5str, key)
|
2372
|
2369
|
data = []byte(stringB)
|
2373
|
2370
|
has = md5.Sum(data)
|
2374
|
2371
|
signToken := fmt.Sprintf("%x", has)
|
2375
|
|
-
|
2376
|
2372
|
name, err := service.GetOrgName(orgId)
|
2377
|
2373
|
//var fxlink = signToken + fmt.Sprintf("&fxtoken=%s&fxorgid=%d×tamp=%d&fxadmin=%d", signToken, orgId, nowTime, name.Creator)
|
2378
|
2374
|
//fmt.Println(fxlink)
|