发表于: 2019-10-03 21:46:19
0 734
今天完成的事情:
侧边栏接受数据展示
banner图管理
checkIsLogin() {
try {
this.UserInfo = JSON.parse(localStorage.userInfo);
if (window.location.pathname == '/home') {
this.router.navigateByUrl(this.saveItemStatus.url);
}
} catch (e) {
this.router.navigateByUrl('login');
}
}
getRoleAsModule() {
this.homeService.getRoleModule(this.roleId).subscribe(res => {
if (res.code === 0) {
this.midsVal = res.data.mids;
this.getModuleList();
} else {
alert(res.data.message);
}
});
}
getModuleList() {
this.homeService.getModuleList({ ids: this.midsVal }).subscribe((res: any) => {
if (res.code === 0) {
this.formatModuleData(res.data.moduleList);
}
});
}
评论