...
|
...
|
@@ -117,9 +117,13 @@ export default function() { |
|
|
}
|
|
|
},
|
|
|
actions: {
|
|
|
async fetchOrderAddress({ commit }, payload) {
|
|
|
async fetchOrderAddress({ commit, state }, payload) {
|
|
|
const orderCount = await this.$api.get('/api/order/confirm/count', payload);
|
|
|
|
|
|
if (state.address?.address_id) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (get(orderCount, 'data.cnt', 0)) {
|
|
|
const addressInfo = await this.$api.get('/api/order/confirm/address');
|
|
|
|
...
|
...
|
@@ -159,10 +163,12 @@ export default function() { |
|
|
const orderInfo = await this.$api.post('/api/order/confirm/buypayment', { skup, api_version: 1 });
|
|
|
|
|
|
if (orderInfo.code !== 200) {
|
|
|
return;
|
|
|
return orderInfo;
|
|
|
}
|
|
|
|
|
|
commit(Types.FETCH_ORDER_BUY_ORDER, orderInfo.data);
|
|
|
|
|
|
return orderInfo;
|
|
|
},
|
|
|
|
|
|
async computeOrder({ commit }, { skup, couponCode, addressId, promotionId }) {
|
...
|
...
|
|