feat: 添加邮箱验证码登录前端功能和菜单设置
This commit is contained in:
parent
389937444a
commit
429458a901
|
|
@ -58,4 +58,11 @@ export default {
|
|||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
login_email_code: {
|
||||
url: `${config.API_URL}/auth/login_email_code/`,
|
||||
name: "邮箱验证码登录",
|
||||
req: async function(data={}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default {
|
|||
that.$TOOL.data.set("TOKEN", res.access);
|
||||
that.$TOOL.data.set("TOKEN_REFRESH", res.refresh);
|
||||
that.$TOOL.data.set("TOKEN_TIME", new Date().getTime());
|
||||
that.$API.auth.info.get().then(res1 => {
|
||||
that.$API.auth.info.get().then(async res1 => {
|
||||
that.$TOOL.data.set("USER_INFO", res1);
|
||||
that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
|
||||
let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
|
||||
|
|
@ -101,6 +101,14 @@ export default {
|
|||
if (base_dashboard == null || base_dashboard == undefined || base_dashboard == '') {
|
||||
base_dashboard = '/dashboard'
|
||||
}
|
||||
if(this.$TOOL.data.get('BASE_INFO').base.base_menucate=='dynamic'){
|
||||
try{
|
||||
var res = await that.$API.system.user.routers.req({})
|
||||
this.$TOOL.data.set("MENU",res)
|
||||
console.log(res)
|
||||
} catch (err) {
|
||||
}
|
||||
}
|
||||
this.$router.replace({
|
||||
path: base_dashboard,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue