12345678910111213141516171819202122232425262728293031323334353637383940 |
- import request from '@/config/axios'
- // 获取购物车列表
- export const getMallUserCartList = async () => {
- return request.get({
- url: '/app-api/trade/cart/list'
- })
- }
- // 从购物车中删除商品
- export const deleteCartGoods = async (ids) => {
- return request.delete({
- url: '/app-api/trade/cart/delete',
- params: { ids }
- })
- }
- // 更新购物车商品选中状态
- export const updateCartSelected = async (data) => {
- return request.put({
- url: '/app-api/trade/cart/update-selected',
- data
- })
- }
- // 更新购物车商品数量
- export const updateCartCount = async (data) => {
- return request.put({
- url: '/app-api/trade/cart/update-count',
- data
- })
- }
- // 添加商品到购物车
- export const addCart = async (data) => {
- return request.post({
- url: '/app-api/trade/cart/add',
- data
- })
- }
|