123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import axios from '~/plugins/axios'
- export const actions = {
-
- getSellOrderList ({ commit }, params = {}) {
- commit('order/REQUEST_ORDERLIST')
- return axios.get('/trade/purchase/status/createtime', {params})
- .then(response => {
- commit('order/GET_ORDERLIST_SUCCESS', response.data)
- }, err => {
- commit('order/GET_ORDERLIST_SUCCESS', {})
- commit('order/GET_ORDERLIST_FAILURE', err)
- })
- },
-
- getBuyerOrderList ({ commit }, params = {}) {
- commit('order/REQUEST_ORDERLIST')
- return axios.get('/trade/order/individual', {params})
- .then(response => {
- commit('order/GET_ORDERLIST_SUCCESS', response.data)
- }, err => {
- commit('order/GET_ORDERLIST_SUCCESS', {})
- commit('order/GET_ORDERLIST_FAILURE', err)
- })
- },
-
- getLogisticsInfo ({ commit }, params = {}) {
- let id = params.id
- commit('order/REQUEST_LOGISTICS')
- return axios.get(`/trade/logistics/${id}`)
- .then(response => {
- axios.get(`/kdn/logistics/query?companyName=${response.data.companyName}&logisticsCode=${response.data.number}`).then(res => {
- commit('order/GET_LOGISTICS_SUCCESS', res.data)
- }, err => {
- commit('order/GET_LOGISTICS_FAILURE', err)
- })
- }, err => {
- commit('order/GET_LOGISTICS_FAILURE', err)
- })
- }
- }
|