|
@@ -14,6 +14,7 @@ import com.bumptech.glide.Glide;
|
|
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
|
|
import com.cooleshow.base.common.WebConstants;
|
|
|
+import com.cooleshow.base.constanst.EVipType;
|
|
|
import com.cooleshow.base.constanst.EventConstants;
|
|
|
import com.cooleshow.base.event.RefreshUserStatusEvent;
|
|
|
import com.cooleshow.base.router.RouterPath;
|
|
@@ -622,7 +623,7 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
|
//徽章
|
|
|
handleBadgeUI(teacherUserInfo.tag);
|
|
|
//VIP
|
|
|
- mViewBinding.ivVip.setImageResource(teacherUserInfo.isVip == 0 ? com.cooleshow.base.R.drawable.icon_vip_enable : com.cooleshow.base.R.drawable.icon_vip_able);
|
|
|
+ handleVipStyle(teacherUserInfo);
|
|
|
//入驻状态
|
|
|
this.teacherFlag = teacherUserInfo.teacherFlag;
|
|
|
this.degreeFlag = teacherUserInfo.degreeFlag;
|
|
@@ -661,6 +662,27 @@ public class NewHomeFragment extends BaseMVPFragment<FragmentNewHomeLayoutBindin
|
|
|
mViewBinding.ivTenantToolsEnter.setVisibility(tenantAlbumStatus != 0 ? View.VISIBLE : View.GONE);
|
|
|
}
|
|
|
|
|
|
+ private void handleVipStyle(TeacherUserInfo userInfo) {
|
|
|
+ try {
|
|
|
+ TeacherUserInfo.VipBean userVip = userInfo.getUserVip();
|
|
|
+ EVipType eVipType;
|
|
|
+ if (userVip == null || TextUtils.isEmpty(userVip.getVipType())) {
|
|
|
+ eVipType = EVipType.NOT_VIP;
|
|
|
+ } else {
|
|
|
+ eVipType = EVipType.valueOf(userVip.getVipType());
|
|
|
+ }
|
|
|
+ if (eVipType == EVipType.NOT_VIP) {
|
|
|
+ //非会员
|
|
|
+ mViewBinding.ivVip.setVisibility(View.GONE);
|
|
|
+ } else {
|
|
|
+ mViewBinding.ivVip.setVisibility(View.VISIBLE);
|
|
|
+ mViewBinding.ivVip.setImageResource(EVipType.getVipAvatarTag(eVipType));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void handleBadgeUI(String tag) {
|
|
|
int badgeAbleCount = 0;
|
|
|
boolean enableStyleBadge = isEnableForBadge(tag, STYLE_TYPE);
|