|
@@ -24,8 +24,8 @@ type loginType = { token: string, isAdmin: boolean, menus: string[] }
|
|
|
|
|
|
export function login(account: string, password: string) {
|
|
export function login(account: string, password: string) {
|
|
return http.post(userLogin, {
|
|
return http.post(userLogin, {
|
|
- account,
|
|
|
|
- password
|
|
|
|
|
|
+ telNum: account,
|
|
|
|
+ password: window.btoa(password)
|
|
}).then(res => {
|
|
}).then(res => {
|
|
const { code, msg, data = {} } = res
|
|
const { code, msg, data = {} } = res
|
|
const { token, } = data as loginType
|
|
const { token, } = data as loginType
|
|
@@ -33,6 +33,7 @@ export function login(account: string, password: string) {
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
message.success('登录成功')
|
|
message.success('登录成功')
|
|
setAccessToken(token)
|
|
setAccessToken(token)
|
|
|
|
+ location.href = '/cooperationAccount/gzh'
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|