ludu-cloud/admin-web/src/services/promotion.js

81 lines
2.1 KiB
JavaScript
Raw Normal View History

import { stringify } from '@/utils/request.qs';
import request from '@/utils/request';
// banner
export async function queryBanner(params) {
return request(`/promotion-api/admins/banner/page?${stringify(params)}`, {
method: 'GET',
});
}
export async function addBanner(params) {
return request(`/promotion-api/admins/banner/add?${stringify(params)}`, {
method: 'POST',
});
}
export async function updateBanner(params) {
return request(`/promotion-api/admins/banner/update?${stringify(params)}`, {
method: 'POST',
});
}
export async function updateBannerStatus(params) {
return request(`/promotion-api/admins/banner/update_status?${stringify(params)}`, {
method: 'POST',
});
}
export async function deleteBanner(params) {
return request(`/promotion-api/admins/banner/delete?${stringify(params)}`, {
method: 'POST',
});
}
// product recommend
export async function queryProductRecommend(params) {
return request(`/promotion-api/admins/product_recommend/page?${stringify(params)}`, {
method: 'GET',
});
}
export async function addProductRecommend(params) {
return request(`/promotion-api/admins/product_recommend/add?${stringify(params)}`, {
method: 'POST',
});
}
export async function updateProductRecommend(params) {
return request(`/promotion-api/admins/product_recommend/update?${stringify(params)}`, {
method: 'POST',
});
}
export async function updateProductRecommendStatus(params) {
return request(`/promotion-api/admins/product_recommend/update_status?${stringify(params)}`, {
method: 'POST',
});
}
export async function deleteProductRecommend(params) {
return request(`/promotion-api/admins/product_recommend/delete?${stringify(params)}`, {
method: 'POST',
});
}
// coupon
2019-04-05 22:27:57 +08:00
export async function getCouponCardTemplatePage(params) {
return request(`/promotion-api/admins/coupon/template/page?${stringify(params)}`, {
method: 'GET',
});
}
export async function addCouponCardTemplate(params) {
return request(`/promotion-api/admins/coupon/template/add_card?${stringify(params)}`, {
method: 'POST',
});
}