invite.vue
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<LayoutApp :title="title">
<Scroll class="scroll-wrapper" :options="options">
<DetailPage v-if="status"></DetailPage>
<WelcomePage v-else></WelcomePage>
</Scroll>
</LayoutApp>
</template>
<script>
import LayoutApp from '../components/layout/layout-app';
import WelcomePage from './welcome/welcome';
import DetailPage from './detail/detail';
import {Scroll} from 'cube-ui';
import {createNamespacedHelpers} from 'vuex';
const {mapState, mapActions} = createNamespacedHelpers('invite/invite');
export default {
name: 'InvitePage',
async asyncData({store}) {
return store.dispatch('invite/invite/fetchStatus');
},
mounted() {
if (this.status) {
this.fetchAll();
}
this.$root.reportAppStart();
},
data() {
return {
title: '卖家邀新返利',
options: {
bounce: false
}
};
},
computed: {
...mapState(['status'])
},
methods: {
...mapActions(['fetchAll'])
},
components: {
LayoutApp,
WelcomePage,
DetailPage,
Scroll
}
};
</script>
<style lang="scss" scoped>
.scroll-wrapper {
background-color: #08304b;
}
</style>