feat: 权限逻辑处理
This commit is contained in:
@@ -109,9 +109,9 @@ export const appConfigStore = defineStore({
|
||||
userLogin(data: loginData) {
|
||||
if (this.userLoginApi) {
|
||||
console.log(data);
|
||||
// return httpRequest({ api: this.userLoginApi, params: data, pathParams: {}, requestConfig });
|
||||
return httpRequest({ api: this.userLoginApi, params: data, pathParams: {}, requestConfig });
|
||||
|
||||
return http.post(this.userLoginApi, data);
|
||||
// return http.post(this.userLoginApi, data);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { defineStore } from 'pinia';
|
||||
import { appConfigStore } from '/nerv-base/store/modules/app-config';
|
||||
export const authorizationService = defineStore({
|
||||
@@ -72,6 +70,8 @@ export const authorizationService = defineStore({
|
||||
this.dealResourceTree(this.userResourceList);
|
||||
} else {
|
||||
const res = await this.appConfig.userResource();
|
||||
console.log(res, 'hshshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh');
|
||||
|
||||
this.userResourceList = res.data ? res.data : [];
|
||||
if (this.appConfig.defaultResource) {
|
||||
this.userResourceList.push(this.appConfig.defaultResource);
|
||||
@@ -92,6 +92,8 @@ export const authorizationService = defineStore({
|
||||
//初始化菜单树
|
||||
async initMenuResource() {
|
||||
const res = await this.appConfig.userResource();
|
||||
console.log(res, 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
|
||||
this.initMenus = [];
|
||||
if (this.appConfig.resourceName && res.data && res.data.length) {
|
||||
res.data.forEach((item) => {
|
||||
|
Reference in New Issue
Block a user