delivery.js 619 B

12345678910111213141516171819202122232425262728293031
  1. import http from '@/request/index.js';
  2. // 上架详情
  3. export const state = {
  4. deliveryData: []
  5. };
  6. export const mutations = {
  7. setDeliveryData(state, data) {
  8. state.deliveryData = data
  9. },
  10. }
  11. export const actions = {
  12. getDeliveryData({
  13. commit,
  14. rootState
  15. }, data) {
  16. return new Promise((resolve, reject) => {
  17. http('delivery.getListData', {
  18. ...data.pam,
  19. }, '加载中').then(res => {
  20. if (res.success == true) {
  21. data.that.$refs.paging.complete(res.data.records);
  22. } else {
  23. // commit('DetailsData', []);
  24. }
  25. }).catch(e => {
  26. reject(e)
  27. })
  28. })
  29. },
  30. }