mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-05 00:37:21 +08:00
头像上传功能、性别选择
This commit is contained in:
61
Yi.Vue2.x.Vuetify/src/api/accountApi.js
Normal file
61
Yi.Vue2.x.Vuetify/src/api/accountApi.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
11
Yi.Vue2.x.Vuetify/src/api/fileApi.js
Normal file
11
Yi.Vue2.x.Vuetify/src/api/fileApi.js
Normal 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
|
||||
})
|
||||
}
|
||||
}
|
||||
30
Yi.Vue2.x.Vuetify/src/api/menuApi.js
Normal file
30
Yi.Vue2.x.Vuetify/src/api/menuApi.js
Normal 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
|
||||
})
|
||||
}
|
||||
}
|
||||
10
Yi.Vue2.x.Vuetify/src/api/mouldApi.js
Normal file
10
Yi.Vue2.x.Vuetify/src/api/mouldApi.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import myaxios from '@/util/myaxios'
|
||||
export default {
|
||||
getMould() {
|
||||
return myaxios({
|
||||
url: '/Mould/GetMould',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
19
Yi.Vue2.x.Vuetify/src/api/panApi.js
Normal file
19
Yi.Vue2.x.Vuetify/src/api/panApi.js
Normal 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}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
26
Yi.Vue2.x.Vuetify/src/api/roleApi.js
Normal file
26
Yi.Vue2.x.Vuetify/src/api/roleApi.js
Normal 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'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
30
Yi.Vue2.x.Vuetify/src/api/userApi.js
Normal file
30
Yi.Vue2.x.Vuetify/src/api/userApi.js
Normal 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}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user