问题描述:
等级会员未开启时,用户会员码不显示。
解决方法:
pages/users/user_member_code/index.vue,找到这个文件,修改 getlevelInfo 方法。
getlevelInfo: function() {
getlevelInfo().then(res => {
const {
level_info,
level_list,
task,
user
} = res.data;
this.levelInfo = level_info;
level_list.forEach(item => {
switch (item.grade) {
case 1:
item.background = ['#091D2B', '#000F18'];
break;
case 2:
item.background = ['#131A1D', '#040809'];
break;
case 3:
item.background = ['#4B351C', '#14100C'];
break;
case 4:
item.background = ['#1D172B', '#17151E'];
break;
case 5:
item.background = ['#0F0D07', '#0F0D07'];
break;
default:
break;
}
})
this.VipList = level_list;
const index = level_list.findIndex(item => item.grade == level_info.grade);
if (index !== -1) {
this.currentLevel = level_list[index];
}
this.nextLevel = level_list[index + 1];
this.nowLevel = level_info;
});
},
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}