|
@@ -17,6 +17,7 @@ import (
|
|
|
"jy/src/jfw/jyutil"
|
|
|
"jy/src/jfw/site/jySchool"
|
|
|
"math/rand"
|
|
|
+ "regexp"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -82,14 +83,14 @@ func (nIndex *NewIndex) NewIndex() error {
|
|
|
if userId != "" {
|
|
|
nickname, vipType := gconv.String(sessVal["userName"]), "注册用户"
|
|
|
var endTime int64
|
|
|
+ //来源于接口/user/getSimpleData
|
|
|
+ phone, _ := sessVal["phone"].(string)
|
|
|
+ nickname, _ = common.If(sessVal["s_nickname"] != nil, sessVal["s_nickname"], sessVal["app_name"]).(string)
|
|
|
if nickname == "" {
|
|
|
- nickname = gconv.String(sessVal["s_nickname"])
|
|
|
- }
|
|
|
- if nickname == "" {
|
|
|
- nickname = gconv.String(sessVal["s_jyname"])
|
|
|
- }
|
|
|
- if nickname == "" {
|
|
|
- nickname = gconv.String(sessVal["phone"])
|
|
|
+ var PhoneReg = regexp.MustCompile(`^(100\d{8}|1[3-9]\d{9})$`)
|
|
|
+ if PhoneReg.MatchString(phone) {
|
|
|
+ nickname = string(phone[0:3]) + "****" + string(phone[(len(phone)-4):])
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
powerRes := config.Middleground.PowerCheckCenter.Check("10000", gconv.String(sessVal["mgoUserId"]), gconv.Int64(sessVal["base_user_id"]), gconv.Int64(sessVal["accountId"]), gconv.Int64(sessVal["entId"]), gconv.Int64(sessVal["positionType"]), gconv.Int64(sessVal["positionId"]))
|