mirror of https://gitee.com/pnoker/dc3-web.git
parent
f84de5f290
commit
a3ee3e2c4f
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
public
|
||||
src
|
@ -1,12 +1,24 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const generateSalt = (name) => request({
|
||||
url: '/user_api/auth/token/salt',
|
||||
method: 'get',
|
||||
params: {
|
||||
username: name
|
||||
}
|
||||
});
|
||||
|
||||
export const generateToken = (user) => request({
|
||||
url: '/user_api/auth/token',
|
||||
url: '/user_api/auth/token/generate',
|
||||
method: 'post',
|
||||
data: user
|
||||
});
|
||||
|
||||
export const checkTokenValid = (token) => request({
|
||||
url: '/user_api/auth/token/' + token,
|
||||
method: 'post'
|
||||
export const checkTokenValid = (user, token) => request({
|
||||
url: '/user_api/auth/token/check',
|
||||
method: 'get',
|
||||
params: {
|
||||
username: user,
|
||||
token
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in new issue