order.js 775 B

123456789101112131415161718192021222324
  1. import axios from '~/plugins/axios'
  2. export const actions = {
  3. // 获取卖家中心订单列表
  4. getSellOrderList ({ commit }, params = {}) {
  5. commit('order/REQUEST_ORDERLIST')
  6. return axios.get('/trade/purchase/status/createtime', {params})
  7. .then(response => {
  8. commit('order/GET_ORDERLIST_SUCCESS', response.data)
  9. }, err => {
  10. commit('order/GET_ORDERLIST_FAILURE', err)
  11. })
  12. },
  13. // 获取买家中心订单列表
  14. getBuyerOrderList ({ commit }, params = {}) {
  15. commit('order/REQUEST_ORDERLIST')
  16. return axios.get('/trade/history/goods/list', {params})
  17. .then(response => {
  18. commit('order/GET_ORDERLIST_SUCCESS', response.data)
  19. }, err => {
  20. commit('order/GET_ORDERLIST_FAILURE', err)
  21. })
  22. },
  23. }