Files
Yi.Admin/Yi.Vue/src/api/accountApi.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-10-13 16:44:15 +08:00
import myaxios from '@/util/myaxios'
export default {
login(username, password) {
return myaxios({
url: '/Account/login',
method: 'post',
data: {
username,
password
}
})
},
logout() {
return myaxios({
url: '/Account/logout',
method: 'post',
})
},
register(username, password, phone, code) {
2021-10-13 16:44:15 +08:00
return myaxios({
url: `/Account/register?code=${code}`,
method: 'post',
data: { username, password, phone }
2021-10-13 16:44:15 +08:00
})
},
email(emailAddress) {
return myaxios({
url: `/Account/email?emailAddress=${emailAddress}`,
method: 'post',
})
2021-10-20 16:38:39 +08:00
},
SendSMS(smsAddress) {
return myaxios({
url: `/Account/SendSMS?SMSAddress=${smsAddress}`,
method: 'post',
})
},
2021-10-20 16:38:39 +08:00
changePassword(user, newPassword) {
return myaxios({
url: `/Account/changePassword`,
method: 'put',
data: { user, newPassword }
})
2021-10-13 16:44:15 +08:00
}
}