Przeglądaj źródła

fix:体验用户空数据500问题修改

duxin 1 rok temu
rodzic
commit
87b7cfbb99

+ 10 - 4
src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

@@ -213,7 +213,11 @@ func (this *SubVipPortrait) SubVipPortrait() {
 			HasPower:   power > 1,
 		})
 		if power == 3 {
-			rData["onTrial"] = true
+			if rData != nil {
+				rData["onTrial"] = true
+			} else {
+				rData = map[string]interface{}{"onTrial": true}
+			}
 		}
 		return rData, nil
 	}()
@@ -515,12 +519,14 @@ func (this *SubVipPortrait) BuyerPortrait() {
 		if err != nil {
 			return nil, err
 		}
-		if rData != nil {
-			if power == 3 {
+		if power == 3 {
+			if rData != nil {
 				rData["onTrial"] = true
+			} else {
+				rData = map[string]interface{}{"onTrial": true}
 			}
-			rData["name"] = buyerName
 		}
+		rData["name"] = buyerName
 		return rData, nil
 	}()
 	if errMsg != nil {