/* 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 } }) } /** 我的订单 */ export function listUserOrder() { let userInfo = wx.getStorageSync("userInfo") return send_request({ url: '/shop/order/miniprogram/listUserOrder', method: "GET", data: { "userId": userInfo.id, } }) }