1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import axios from '~plugins/axios'
- export const actions = {
-
- loadCartList ({ commit }, params = {}) {
- commit('list/REQUEST_CART')
- return axios.get('/trade/cart/pageInfo', {params: params})
- .then(response => {
- commit('list/GET_CART_SUCCESS', response.data)
- }, err => {
- commit('list/GET_CART_FAILURE', err)
- })
- },
-
- loadPayInfo ({ commit }, params = {}) {
- commit('list/REQUEST_PAY')
- return axios.get('/trade/order/orderContainGoods', {params: params})
- .then(response => {
- commit('list/GET_PAY_SUCCESS', response.data)
- }, err => {
- commit('list/GET_PAY_FAILURE', err)
- })
- },
-
- loadAcceptAddress ({ commit }, params = {}) {
- commit('list/REQUEST_ADDRESS')
- return axios.get('/trade/address/shipping', {params: params})
- .then(response => {
- commit('list/GET_ADDRESS_SUCCESS', response.data)
- }, err => {
- commit('list/GET_ADDRESS_FAILURE', err)
- })
- },
-
- loadPayInvoice ({ commit }, params = {}) {
- commit('list/REQUEST_INVOICE')
- return axios.get('/trade/bill/list', {params: params})
- .then(response => {
- commit('list/GET_INVOICE_SUCCESS', response.data)
- }, err => {
- commit('list/GET_INVOICE_FAILURE', err)
- })
- },
-
- loadOrderData ({ commit }, params = {}) {
- commit('list/REQUEST_ORDER')
- return axios.get(`/trade/order/${params.ids}`)
- .then(response => {
- commit('list/GET_ORDER_SUCCESS', response.data)
- }, err => {
- commit('list/GET_ORDER_FAILURE', err)
- })
- },
-
- loadAccount ({ commit }, params = {}) {
- commit('list/REQUEST_ACCOUNT')
- return axios.get(`/trade/bankInfo/b2c/enterprise`, {params: params})
- .then(response => {
- commit('list/GET_ACCOUNT_SUCCESS', response.data)
- }, err => {
- commit('list/GET_ACCOUNT_FAILURE', err)
- })
- }
-
-
-
-
-
-
-
-
-
-
- }
|