1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
epp/weixin-miniprogram/services/order.js

29 lines
661 B
JavaScript

/* 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
}
})
}