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.
90 lines
2.9 KiB
90 lines
2.9 KiB
2 years ago
|
import {
|
||
|
POST
|
||
|
} from "./Request.js";
|
||
|
let app = getApp();
|
||
|
let base = app.globalData.url;
|
||
|
// let orderbase = app.globalData.orderurl;
|
||
|
// let userbase = app.globalData.userurl;
|
||
|
// let v1base = app.globalData.v1url;
|
||
|
// let brestBase = app.globalData.brestUrl;
|
||
|
// let payBase = app.globalData.payurl;
|
||
|
|
||
|
|
||
|
// 查询分类树
|
||
|
export const getGoodsTypeTree = params => {
|
||
|
return POST('GET', `${base}/goods/getGoodsTypeTree`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 查询商品列表
|
||
|
export const getListGoodsDetail = params => {
|
||
|
return POST('GET', `${base}/goods/getListGoodsDetail`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
//根据商品id查询商品详情
|
||
|
export const findGoodsDetailById = params => {
|
||
|
return POST('GET', `${base}/goods/findGoodsDetailById`, params).then(res => res.data);
|
||
|
}
|
||
|
// 查询商品规格
|
||
|
export const findGoodsSkuByGoodsId = params => {
|
||
|
return POST('GET', `${base}/goods/findGoodsSkuByGoodsId`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
|
||
|
// 新增购物车内容
|
||
|
export const insertShoppingCart = params => {
|
||
|
|
||
|
return POST('POST', `${base}/shoppingCart/insertShoppingCart`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 增加商品数量
|
||
|
export const goodsAddNum = params => {
|
||
|
return POST('GET', `${base}/shoppingCart/goodsAddNum`, params).then(res => res.data);
|
||
|
}
|
||
|
// 删除购物车商品
|
||
|
export const deleteShoppingCart = params => {
|
||
|
return POST('GET', `${base}/shoppingCart/deleteShoppingCart`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 查询购物车列表
|
||
|
export const getShoppingCartList = params => {
|
||
|
return POST('GET', `${base}/shoppingCart/getShoppingCartList`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 查询区域列表
|
||
|
export const getRegional = params => {
|
||
|
return POST('GET', `${base}/common/getRegional`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 新增收获地址
|
||
|
export const insertDeliveryAddress = params => {
|
||
|
return POST('POST', `${base}/deliveryAddress/insertDeliveryAddress`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 更新收货地址
|
||
|
export const updateDeliveryAddress = params => {
|
||
|
return POST('POST', `${base}/deliveryAddress/updateDeliveryAddress`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 查询收货地址列表
|
||
|
export const getDeliveryAddressList = params => {
|
||
|
return POST('GET', `${base}/deliveryAddress/getDeliveryAddressList`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 根据id 查询收货地址详情
|
||
|
export const findDeliveryAddressById = params => {
|
||
|
return POST('GET', `${base}/deliveryAddress/findDeliveryAddressById`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 根据id 删除收货地址
|
||
|
export const deleteAddress = params => {
|
||
|
return POST('GET', `${base}/deliveryAddress/deleteShoppingCart`, params).then(res => res.data);
|
||
|
}
|
||
|
|
||
|
// 查询物流信息
|
||
|
export const getLogisticsMsg = params => {
|
||
|
return POST('GET', `${base}/goods/getLogisticsMsg`, params).then(res => res.data);
|
||
|
}
|
||
|
// 根据区域查询运费和包邮价格
|
||
|
export const getRegionFreight = params => {
|
||
|
return POST('GET', `${base}/common/getRegionFreight`, params).then(res => res.data);
|
||
|
}
|