feat: 新增登录注销功能,调整接口与配置
1. 新增项目logo文件 2. 调整API基础地址与开发代理配置 3. 添加多语言登录相关文案 4. 新增登录注销API接口 5. 重构请求与账号登录注销逻辑 6. 更新文档与菜单store状态
This commit is contained in:
@@ -125,13 +125,15 @@ function createRequest (service) {
|
||||
const token = util.cookies.get('token')
|
||||
const configDefault = {
|
||||
headers: {
|
||||
Authorization: token,
|
||||
'Content-Type': get(config, 'headers.Content-Type', 'application/json')
|
||||
},
|
||||
timeout: 5000,
|
||||
baseURL: process.env.VUE_APP_API,
|
||||
data: {}
|
||||
}
|
||||
if (token) {
|
||||
configDefault.headers.Authorization = 'Bearer ' + token
|
||||
}
|
||||
const option = merge(configDefault, config)
|
||||
// 处理 get 请求的参数
|
||||
// 请根据实际需要修改
|
||||
@@ -141,7 +143,7 @@ function createRequest (service) {
|
||||
}
|
||||
// 当需要以 form 形式发送时 处理发送的数据
|
||||
// 请根据实际需要修改
|
||||
if (!isEmpty(option.data) && option.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
|
||||
if (!isEmpty(option.data) && option.headers['Content-Type'] === 'application/x-www-form-urlen·coded') {
|
||||
option.data = stringify(option.data)
|
||||
}
|
||||
return service(option)
|
||||
|
||||
Reference in New Issue
Block a user