feat: 添加hgcart购物车模板+Drone部署同步
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 解压default_npant.tar.gz到clientarea/cart/hgcart/ - .drone.yml增加hgcart同步到cart/template/pc/
This commit is contained in:
48
clientarea/cart/hgcart/api/shopping.js
Normal file
48
clientarea/cart/hgcart/api/shopping.js
Normal file
@@ -0,0 +1,48 @@
|
||||
// 获取购物车
|
||||
function cartList() {
|
||||
return Axios.get(`/cart`);
|
||||
}
|
||||
|
||||
//修改购物车商品数量
|
||||
function editGoodsNum(index, num) {
|
||||
return Axios.put(`/cart/${index}/qty`, { qty: num });
|
||||
}
|
||||
|
||||
//批量删除购物车商品
|
||||
function deleteGoods(arr) {
|
||||
const params = { positions: arr };
|
||||
return Axios.delete(`/cart/batch`, { data: params });
|
||||
}
|
||||
|
||||
// 修改配置计算价格
|
||||
function configOption(id, params) {
|
||||
return Axios.post(`/product/${id}/config_option`, params);
|
||||
}
|
||||
|
||||
// 结算购物车
|
||||
function cart_settle(params) {
|
||||
return Axios.post(`/cart/settle`, params);
|
||||
}
|
||||
|
||||
// 获取商品折扣金额
|
||||
function clientLevelAmount(params) {
|
||||
return Axios.get(`/client_level/product/${params.id}/amount`, { params });
|
||||
}
|
||||
|
||||
// 结算商品
|
||||
function product_settle(params) {
|
||||
return Axios.post(`/product/settle`, params);
|
||||
}
|
||||
//支付接口
|
||||
function payLisy() {
|
||||
return Axios.get(`/gateway`);
|
||||
}
|
||||
// 修改购物车
|
||||
function updateCart(params) {
|
||||
return Axios.put(`/cart/${params.position}`, params);
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
function productDetail(id) {
|
||||
return Axios.get(`/product/${id}`);
|
||||
}
|
||||
Reference in New Issue
Block a user