...
|
...
|
@@ -69,4 +69,20 @@ export default { |
|
|
commit(Types.FETCH_YOHO_COUPON_FAILED);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
async getCouponCode({commit}, {code}) {
|
|
|
commit(Types.FETCH_YOHO_COUPON_REQUEST);
|
|
|
|
|
|
const result = await this.$api.post('/api/coupon/yoho/', {
|
|
|
coupon_code: code
|
|
|
});
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
commit(Types.FETCH_YOHO_COUPON_CODE_SUCCESS);
|
|
|
} else {
|
|
|
commit(Types.FETCH_YOHO_COUPON_FAILED);
|
|
|
}
|
|
|
|
|
|
return result || {};
|
|
|
}
|
|
|
}; |
...
|
...
|
|