fix:企业登录功能
parent
423065945b
commit
c762add637
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
// 登录方法
|
// 登录方法
|
||||||
export function login(username, password, code, uuid) {
|
export function login(username, password,firmName, code, uuid) {
|
||||||
return request({
|
return request({
|
||||||
url: '/auth/login',
|
url: '/auth/login',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -10,7 +10,7 @@ export function login(username, password, code, uuid) {
|
||||||
repeatSubmit: false
|
repeatSubmit: false
|
||||||
},
|
},
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {username, password, code, uuid}
|
data: {username, password,firmName, code, uuid}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,18 @@ export function register(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//企业入驻
|
||||||
|
export function enterprise(data){
|
||||||
|
return request({
|
||||||
|
url: '/auth/enterprise',
|
||||||
|
headers:{
|
||||||
|
isToken:false
|
||||||
|
},
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 刷新方法
|
// 刷新方法
|
||||||
export function refreshToken() {
|
export function refreshToken() {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -40,10 +40,11 @@ const user = {
|
||||||
Login({commit}, userInfo) {
|
Login({commit}, userInfo) {
|
||||||
const username = userInfo.username.trim()
|
const username = userInfo.username.trim()
|
||||||
const password = userInfo.password
|
const password = userInfo.password
|
||||||
|
const firmName=userInfo.firmName
|
||||||
const code = userInfo.code
|
const code = userInfo.code
|
||||||
const uuid = userInfo.uuid
|
const uuid = userInfo.uuid
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login(username, password, code, uuid).then(res => {
|
login(username, password,firmName, code, uuid).then(res => {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
setToken(data.access_token)
|
setToken(data.access_token)
|
||||||
commit('SET_TOKEN', data.access_token)
|
commit('SET_TOKEN', data.access_token)
|
||||||
|
|
Loading…
Reference in New Issue