Browse Source

Merge branch 'feature/v4.8.83' into dev/v4.8.83_rjj

renjiaojiao 1 year ago
parent
commit
6c2ae65645
2 changed files with 9 additions and 8 deletions
  1. 8 7
      src/jfw/front/index.go
  2. 1 1
      src/web/templates/pc/template/index/user-info-card.html

+ 8 - 7
src/jfw/front/index.go

@@ -77,16 +77,16 @@ func (nIndex *NewIndex) NewIndex() error {
 	nIndex.T["hotkey"] = hotKeyArrLoginEd
 	nIndex.T["hotKeyArrUnLogin"] = hotKeyArrUnLogin
 	if userId != "" {
-		userName, vipType := gconv.String(sessVal["userName"]), "注册用户"
+		nickname, vipType := gconv.String(sessVal["userName"]), "注册用户"
 		var endTime int64
-		if userName == "" {
-			userName = gconv.String(sessVal["s_nickname"])
+		if nickname == "" {
+			nickname = gconv.String(sessVal["s_nickname"])
 		}
-		if userName == "" {
-			userName = gconv.String(sessVal["s_jyname"])
+		if nickname == "" {
+			nickname = gconv.String(sessVal["s_jyname"])
 		}
-		if userName == "" {
-			userName = gconv.String(sessVal["phone"])
+		if nickname == "" {
+			nickname = gconv.String(sessVal["phone"])
 		}
 
 		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"]))
@@ -104,6 +104,7 @@ func (nIndex *NewIndex) NewIndex() error {
 		}
 
 		nIndex.T["vipType"] = vipType
+		nIndex.T["nickname"] = nickname
 		if endTime > 0 {
 			nIndex.T["vipEntTime"] = time.Unix(endTime, 0).Format("2006-01-02")
 		}

+ 1 - 1
src/web/templates/pc/template/index/user-info-card.html

@@ -24,7 +24,7 @@
   <header class="user-info-header">
     <h4 class="user-info-title">
       <span class="j-icon base-icon icon-img-sahua"></span>
-      <span class="user-info-title-text highlight-text">欢迎您!<i class="user-nickname">xxx</i></span>
+      <span class="user-info-title-text highlight-text">欢迎您!<i class="user-nickname">{{.T.nickname}}</i></span>
     </h4>
     <p class="user-info-header-line">
       <span class="u-i-h-line-label">账户类型:</span>