1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
| import axios from '@/utils/request'
| // 获取商品分类
| export const categories = (params, config = {}) => axios.post('/Api/Good/GetAllCategories', params, {
| custom: {
| methodName: 'categories.getallcat',
| needToken: false
| }
| });
| // 获取商品列表
|
| export const goodsList = (params, config = {}) => axios.post('/Api/Good/GetGoodsPageList', params, {
| custom: {
| methodName: 'goods.goodsList',
| needToken: false
| }
| });
| // 获取商品详情
| export const goodsDetail = (params, config = {}) => axios.post('/Api/Good/GetDetial', params, { custom: { methodName: 'goods.getdetial', needToken: false } });
| // 获取商品详情
| export const goodsDetailByToken = (params, config = {}) => axios.post('/Api/Good/GetDetialByToken', params, { custom: { methodName: 'goods.getDetialByToken', needToken: true } });
| // 添加购物车
| export let addCart = (params, config = {}) => axios.post('/Api/Cart/AddCart', params, { custom: { methodName: 'cart.add', needToken: true } });
| // 移除购物车
| export let removeCart = (params, config = {}) => axios.post('/Api/Cart/DoDelete', params, { custom: { methodName: 'cart.del', needToken: true } });
| // 获取购物车列表
| export let cartList = (params, config = {}) => axios.post('/Api/Cart/GetList', params, { custom: { methodName: 'cart.getlist', needToken: true } });
| // 设置购物车商品数量
| export let setCartNum = (params, config = {}) => axios.post('/Api/Cart/SetCartNum', params, { custom: { methodName: 'cart.setnums', needToken: true } });
| // 获取购物车数量
| export let getCartNum = (params, config = {}) => axios.post('/Api/User/GetCartNumber', params, { custom: { methodName: 'cart.getnumber', needToken: true } });
| // 获取购物车数量和商品总价格
| export let getCartNumAndMoney = (params, config = {}) => axios.post('/Api/User/GetCartNumberAndMoney', params, { custom: { methodName: 'cart.getnumber', needToken: true } });
| // 根据购物车已有数据获取能够使用的优惠券
| export let getCartCoupon = (params, config = {}) => axios.post('/Api/Cart/GetCartAvailableCoupon', params, { custom: { methodName: 'cart.getCartCoupon', needToken: true } });
| // 获取用户的收货地址列表
| export let userShip = (params, config = {}) => axios.post('/Api/User/GetUserShip', params, { custom: { methodName: 'user.getusership', needToken: true } });
| // 获取用户默认收货地址
| export let userDefaultShip = (params, config = {}) => axios.post('/Api/User/GetUserDefaultShip', params, { custom: { methodName: 'user.getuserdefaultship', needToken: true } });
| // 存储用户收货地址
| export let saveUserShip = (params, config = {}) => axios.post('/Api/User/SaveUserShip', params, { custom: { methodName: 'user.vuesaveusership', needToken: true } });
| //获取区域ID
| export let getAreaId = (params, config = {}) => axios.post('/Api/User/GetAreaId', params, { custom: { methodName: 'user.getareaid', needToken: false } });
| //根据区/县名称获取城市id信息
| export let getAreaIdByName = (params, config = {}) => axios.post('/Api/User/GetAreaIdByName', params, { custom: { methodName: 'user.getareaid', needToken: false } });
| // 获取收货地址详情
| export let shipDetail = (params, config = {}) => axios.post('/Api/User/GetShipDetail', params, { custom: { methodName: 'user.getshipdetail', needToken: true } });
| // 收货地址编辑
| export let editShip = (params, config = {}) => axios.post('/Api/User/SaveUserShip', params, { custom: { methodName: 'user.editship', needToken: true } });
| // 收货地址删除
| export let removeShip = (params, config = {}) => axios.post('/Api/User/RemoveShip', params, { custom: { methodName: 'user.removeship', needToken: true } });
| // 设置默认收货地址
| export let setDefShip = (params, config = {}) => axios.post('/Api/User/SetDefShip', params, { custom: { methodName: 'user.setdefship', needToken: true } });
| // 获取不同类型营销下单支持的配送方式
| export let getOrderDistributionModel = (params, config = {}) => axios.post('/Api/Order/GetOrderDistributionModel', params, { custom: { methodName: 'order.getOrderdistributionmodel', needToken: true } });
| // 生成订单
| export let createOrder = (params, config = {}) => axios.post('/Api/Order/CreateOrder', params, { custom: { methodName: 'order.create', needToken: true } });
| //获取支付信息
| export let paymentsCheckpay = (params, config = {}) => axios.post('/Api/Payments/CheckPay', params, { custom: { methodName: 'payments.checkpay', needToken: true } });
| // 获取支付方式列表
| export let paymentList = (params, config = {}) => axios.post('/Api/Payments/GetList', params, { custom: { methodName: 'payments.getlist', needToken: false } });
| // 获取支付单详情
| export let paymentInfo = (params, config = {}) => axios.post('/Api/Payments/GetInfo', params, { custom: { methodName: 'payments.getinfo', needToken: true } });
| // 支付接口
| export let pay = (params, config = {}) => axios.post('/Api/User/Pay', params, { custom: { methodName: 'user.pay', needToken: true } });
|
| // 获取默认的门店
| export let defaultStore = (params, config = {}) => axios.post('/Api/Store/GetDefaultStore', params, { custom: { methodName: 'store.getdefaultstore', needToken: false } });
|
|