绿满眶商城微信小程序-uniapp
peng
2025-09-12 810fbf8955b99c7e6e4a8551f7e1ffa95515f549
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
127
128
129
130
131
132
133
134
135
136
137
/**
 * 订单相关API
 */
 
import { http, Method } from "@/utils/request.js";
 
 
 
 
/**
 * 选择发票
 * @param params
 */
 export function getReceipt(params) {
  return http.request({
    url: "/trade/carts/select/receipt",
    method: Method.GET,
    needToken: true,
    params,
  });
}
 
/**
 * 选择发票
 * @param id
 */
export function getReceiptDetail(id) {
  return http.request({
    url: `/trade/receipt/${id}`,
    method: Method.GET,
    needToken: true,
  });
}
 
/**
 * 选择配送方式
 * @param params
 */
export function selectedShipMethod(params) {
  return http.request({
    url: "/trade/carts/shippingMethod",
    method: Method.GET,
    needToken: true,
    params,
  });
}
 
/**
 * 获取订单列表
 * @param params
 */
export function getOrderList(params) {
  return http.request({
    url: "/order/order",
    method: Method.GET,
    needToken: true,
    params,
  });
}
/**
 * 获取订单列表
 * @param params
 */
export function getOrderXcxList(params) {
  return http.request({
    url: "/order/order/xcx",
    method: Method.GET,
    needToken: true,
    params,
  });
}
 
/**
 * 获取订单详情
 * @param orderSn 订单编号
 */
export function getOrderDetail(orderSn) {
  return http.request({
    url: `/order/order/${orderSn}`,
    method: Method.GET,
    needToken: true,
  });
}
/**
 * 获取订单详情
 * @param orderSn 订单编号
 */
export function getOrderDetailEdit(orderSn) {
  return http.request({
    url: `/order/order/editAddress/${orderSn}`,
    method: Method.GET,
    needToken: true,
  });
}
 
/**
 * 取消订单
 * @param orderSn 订单编号
 * @param reason   取消原因
 */
export function cancelOrder(orderSn, reason) {
  return http.request({
    url: `/order/order/${orderSn}/cancel`,
    method: Method.POST,
    needToken: true,
    header: { "content-type": "application/x-www-form-urlencoded" },
    data: reason,
  });
}
 
/**
 * 确认收货
 * @param orderSn 订单编号
 */
export function confirmReceipt(orderSn) {
  return http.request({
    url: `/order/order/${orderSn}/receiving`,
    method: Method.POST,
    needToken: true,
  });
}
 
 
 
/**
 * 获取当前拼团订单的拼团分享信息
 * @param {*} parentOrderSn
 * @param {*} skuId
 */
export function getPinTuanShare(parentOrderSn,skuId) {
  return http.request({
    url: `promotion/pintuan/share`,
    method: Method.GET,
    needToken: true,
    params:{parentOrderSn,skuId}
  });
}