...
|
...
|
@@ -51,7 +51,7 @@ |
|
|
<script>
|
|
|
import {createNamespacedHelpers} from 'vuex';
|
|
|
|
|
|
const {mapState} = createNamespacedHelpers('coupon/yoho');
|
|
|
const {mapState, mapActions} = createNamespacedHelpers('coupon/yoho');
|
|
|
|
|
|
import Tabs from '../components/tabs';
|
|
|
import FilterBar from '../components/filter-bar';
|
...
|
...
|
@@ -98,7 +98,7 @@ export default { |
|
|
}
|
|
|
],
|
|
|
scrollOptions: {
|
|
|
directionLockThreshold: 0
|
|
|
directionLockThreshold: 0,
|
|
|
},
|
|
|
slideOptions: {
|
|
|
listenScroll: true,
|
...
|
...
|
@@ -123,6 +123,7 @@ export default { |
|
|
this.getNum();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['getCouponCode']),
|
|
|
changePage(current) {
|
|
|
const tab = this.tabLabels[current];
|
|
|
|
...
|
...
|
@@ -149,7 +150,19 @@ export default { |
|
|
this.$refs.tabs.showFilter = false;
|
|
|
},
|
|
|
onSubmitCode() {
|
|
|
|
|
|
this.getCouponCode({code: this.inputCouponCode}).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
this.$createToast({
|
|
|
txt: result.message,
|
|
|
type: 'correct'
|
|
|
});
|
|
|
} else {
|
|
|
this.$createToast({
|
|
|
txt: result.message,
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
...
|
...
|
|