头像上传功能、性别选择

This commit is contained in:
橙子
2022-10-13 23:55:21 +08:00
parent 3555b08fe8
commit 8456320884
119 changed files with 51 additions and 31 deletions

View File

@@ -0,0 +1,61 @@
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',
})
},
updatePassword(oldPassword, newPassword) {
return myaxios({
url: `/Account/updatePassword`,
method: 'put',
data: { oldPassword, newPassword }
})
},
getUserAllInfo()
{
return myaxios({
url: `/Account/getUserAllInfo`,
method: 'get'
})
},
updateUserByHttp(user)
{
return myaxios({
url: `/Account/updateUserByHttp`,
method: 'put',
data:user
})
}
}

View File

@@ -0,0 +1,11 @@
import myaxios from '@/util/myaxios'
export default {
UploadImage(file) {
return myaxios({
url: '/Upload/image',
method: 'post',
headers: { "Content-Type": "multipart/form-data" },
data: file
})
}
}

View File

@@ -0,0 +1,30 @@
import myaxios from '@/util/myaxios'
export default {
getMenuTree() {
return myaxios({
url: '/Menu/getMenuTree',
method: 'get'
})
},
Update(data) {
return myaxios({
url: '/Menu/Update',
method: 'put',
data: data
})
},
DeleteList(ids) {
return myaxios({
url: '/Menu/DeleteList',
method: 'delete',
data: ids
})
},
Add(data) {
return myaxios({
url: '/Menu/Add',
method: 'post',
data: data
})
}
}

View File

@@ -0,0 +1,10 @@
import myaxios from '@/util/myaxios'
export default {
getMould() {
return myaxios({
url: '/Mould/GetMould',
method: 'get'
})
}
}

View File

@@ -0,0 +1,19 @@
import myaxios from '@/util/myaxios'
export default {
GetPanFiles(dirName) {
return myaxios({
url: '/Pan/GetPanFiles',
method: 'post',
data: { dirName}
})
},
Download(dirName,allName)
{
return myaxios({
url: '/Pan/Download',
method: 'post',
data: { dirName,allName}
})
}
}

View File

@@ -0,0 +1,26 @@
import myaxios from '@/util/myaxios'
import {objctToDic} from '@/util/objctHandle'
export default {
getList() {
return myaxios({
url: '/Role/GetList',
method: 'post',
data: objctToDic()
})
},
giveRoleSetMenu(roleList, menuList) {
return myaxios({
url: '/Role/GiveRoleSetMenu',
method: 'put',
data: { RoleIds: roleList, menuIds: menuList }
})
},
getInMenuByRoleId(roleId) {
return myaxios({
url: `/Role/GetInMenuByRoleId?roleId=${roleId}`,
method: 'get'
})
}
}

View File

@@ -0,0 +1,30 @@
import myaxios from '@/util/myaxios'
export default {
GetUserInRolesByHttpUser() {
return myaxios({
url: `/User/GetUserInRolesByHttpUser`,
method: 'get'
})
},
GetMenuByHttpUser() {
return myaxios({
url: `/User/GetMenuByHttpUser`,
method: 'get'
})
},
GetRoleListByUserId(userId) {
return myaxios({
url: `/User/GetRoleListByUserId?userId=${userId}`,
method: 'get'
})
},
GiveUserSetRole(UserIds,RoleIds)
{
return myaxios({
url: `/User/GiveUserSetRole`,
method: 'put',
data:{UserIds,RoleIds}
})
}
}