添加前端
This commit is contained in:
46
Yi.Vue2.x/src/api/accountApi.js
Normal file
46
Yi.Vue2.x/src/api/accountApi.js
Normal 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 }
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
11
Yi.Vue2.x/src/api/fileApi.js
Normal file
11
Yi.Vue2.x/src/api/fileApi.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import myaxios from '@/util/myaxios'
|
||||
export default {
|
||||
EditIcon(file) {
|
||||
return myaxios({
|
||||
url: '/File/EditIcon',
|
||||
method: 'post',
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data: file
|
||||
})
|
||||
}
|
||||
}
|
||||
50
Yi.Vue2.x/src/api/menuApi.js
Normal file
50
Yi.Vue2.x/src/api/menuApi.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import myaxios from '@/util/myaxios'
|
||||
export default {
|
||||
GetMenuInMould() {
|
||||
return myaxios({
|
||||
url: '/Menu/GetMenuInMould',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addChildrenMenu(id, data) {
|
||||
return myaxios({
|
||||
url: '/Menu/addChildrenMenu',
|
||||
method: 'post',
|
||||
data: { parentId: id, data }
|
||||
})
|
||||
},
|
||||
UpdateMenu(data) {
|
||||
return myaxios({
|
||||
url: '/Menu/UpdateMenu',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
DelListMenu(ids) {
|
||||
return myaxios({
|
||||
url: '/Menu/DelListMenu',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
},
|
||||
AddTopMenu(data) {
|
||||
return myaxios({
|
||||
url: '/Menu/AddTopMenu',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
SetMouldByMenu(menuId, mouldId) {
|
||||
return myaxios({
|
||||
url: '/Menu/SetMouldByMenu',
|
||||
method: 'post',
|
||||
data: { id1: menuId, id2: mouldId }
|
||||
})
|
||||
},
|
||||
GetTopMenusByHttpUser() {
|
||||
return myaxios({
|
||||
url: '/Menu/GetTopMenusByHttpUser',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
10
Yi.Vue2.x/src/api/mouldApi.js
Normal file
10
Yi.Vue2.x/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/src/api/panApi.js
Normal file
19
Yi.Vue2.x/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}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
29
Yi.Vue2.x/src/api/roleApi.js
Normal file
29
Yi.Vue2.x/src/api/roleApi.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import myaxios from '@/util/myaxios'
|
||||
export default {
|
||||
getRole() {
|
||||
return myaxios({
|
||||
url: '/Role/getRole',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
setMenuByRole(roleList, menuList) {
|
||||
return myaxios({
|
||||
url: '/Role/setMenuByRole',
|
||||
method: 'post',
|
||||
data: { ids1: roleList, ids2: menuList }
|
||||
})
|
||||
},
|
||||
GetTopMenusByRoleId(roleId) {
|
||||
return myaxios({
|
||||
url: `/Role/GetTopMenusByRoleId?roleId=${roleId}`,
|
||||
method: 'get'
|
||||
|
||||
})
|
||||
},
|
||||
GetRolesByUserId(userId) {
|
||||
return myaxios({
|
||||
url: `/Role/GetRolesByUserId?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
}
|
||||
31
Yi.Vue2.x/src/api/userApi.js
Normal file
31
Yi.Vue2.x/src/api/userApi.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import myaxios from '@/util/myaxios'
|
||||
export default {
|
||||
SetRoleByUser(userIds, roleIds) {
|
||||
return myaxios({
|
||||
url: '/User/SetRoleByUser',
|
||||
method: 'post',
|
||||
data: { "ids1": userIds, "ids2": roleIds }
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
GetUserInRolesByHttpUser() {
|
||||
return myaxios({
|
||||
url: `/User/GetUserInRolesByHttpUser`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
GetMenuByHttpUser() {
|
||||
return myaxios({
|
||||
url: `/User/GetMenuByHttpUser`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
GetAxiosByRouter(router) {
|
||||
return myaxios({
|
||||
url: `/User/GetAxiosByRouter?router=${router}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user