小程序(及后端)订单详情页完成;后端获取用户订单列表接口完成
This commit is contained in:
28
weixin-miniprogram/services/order.js
Normal file
28
weixin-miniprogram/services/order.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
const send_request = require('../utils/sendRequest')
|
||||
|
||||
/** 商品下单 */
|
||||
export function createOrder(orderList) {
|
||||
let userInfo = wx.getStorageSync("userInfo")
|
||||
// orderList 结构为 [ { goodId, count }, ... ]
|
||||
return send_request({
|
||||
url: '/shop/order/miniprogram/createOrder',
|
||||
method: "POST",
|
||||
data: {
|
||||
"userId": userInfo.id,
|
||||
"orderList": orderList
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 商品下单 */
|
||||
export function getOrderDetail(orderId) {
|
||||
return send_request({
|
||||
url: '/shop/order/miniprogram/orderDetail',
|
||||
method: "GET",
|
||||
data: {
|
||||
"orderId": orderId
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user