食品工业互联网托管平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
769 B

import axiosApi from './AxiosApi.js'
import {CAPTCHA, LOGIN, ROUTER, RESOURCE, } from './api'
//获取验证码
export function getCaptcha(randomId) {
return axiosApi({
method: 'GET',
url: `${CAPTCHA}?key=${randomId}`,
responseType: 'arraybuffer',
meta: {
"X-isToken": false
}
})
}
//登录
export function login(data) {
return axiosApi({
method: 'POST',
url: LOGIN,
data
})
}
//获取路由
export function getRouter(data) {
return axiosApi({
method: 'GET',
url: ROUTER,
data: data || {}
})
}
//获取用户可用的所有资源
export function getResource(data) {
return axiosApi({
method: 'GET',
url: RESOURCE,
data: data || {}
})
}