fjrcloud-community-app/sheep/api/community/activity.js

67 lines
1.3 KiB
JavaScript

import request from '@/sheep/request';
const ActivityApi = {
// 获取活动列表
getPage: (data) => {
return request({
url: '/community/activity/page',
method: 'GET',
params: data,
custom: {
showLoading: true,
auth: true,
},
});
},
// 获取活动详情
getDetail: (id) => {
return request({
url: '/community/activity/get',
method: 'GET',
params: { id },
custom: {
showLoading: true,
auth: true,
},
});
},
// 活动报名
register: (data) => {
return request({
url: '/community/activity/registration',
method: 'POST',
data,
custom: {
showLoading: true,
auth: true,
},
});
},
// 取消报名
cancelRegister: (id) => {
return request({
url: '/community/activity/registration/cancel',
method: 'POST',
params: { id },
custom: {
showLoading: true,
auth: true,
},
});
},
// 我的报名列表
getMyRegistrationPage: (data) => {
return request({
url: '/community/activity/registration/page',
method: 'GET',
params: data,
custom: {
showLoading: true,
auth: true,
},
});
},
};
export default ActivityApi;