| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import axios from '~plugins/axios'
- export const actions = {
- // app获取购物车列表
- 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)
- })
- },
- // app获取结算页订单信息
- 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)
- })
- },
- // app获取结算页收货地址
- 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)
- })
- },
- // app获取结算页发票信息
- loadPayInvoice ({ commit }, params = {}) {
- commit('list/REQUEST_INVOICE')
- return axios.get('/trade/bill/list/personal', {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)
- })
- }
- // // app获取结算页配送规则
- // loadPayFareRule ({ commit }, params = {}) {
- // commit('list/REQUEST_FARE_RULE')
- // return axios.post(`/trade/bill/list/personal?area=${params.area}`, params.storeArr)
- // .then(response => {
- // commit('list/GET_FARE_RULE_SUCCESS', response.data)
- // }, err => {
- // commit('list/GET_FARE_RULE_FAILURE', err)
- // })
- // }
- }
|