|
@@ -35,6 +35,8 @@ const user = {
|
|
const password = userInfo.password
|
|
const password = userInfo.password
|
|
const code = userInfo.code
|
|
const code = userInfo.code
|
|
const uuid = userInfo.uuid
|
|
const uuid = userInfo.uuid
|
|
|
|
+ const smsToken = userInfo.smsToken
|
|
|
|
+ const phone = userInfo.phone
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
if(userInfo.loginType == 1){ // 密码登录
|
|
if(userInfo.loginType == 1){ // 密码登录
|
|
login(username, password, code, uuid).then(res => {
|
|
login(username, password, code, uuid).then(res => {
|
|
@@ -45,7 +47,7 @@ const user = {
|
|
reject(error)
|
|
reject(error)
|
|
})
|
|
})
|
|
}else { // 验证码登录
|
|
}else { // 验证码登录
|
|
- loginCode(username, code).then(res => {
|
|
|
|
|
|
+ loginCode(phone, smsToken, code).then(res => {
|
|
setToken(res.data.access_token)
|
|
setToken(res.data.access_token)
|
|
commit('SET_TOKEN', res.data.access_token)
|
|
commit('SET_TOKEN', res.data.access_token)
|
|
resolve()
|
|
resolve()
|