2019-03-31 00:12:15 +08:00
|
|
|
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',
|
|
|
|
});
|
2019-04-01 18:33:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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',
|
|
|
|
});
|
2019-04-04 19:03:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// coupon
|
|
|
|
|
|
|
|
export async function addCouponCardTemplate(params) {
|
|
|
|
return request(`/promotion-api/admins/coupon/template/add_card?${stringify(params)}`, {
|
|
|
|
method: 'POST',
|
|
|
|
});
|
|
|
|
}
|