You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
xuan-pay-cweb/Utils/groupBuying.js

119 lines
4.0 KiB

import {
POST
} from './Request.js';
let app = getApp();
let base = app.globalData.url;
let hsgCrest = app.globalData.hsgUrl+'/crest';
let hsgOrder = app.globalData.hsgUrl+'/order';
//新增门店图片
export const insertStoreImg = params => {
return POST('POST', `${base}/storeImg/insertStoreImg`, params).then(res => res.data);
}
//查询门店图片列表
export const getBsStoreImgByList = params => {
return POST('GET', `${base}/storeImg/getBsStoreImgByList`, params).then(res => res.data);
}
//删除门店图片
export const deleteStoreImg = params => {
return POST('GET', `${base}/storeImg/deleteStoreImg`, params).then(res => res.data);
}
//根据id查询门店图片详情
export const getStoreImgById = params => {
return POST('GET', `${base}/storeImg/getStoreImgById`, params).then(res => res.data);
}
//新增门店产品
export const insertStoreProduct = params => {
return POST('POST', `${base}/storeProduct/insertStoreProduct`, params).then(res => res.data);
}
//编辑门店产品
export const editStoreProduct = params => {
return POST('POST', `${base}/storeProduct/editStoreProduct`, params).then(res => res.data);
}
//门店产品列表
export const getStoreProductByList = params => {
return POST('GET', `${base}/storeProduct/getStoreProductByList`, params).then(res => res.data);
}
//查询门店产品详情
export const getStoreProductById = params => {
return POST('GET', `${base}/storeProduct/getStoreProductById`, params).then(res => res.data);
}
/* =======团购产品================= */
// 新增配置团购基本内容
export const insertGroupContent = params => {
return POST('POST', `${base}/storeGroup/insertGroupContent`, params).then(res => res.data);
}
// 配置团购产品详情
export const editGroupContentDetail = params => {
return POST('POST', `${base}/storeGroup/editGroupContentDetail`, params).then(res => res.data);
}
//修改配置团购基本内容
export const editGroupContent = params => {
return POST('POST', `${base}/storeGroup/editGroupContent`, params).then(res => res.data);
}
//新增团购规则内容
// export const insertGroupServeRule = params => {
// return POST('POST', `${base}/storeGroup/insertGroupServeRule`, params).then(res => res.data);
// }
//编辑团购规则内容
export const editGroupServeRule = params => {
return POST('POST', `${base}/storeGroup/editGroupServeRule`, params).then(res => res.data);
}
//删除团购产品详情单个产品
export const deleteGroupDetail = params => {
return POST('GET', `${base}/storeGroup/deleteGroupDetail`, params).then(res => res.data);
}
//上下架团购
export const upDownGroup = params => {
return POST('GET', `${base}/storeGroup/upDownGroup`, params).then(res => res.data);
}
//根据门店id 查询门店团购内容
export const getStoreGroupList = params => {
return POST('GET', `${base}/storeGroup/getStoreGroupList`, params).then(res => res.data);
}
//根据团购id 查询门店内容详情
export const getStoreGroupDetailList = params => {
return POST('GET', `${base}/storeGroup/getStoreGroupDetailList`, params).then(res => res.data);
}
//根据团购id查询门店规则内容
export const findGroupServeRuleByGroup = params => {
return POST('GET', `${base}/storeGroup/findGroupServeRuleByGroup`, params).then(res => res.data);
}
//查询团购内容
export const findStoreGroupContent = params => {
return POST('GET', `${base}/storeGroup/findStoreGroupContent`, params).then(res => res.data);
}
//新增门店扩展信息
export const editStoreExtMsg = params => {
return POST('POST', `${base}/storeGroup/editStoreExtMsg`, params).then(res => res.data);
}
//查询门店扩展信息
export const findStoreExtMsgByStoreId = params => {
return POST('GET', `${base}/storeGroup/findStoreExtMsgByStoreId`, params).then(res => res.data);
}
//查询获取团购内容code
export const getGroupContentByCode = params => {
return POST('GET', `${hsgCrest}/group/getGroupContentByCode`, params).then(res => res.data);
}
//核销团购码
export const gorOrderNotify = params => {
return POST('GET', `${hsgOrder}/groupOrder/gorOrderNotify`, params).then(res => res.data);
}