添加前端

This commit is contained in:
橙子
2022-04-26 01:34:47 +08:00
parent f3061ed643
commit 630cfb6769
99 changed files with 5239 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
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) {
return myaxios({
url: `/Account/register?code=${code}`,
method: 'post',
data: { username, password, phone }
})
},
email(emailAddress) {
return myaxios({
url: `/Account/email?emailAddress=${emailAddress}`,
method: 'post',
})
},
SendSMS(smsAddress) {
return myaxios({
url: `/Account/SendSMS?SMSAddress=${smsAddress}`,
method: 'post',
})
},
changePassword(user, newPassword) {
return myaxios({
url: `/Account/changePassword`,
method: 'put',
data: { user, newPassword }
})
}
}