feat: 菜单权限获取方式调整、前端代码优化、数据库新增数据方式调整

This commit is contained in:
meilin.huang
2023-04-13 20:11:22 +08:00
parent 8e64ba67fa
commit 1d858118d5
22 changed files with 329 additions and 233 deletions

View File

@@ -22,7 +22,8 @@ export interface Result {
data?: any;
}
const baseUrl: string = config.baseApiUrl as string
const baseUrl: string = config.baseApiUrl
const baseWsUrl: string = config.baseWsUrl
/**
* 通知错误消息
@@ -115,9 +116,8 @@ function request(method: string, url: string, params: any = null, headers: any =
query.headers = headers
}
const lowMethod = method.toLowerCase();
// post和put使用json格式传参
if (lowMethod === 'post' || lowMethod === 'put') {
if (method === 'post' || method === 'put') {
query.data = params;
} else {
query.params = params;
@@ -155,6 +155,7 @@ function getApiUrl(url: string) {
return baseUrl + url + '?token=' + getSession('token');
}
export default {
request,
send,