mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-01 14:46:37 +08:00
feat: 添加bbs前端
This commit is contained in:
39
Yi.BBS.Vue2/src/api/accountApi.js
Normal file
39
Yi.BBS.Vue2/src/api/accountApi.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import myaxios from '@/utils/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: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/actionApi.js
Normal file
30
Yi.BBS.Vue2/src/api/actionApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getActions() {
|
||||
return myaxios({
|
||||
url: '/Action/getActions',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addAction(action) {
|
||||
return myaxios({
|
||||
url: '/action/addAction',
|
||||
method: 'post',
|
||||
data: action
|
||||
})
|
||||
},
|
||||
updateAction(action) {
|
||||
return myaxios({
|
||||
url: '/action/UpdateAction',
|
||||
method: 'post',
|
||||
data: action
|
||||
})
|
||||
},
|
||||
delActionList(Ids) {
|
||||
return myaxios({
|
||||
url: '/action/DelAllAction',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
9
Yi.BBS.Vue2/src/api/agreesApi.js
Normal file
9
Yi.BBS.Vue2/src/api/agreesApi.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getAgrees(discussId) {
|
||||
return myaxios({
|
||||
url: `/Agree/getAgrees?discussId=${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
}
|
||||
82
Yi.BBS.Vue2/src/api/articleApi.js
Normal file
82
Yi.BBS.Vue2/src/api/articleApi.js
Normal file
@@ -0,0 +1,82 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
setArticleByCache(articleId, content) {
|
||||
return myaxios({
|
||||
url: `/Article/setArticleByCache`,
|
||||
method: 'post',
|
||||
data: { id: articleId, content: content }
|
||||
})
|
||||
},
|
||||
|
||||
getArticleByCache(articleId) {
|
||||
return myaxios({
|
||||
url: `/Article/getArticleByCache?articleId=${articleId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
getArticlesByDiscussId(discussId) {
|
||||
return myaxios({
|
||||
url: `/Article/discuss-id/${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getArticleById(articleId) {
|
||||
return myaxios({
|
||||
url: `/Article/${articleId}`,
|
||||
method: 'get'
|
||||
})
|
||||
|
||||
},
|
||||
getTitlArticles(discussId) {
|
||||
return myaxios({
|
||||
url: `/article/all/discuss-id/${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getArticles() {
|
||||
return myaxios({
|
||||
url: '/Article/getArticles',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addChildrenArticle(article, parentId, discussId) {
|
||||
return myaxios({
|
||||
url: `/Article`,
|
||||
method: 'post',
|
||||
data: {
|
||||
content:article.content,
|
||||
name:article.name,
|
||||
discussId:discussId,
|
||||
parentId:parentId
|
||||
}
|
||||
})
|
||||
},
|
||||
addArticle(article, discussId) {
|
||||
return myaxios({
|
||||
url: `/Article`,
|
||||
method: 'post',
|
||||
data: {
|
||||
content:article.content,
|
||||
name:article.name,
|
||||
discussId:discussId,
|
||||
parentId:0
|
||||
}
|
||||
})
|
||||
},
|
||||
updateArticle(Article, discussId) {
|
||||
return myaxios({
|
||||
url: `/Article/UpdateArticle?discussId=${discussId}`,
|
||||
method: 'post',
|
||||
data: Article
|
||||
})
|
||||
},
|
||||
delArticleList(Ids, discussId) {
|
||||
console.log(Ids.join())
|
||||
return myaxios({
|
||||
url: `/Article/${Ids.join()}`,
|
||||
method: 'delete'
|
||||
})
|
||||
},
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/bannerApi.js
Normal file
30
Yi.BBS.Vue2/src/api/bannerApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getBanners() {
|
||||
return myaxios({
|
||||
url: '/banner',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addBanner(banner) {
|
||||
return myaxios({
|
||||
url: '/Banner/addBanner',
|
||||
method: 'post',
|
||||
data: banner
|
||||
})
|
||||
},
|
||||
updateBanner(Banner) {
|
||||
return myaxios({
|
||||
url: '/Banner/UpdateBanner',
|
||||
method: 'post',
|
||||
data: Banner
|
||||
})
|
||||
},
|
||||
delBannerList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Banner/DelBannerList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
21
Yi.BBS.Vue2/src/api/collectionApi.js
Normal file
21
Yi.BBS.Vue2/src/api/collectionApi.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getCollections(pageIndex) {
|
||||
return myaxios({
|
||||
url: `/Collection/GetCollections?pageIndex=${pageIndex}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addCollection(discussId) {
|
||||
return myaxios({
|
||||
url: `/Collection/AddCollection?discussId=${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
delCollection(discussId) {
|
||||
return myaxios({
|
||||
url: `/Collection/delCollection?discussId=${discussId}`,
|
||||
method: 'get',
|
||||
})
|
||||
},
|
||||
}
|
||||
38
Yi.BBS.Vue2/src/api/commentApi.js
Normal file
38
Yi.BBS.Vue2/src/api/commentApi.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getComments() {
|
||||
return myaxios({
|
||||
url: '/Comment',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getCommentsByDiscussId(discussId, pageIndex) {
|
||||
return myaxios({
|
||||
url: `/Comment/discuss-id/${discussId}?pageIndex=${pageIndex}&pageSize=10`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addComment(Comment, discussId) {
|
||||
return myaxios({
|
||||
url: `/Comment`,
|
||||
method: 'post',
|
||||
data: {
|
||||
content:Comment.content,discussId
|
||||
}
|
||||
})
|
||||
},
|
||||
updateComment(Comment) {
|
||||
return myaxios({
|
||||
url: '/Comment/UpdateComment',
|
||||
method: 'post',
|
||||
data: Comment
|
||||
})
|
||||
},
|
||||
delCommentList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Comment/DelCommentList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
76
Yi.BBS.Vue2/src/api/discussApi.js
Normal file
76
Yi.BBS.Vue2/src/api/discussApi.js
Normal file
@@ -0,0 +1,76 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getDiscuss() {
|
||||
return myaxios({
|
||||
url: '/Discuss',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getDiscussByPlateId(plateId, pageIndex, orderbyId) {
|
||||
return myaxios({
|
||||
url: `/discuss/plate-id/${plateId}?&pageIndex=${pageIndex}&pageSize=10`,//&orderbyId=${orderbyId}
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getDiscussByUserId(userId, pageIndex) {
|
||||
if (userId == undefined) {
|
||||
userId = 0
|
||||
}
|
||||
return myaxios({
|
||||
url: `/Discuss/getDiscussByUserId?userId=${userId}&pageIndex=${pageIndex}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
addDiscuss(data, plateId, labelIds) {
|
||||
return myaxios({
|
||||
url: `/Discuss`,
|
||||
method: 'post',
|
||||
data: {
|
||||
content:data.content,
|
||||
introduction:data.introduction,
|
||||
title:data.title,
|
||||
types:data.type,
|
||||
plateId,
|
||||
// Ids
|
||||
}
|
||||
})
|
||||
},
|
||||
updateDiscuss(data) {
|
||||
return myaxios({
|
||||
url: '/Discuss/UpdateDiscuss',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
delDiscussList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Discuss/DelDiscussList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
getDiscussByDiscussId(id) {
|
||||
return myaxios({
|
||||
url: `/Discuss/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
UpdatePorp(disucssId, propId, color) {
|
||||
color = color.replace("#", "%23"); //颜色代码替换
|
||||
return myaxios({
|
||||
url: `/Discuss/UpdatePorp?disucssId=${disucssId}&propId=${propId}&color=${color}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
GetPlateInfoBydiscussId(discussId)
|
||||
{
|
||||
return myaxios({
|
||||
url: `/Discuss/GetPlateInfoBydiscussId?discussId=${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
16
Yi.BBS.Vue2/src/api/fileApi.js
Normal file
16
Yi.BBS.Vue2/src/api/fileApi.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
OnPostUploadImage(file) {
|
||||
return myaxios({
|
||||
url: '/File/OnPostUploadImage',
|
||||
method: 'post',
|
||||
data: file
|
||||
})
|
||||
},
|
||||
getLogs() {
|
||||
return myaxios({
|
||||
url: '/File/GetLogs',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
34
Yi.BBS.Vue2/src/api/friendApi.js
Normal file
34
Yi.BBS.Vue2/src/api/friendApi.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
GetFriends() {
|
||||
return myaxios({
|
||||
url: '/Friend/GetFriends',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
GetFriendsNotice() {
|
||||
return myaxios({
|
||||
url: '/Friend/GetFriendsNotice',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
AddFriend(user2Name) {
|
||||
return myaxios({
|
||||
url: `/Friend/AddFriend?user2Name=${user2Name}`,
|
||||
method: 'post',
|
||||
})
|
||||
},
|
||||
UpdateFriend(friendId) {
|
||||
return myaxios({
|
||||
url: `/Friend/UpdateFriend?friendId=${friendId}`,
|
||||
method: 'post',
|
||||
})
|
||||
},
|
||||
delFriendList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Friend/delFriendList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
48
Yi.BBS.Vue2/src/api/labelApi.js
Normal file
48
Yi.BBS.Vue2/src/api/labelApi.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getLabelByUserId(userId) {
|
||||
if (userId == undefined) {
|
||||
userId = 0;
|
||||
}
|
||||
return myaxios({
|
||||
url: `/Label/getLabelByUserId?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getDiscussByLabelId(userId, pageIndex, labelId) {
|
||||
if (userId == undefined) {
|
||||
userId = 0;
|
||||
}
|
||||
return myaxios({
|
||||
url: `/Label/getDiscussByLabelId?userId=${userId}&labelId=${labelId}&pageIndex=${pageIndex}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getLabels() {
|
||||
return myaxios({
|
||||
url: '/Label',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addLabelByUserId(label) {
|
||||
return myaxios({
|
||||
url: '/Label/addLabelByUserId',
|
||||
method: 'post',
|
||||
data: label
|
||||
})
|
||||
},
|
||||
updateLabel(Label) {
|
||||
return myaxios({
|
||||
url: '/Label/UpdateLabel',
|
||||
method: 'post',
|
||||
data: Label
|
||||
})
|
||||
},
|
||||
delLabelList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Label/DelLabelList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/levelApi.js
Normal file
30
Yi.BBS.Vue2/src/api/levelApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getLevels() {
|
||||
return myaxios({
|
||||
url: '/Level/getLevels',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addLevel(level) {
|
||||
return myaxios({
|
||||
url: '/Level/addLevel',
|
||||
method: 'post',
|
||||
data: level
|
||||
})
|
||||
},
|
||||
updateLevel(Level) {
|
||||
return myaxios({
|
||||
url: '/Level/UpdateLevel',
|
||||
method: 'post',
|
||||
data: Level
|
||||
})
|
||||
},
|
||||
delLevelList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Level/DelLevelList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/mytypeApi.js
Normal file
30
Yi.BBS.Vue2/src/api/mytypeApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getMytypes() {
|
||||
return myaxios({
|
||||
url: '/my-type',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addMytype(mytype) {
|
||||
return myaxios({
|
||||
url: '/Mytype/addMytype',
|
||||
method: 'post',
|
||||
data: mytype
|
||||
})
|
||||
},
|
||||
updateMytype(Mytype) {
|
||||
return myaxios({
|
||||
url: '/Mytype/UpdateMytype',
|
||||
method: 'post',
|
||||
data: Mytype
|
||||
})
|
||||
},
|
||||
delMytypeList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Mytype/DelMytypeList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/plateApi.js
Normal file
30
Yi.BBS.Vue2/src/api/plateApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getPlates() {
|
||||
return myaxios({
|
||||
url: '/Plate',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addPlate(plate) {
|
||||
return myaxios({
|
||||
url: '/Plate/addPlate',
|
||||
method: 'post',
|
||||
data: plate
|
||||
})
|
||||
},
|
||||
updatePlate(plate) {
|
||||
return myaxios({
|
||||
url: '/Plate/UpdatePlate',
|
||||
method: 'post',
|
||||
data: plate
|
||||
})
|
||||
},
|
||||
delPlateList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Plate/DelPlateList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/propApi.js
Normal file
30
Yi.BBS.Vue2/src/api/propApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getProps() {
|
||||
return myaxios({
|
||||
url: '/Prop/getProps',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addProp(prop) {
|
||||
return myaxios({
|
||||
url: '/Prop/addProp',
|
||||
method: 'post',
|
||||
data: prop
|
||||
})
|
||||
},
|
||||
updateProp(Prop) {
|
||||
return myaxios({
|
||||
url: '/Prop/UpdateProp',
|
||||
method: 'post',
|
||||
data: Prop
|
||||
})
|
||||
},
|
||||
delPropList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Prop/DelPropList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
15
Yi.BBS.Vue2/src/api/qqApi.js
Normal file
15
Yi.BBS.Vue2/src/api/qqApi.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
qqlogin(openid) {
|
||||
return myaxios({
|
||||
url: `/qq/qqlogin?openid=${openid}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
qqupdate(openid, userId) {
|
||||
return myaxios({
|
||||
url: `/qq/qqupdate?openid=${openid}&userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
37
Yi.BBS.Vue2/src/api/recordApi.js
Normal file
37
Yi.BBS.Vue2/src/api/recordApi.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getRecordsByDiscussId(discussId) {
|
||||
return myaxios({
|
||||
url: `/Record/getRecordsByDiscussId?discussId=${discussId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
getRecords() {
|
||||
return myaxios({
|
||||
url: '/Record/getRecords',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addRecord(record) {
|
||||
return myaxios({
|
||||
url: '/Record/addRecord',
|
||||
method: 'post',
|
||||
data: record
|
||||
})
|
||||
},
|
||||
updateRecord(Record) {
|
||||
return myaxios({
|
||||
url: '/Record/UpdateRecord',
|
||||
method: 'post',
|
||||
data: Record
|
||||
})
|
||||
},
|
||||
delRecordList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Record/DelRecordList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
50
Yi.BBS.Vue2/src/api/roleApi.js
Normal file
50
Yi.BBS.Vue2/src/api/roleApi.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getRoles() {
|
||||
return myaxios({
|
||||
url: '/Role/getRoles',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
AddRole(role) {
|
||||
return myaxios({
|
||||
url: '/Role/AddRole',
|
||||
method: 'post',
|
||||
data: role
|
||||
})
|
||||
},
|
||||
delRole(roleId) {
|
||||
return myaxios({
|
||||
url: `/Role/DelRole?roleId=${roleId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
updateRole(role) {
|
||||
return myaxios({
|
||||
url: '/role/updateRole',
|
||||
method: 'post',
|
||||
data: role
|
||||
})
|
||||
},
|
||||
delRoleList(Ids) {
|
||||
return myaxios({
|
||||
url: '/role/delAllRole',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
setAction(Id, Ids) {
|
||||
return myaxios({
|
||||
url: '/role/setAction',
|
||||
method: 'post',
|
||||
data: { "Id": Id, "Ids": Ids }
|
||||
})
|
||||
},
|
||||
GetActionByRoleId(roleId) {
|
||||
return myaxios({
|
||||
url: `/role/GetActionByRoleId?roleId=${roleId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
22
Yi.BBS.Vue2/src/api/settingApi.js
Normal file
22
Yi.BBS.Vue2/src/api/settingApi.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getTitle() {
|
||||
return myaxios({
|
||||
url: '/Setting/title',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getSetting() {
|
||||
return myaxios({
|
||||
url: '/Setting/getSetting',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
UpdateSetting(form) {
|
||||
return myaxios({
|
||||
url: '/Setting/UpdateSetting',
|
||||
method: 'post',
|
||||
data: form
|
||||
})
|
||||
}
|
||||
}
|
||||
36
Yi.BBS.Vue2/src/api/shopApi.js
Normal file
36
Yi.BBS.Vue2/src/api/shopApi.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getShops() {
|
||||
return myaxios({
|
||||
url: '/Shop/getShops',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addShop(shop, propId) {
|
||||
return myaxios({
|
||||
url: `/Shop/addShop?propId=${propId}`,
|
||||
method: 'post',
|
||||
data: shop
|
||||
})
|
||||
},
|
||||
updateShop(Shop, propId) {
|
||||
return myaxios({
|
||||
url: `/Shop/UpdateShop?propId=${propId}`,
|
||||
method: 'post',
|
||||
data: Shop
|
||||
})
|
||||
},
|
||||
delShopList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Shop/DelShopList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
BuyShop(shopId) {
|
||||
return myaxios({
|
||||
url: `/Shop/BuyShop?shopId=${shopId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
101
Yi.BBS.Vue2/src/api/userApi.js
Normal file
101
Yi.BBS.Vue2/src/api/userApi.js
Normal file
@@ -0,0 +1,101 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getAllUser() {
|
||||
return myaxios({
|
||||
url: '/User/getAllUser',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getUserByUserId(userId) {
|
||||
if (userId == undefined) {
|
||||
userId = 0;
|
||||
}
|
||||
return myaxios({
|
||||
url: `/User/getUserByUserId?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
addUser(user) {
|
||||
return myaxios({
|
||||
url: '/User/addUser',
|
||||
method: 'post',
|
||||
data: user
|
||||
})
|
||||
},
|
||||
delUser(userId) {
|
||||
return myaxios({
|
||||
url: `/User/delUser?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
updateUser(user) {
|
||||
return myaxios({
|
||||
url: '/User/updateUser',
|
||||
method: 'post',
|
||||
data: user
|
||||
})
|
||||
},
|
||||
tryUpdateUser(form) {
|
||||
return myaxios({
|
||||
url: '/User/tryUpdateUser',
|
||||
method: 'post',
|
||||
data: form
|
||||
})
|
||||
},
|
||||
|
||||
delUserList(Ids) {
|
||||
return myaxios({
|
||||
url: '/User/delAllUser',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
setRole(Id, Ids) {
|
||||
return myaxios({
|
||||
url: '/User/setRole',
|
||||
method: 'post',
|
||||
data: { "Id": Id, "Ids": Ids }
|
||||
})
|
||||
},
|
||||
|
||||
setRoleList(userIds, roleIds) {
|
||||
return myaxios({
|
||||
url: '/User/setRoleList',
|
||||
method: 'post',
|
||||
data: { "userIds": userIds, "roleIds": roleIds }
|
||||
})
|
||||
},
|
||||
getRoleByuserId(userId) {
|
||||
if (userId == undefined) {
|
||||
userId = 0;
|
||||
}
|
||||
return myaxios({
|
||||
url: `/User/getRoleByuserId?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
getSpecialAction(userId) {
|
||||
return myaxios({
|
||||
url: `/User/getSpecialAction?userId=${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
setSpecialAction(Id, Ids) {
|
||||
return myaxios({
|
||||
url: '/User/setSpecialAction',
|
||||
method: 'post',
|
||||
data: { "Id": Id, "Ids": Ids }
|
||||
})
|
||||
},
|
||||
getActionByUserId(userId) {
|
||||
if (userId == undefined) {
|
||||
userId = 0;
|
||||
}
|
||||
return myaxios({
|
||||
url: `/account/user/${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
30
Yi.BBS.Vue2/src/api/versionApi.js
Normal file
30
Yi.BBS.Vue2/src/api/versionApi.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
getVersions() {
|
||||
return myaxios({
|
||||
url: '/Version/getVersions',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
addVersion(version) {
|
||||
return myaxios({
|
||||
url: '/Version/addVersion',
|
||||
method: 'post',
|
||||
data: version
|
||||
})
|
||||
},
|
||||
updateVersion(Version) {
|
||||
return myaxios({
|
||||
url: '/Version/UpdateVersion',
|
||||
method: 'post',
|
||||
data: Version
|
||||
})
|
||||
},
|
||||
delVersionList(Ids) {
|
||||
return myaxios({
|
||||
url: '/Version/DelVersionList',
|
||||
method: 'post',
|
||||
data: Ids
|
||||
})
|
||||
},
|
||||
}
|
||||
9
Yi.BBS.Vue2/src/api/warehouseApi.js
Normal file
9
Yi.BBS.Vue2/src/api/warehouseApi.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import myaxios from '@/utils/myaxios'
|
||||
export default {
|
||||
GetWarehousesByUserId() {
|
||||
return myaxios({
|
||||
url: '/Warehouse/GetWarehousesByUserId',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user