配合前后端

This commit is contained in:
橙子
2021-10-13 16:44:15 +08:00
parent e9bc71393c
commit 86ab52df57
22 changed files with 1319 additions and 6 deletions

View File

@@ -0,0 +1,39 @@
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',
})
},
logged() {
return myaxios({
url: '/Account/logged',
method: 'post',
})
},
register(username, password, email, code) {
return myaxios({
url: `/Account/register?code=${code}`,
method: 'post',
data: { username, password, email }
})
},
email(emailAddress) {
return myaxios({
url: `/Account/email?emailAddress=${emailAddress}`,
method: 'post',
})
}
}