From b55403604e7866f5584d5f09ba34ae4459b4ca77 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Wed, 21 Jun 2023 17:14:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BA=8C=E7=BA=A7=E4=BB=A5=E4=B8=8A?= =?UTF-8?q?=E6=89=8D=E6=9C=89=E8=BF=9B=E5=9C=BA=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/user_r/inner.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/route/user_r/inner.go b/route/user_r/inner.go index b591a48..b2422f9 100644 --- a/route/user_r/inner.go +++ b/route/user_r/inner.go @@ -304,10 +304,12 @@ func GetUserCpEntryEffect(c *gin.Context) (*mycontext.MyContext, error) { privilegeList[i].UserSwitch = userPrivileges[userId][v.Type] } } - // 我的特权,有开关并且打开才返回 - for _, v := range privilegeList { - if v.Type == cp_e.CpPrivilegeRoomEffect && v.UserSwitch { - response.CpEntryEffect = true + // 二级以上才有进场特效 + if cpLevel >= cp_e.CpLevel2 { + for _, v := range privilegeList { + if v.Type == cp_e.CpPrivilegeRoomEffect && v.UserSwitch { + response.CpEntryEffect = true + } } } if cpUser, _ := user_c.GetUserTinyById(model, cpUserId); cpUser != nil { -- 2.22.0