【fix ESLint】src/api

This commit is contained in:
zhaoxiao
2023-03-03 09:54:23 +08:00
parent 7ccb1c9788
commit 3e116d77e5
3 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -1,4 +1,4 @@
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import { deleteAction, getAction, httpAction, postAction, putAction } from '@/api/manage'
import Vue from 'vue'
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
@@ -67,8 +67,7 @@ export const ajaxGetDictItems = (code, params) => getAction(`/sys/dict/getDictIt
// 从缓存中获取字典配置
function getDictItemsFromCache (dictCode) {
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
const dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]
return dictItems
return Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]
}
}
+1 -1
View File
@@ -75,8 +75,8 @@ export function thirdLogin (token, thirdType) {
/**
* 强退其他账号
* @param token
* @returns {*}
* @param parameter
*/
export function forceLogout (parameter) {
return axios({
+2 -2
View File
@@ -110,7 +110,7 @@ export function getPermissions (parameter) {
export function saveService (parameter) {
return axios({
url: api.service,
method: parameter.id == 0 ? 'post' : 'put',
method: parameter.id + '' === '0' ? 'post' : 'put',
data: parameter
})
}
@@ -188,7 +188,7 @@ export function getFileAccessHttpUrl (avatar, subStr) {
if (avatar && avatar.startsWith(subStr)) {
return avatar
} else {
if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
if (avatar && avatar.length > 0 && avatar.indexOf('[') === -1) {
const token = Vue.ls.get(ACCESS_TOKEN)
return window._CONFIG.staticDomainURL + '/' + avatar + '?token=' + token
}