index.js
5.5 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import { request } from '@/utils/request.js'
// 手机号登录 /api/login/getPhones
export const getLogin = params => request({ url: '/api/login/getPhones', method: 'post', data: params })
// 首页数据 /api/index/index
export const getIndex = () => request({ url: '/api/index/index', method: 'post', data: {} })
// 活动详情 /api/index/active
// export const getDetaile = (id) => request({url: '/api/index/active',method: 'post',data: {id}})
// 搜索 /api/index/Searchfor
export const getSearch = key => request({ url: '/api/index/Searchfor', method: 'post', data: { key } })
// 搜索历史 /api/index/getSearchKeyword
export const getRecord = () => request({ url: '/api/index/getSearchKeyword', method: 'post', data: {} })
// 清空搜索 /api/index/delSearchKeyword
export const getDelRecord = () => request({ url: '/api/index/delSearchKeyword', method: 'post', data: {} })
// 商品接口
// 积分商城 /api/goods/codegoods
export const getCodegood = () => request({ url: '/api/goods/codegoods', method: 'get', data: {} })
// 商品详情 /api/goods/detail
export const getShopDetaile = id => request({ url: '/api/goods/detail', method: 'get', data: { id } })
// 直接购买数据 /api/goods/buyData
export const getbBuyData = params => request({ url: '/api/goods/buyData', method: 'get', data: params })
// 直接购买支付 /api/goods/pay
export const getPay = params => request({ url: '/api/goods/pay', method: 'get', data: params })
//分类接口
// 分类数据 /api/category/fenlei
export const getClassification = () => request({ url: '/api/category/fenlei', method: 'get', data: {} })
// 分类列表 /api/category/fenleilie
export const getTwoClassification = () => request({ url: '/api/category/fenleilie', method: 'post' })
// 分类商品 /api/category/getCategoryGoods
export const getCategoryGoods = data => request({ url: '/api/category/getCategoryGoods', method: 'post', data })
// 购物车
// 添加购物车 /api/cart/add
export const getAddCar = params => request({ url: '/api/cart/add', method: 'get', data: params })
// 购物车列表 /api/cart/index
export const getCarList = () => request({ url: '/api/cart/index', method: 'get', data: {} })
// 增加购物车数量 /api/cart/inc
export const getCarAdd = (cart_id, num) => request({ url: '/api/cart/inc', method: 'get', data: { cart_id, num } })
// 减少购物车数量 /api/cart/sub
export const getCarReduce = (cart_id, num) => request({ url: '/api/cart/sub', method: 'get', data: { cart_id, num } })
// 删除购物车 /api/cart/del
export const getDelCar = cart_ids => request({ url: '/api/cart/del', method: 'get', data: { cart_ids } })
// 购物车结算 /api/cart/settlement
export const getCarsettlement = cart_ids => request({ url: '/api/cart/settlement', method: 'get', data: { cart_ids } })
// 购物车支付 /api/cart/pay
export const getCarPay = params => request({ url: '/api/cart/pay', method: 'get', data: params })
// 我的接口
// 我的首页 /api/user/index
export const getMine = () => request({ url: '/api/user/index', method: 'get', data: {} })
// 订单列表 /api/order/index
export const getOrderList = status => request({ url: '/api/order/index', method: 'get', data: { status } })
// 订单详情 /api/order/detail
export const getOrderdetail = id => request({ url: '/api/order/detail', method: 'get', data: { id } })
// 取消订单 /api/order/cancel
export const getCancleOrder = id => request({ url: '/api/order/cancel', method: 'get', data: { id } })
// 确认收货 /api/order/receipt
export const getReceipt = id => request({ url: '/api/order/receipt', method: 'get', data: { id } })
// 申请售后 /api/order/refund
export const getRefund = id => request({ url: '/api/order/refund', method: 'get', data: { id } })
// 订单支付 /api/order/pay
export const getOrderPay = (id, fangs) => request({ url: '/api/order/pay', method: 'get', data: { id, fangs } })
// 我的余额 /api/user/yue
export const getyue = () => request({ url: '/api/user/yue', method: 'get', data: {} })
// 余额明细 /api/user/getMoneyDetail
export const getMoneyDetail = () => request({ url: '/api/user/getMoneyDetail', method: 'get', data: {} })
// 我的积分 /api/user/myScore
export const getMyScore = () => request({ url: '/api/user/myScore', method: 'get', data: {} })
// 积分明细 /api/user/getScoreDetail
export const getScoreDetail = () => request({ url: '/api/user/getScoreDetail', method: 'get', data: {} })
// 充值折扣列表 /api/user/czlb
export const getPackage = () => request({ url: '/api/user/czlb', method: 'get', data: {} })
// 充值 /api/user/czxt
export const getRecharge = m => request({ url: '/api/user/czxt', method: 'get', data: { m } })
// 写评论 /api/goods/pinglun
export const getComment = params => request({ url: '/api/goods/pinglun', method: 'get', data: params })
// 地址接口
// 地址列表 /api/address/index
export const getAdressList = () => request({ url: '/api/address/index', method: 'post', data: {} })
// 设置地址 /api/address/add
export const getEdit = params => request({ url: '/api/address/add', method: 'post', data: params })
// 地址详情 /api/address/detail
export const getadresDetail = id => request({ url: '/api/address/detail', method: 'post', data: { id } })
// 删除地址 /api/address/del
export const getDelAdres = ids => request({ url: '/api/address/del', method: 'post', data: { ids } })
// 用户协议 /api/common/compact
export const getcompact = () => request({ url: '/api/common/compact', method: 'post' })
// 隐私条款 /api/common/privacyPolicy
export const getprivacyPolicy = () => request({ url: '/api/common/privacyPolicy', method: 'post' })