1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

小程序(及后端)订单详情页完成;后端获取用户订单列表接口完成

This commit is contained in:
2023-03-20 00:24:19 +08:00
parent 90a17c926e
commit 960280b11e
29 changed files with 838 additions and 53 deletions

View 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
}
})
}