【fix ESLint】src/api
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@ export function thirdLogin (token, thirdType) {
|
||||
|
||||
/**
|
||||
* 强退其他账号
|
||||
* @param token
|
||||
* @returns {*}
|
||||
* @param parameter
|
||||
*/
|
||||
export function forceLogout (parameter) {
|
||||
return axios({
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user