no message
Showing
3 changed files
with
60 additions
and
21 deletions
This diff is collapsed.
Click to expand it.
... | @@ -11,7 +11,10 @@ import 'amfe-flexible/index.js' | ... | @@ -11,7 +11,10 @@ import 'amfe-flexible/index.js' |
11 | Vue.config.productionTip = false | 11 | Vue.config.productionTip = false |
12 | 12 | ||
13 | new Vue({ | 13 | new Vue({ |
14 | router, | ||
15 | store, | ||
16 | render: h => h(App) | ||
17 | }).$mount('#app') | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
14 | router, | ||
15 | store, | ||
16 | data: { | ||
17 | isInit: false, | ||
18 | }, | ||
19 | render: h => h(App) | ||
20 | }).$mount('#app') | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="home"> | 2 | <div class="home"> |
3 | <div class="title"></div> | 3 | <div class="title"></div> |
4 | <div class="sys-btn btn-margin" @click="toSign">立即报名</div> | 4 | <div class="sys-btn btn-margin" @click="toSign">立即报名</div> |
5 | <div class="rule"></div> | 5 | <div class="rule"></div> |
6 | <div class="prize"></div> | 6 | <div class="prize"></div> |
7 | <div class="leap-01"></div> | 7 | <div class="leap-01"></div> |
8 | <div class="leap-02"></div> | 8 | <div class="leap-02"></div> |
9 | <div class="leap-03"></div> | 9 | <div class="leap-03"></div> |
10 | <div class="remain"></div> | 10 | <div class="remain"></div> |
11 | 11 | ||
12 | <biz-model v-model="model"></biz-model> | 12 | <biz-model v-model="model"></biz-model> |
13 | <bottom-tool v-model="activityIndex"></bottom-tool> | 13 | <bottom-tool v-model="activityIndex"></bottom-tool> |
14 | </div> | 14 | </div> |
15 | </template> | 15 | </template> |
16 | 16 | ||
17 | <script> | 17 | <script> |
... | @@ -37,9 +37,9 @@ export default { | ... | @@ -37,9 +37,9 @@ export default { |
37 | show: false, | 37 | show: false, |
38 | title: "", | 38 | title: "", |
39 | content: "", | 39 | content: "", |
40 | index: "subcribe-02", | 40 | index: "", |
41 | // index : "submit", | 41 | // index : "submit", |
42 | btnShow: false, | 42 | btnShow: true, |
43 | btnText: "", | 43 | btnText: "", |
44 | confirmHandler: null, | 44 | confirmHandler: null, |
45 | labelBtnShow: false, | 45 | labelBtnShow: false, |
... | @@ -50,25 +50,61 @@ export default { | ... | @@ -50,25 +50,61 @@ export default { |
50 | }, | 50 | }, |
51 | methods: { | 51 | methods: { |
52 | toSign() { | 52 | toSign() { |
53 | |||
54 | Toast.loading({ | 53 | Toast.loading({ |
55 | mask: true, | 54 | mask: true, |
56 | message: "请稍等..." | 55 | message: "请稍等..." |
57 | }); | 56 | }); |
58 | 57 | ||
59 | httpGet({ url: urls.index }).then(res => { | 58 | httpGet({ url: urls.index }).then(res => { |
60 | Toast.clear(); | 59 | Toast.clear(); |
61 | if (res.isSubcribe == 1) { | 60 | if (res.isSubcribe == 1) { |
62 | this.$router.push("/sign"); | 61 | this.$router.push("/sign"); |
63 | } else { | 62 | } else { |
64 | this.model.show = true; | 63 | this.showSubcribeModel(); |
65 | } | 64 | } |
66 | }); | 65 | }); |
66 | }, | ||
67 | showAwardModel() { | ||
68 | this.model.show = true; | ||
69 | this.model.title = "活动结束"; | ||
70 | this.model.content = ""; | ||
71 | this.model.btnShow = true; | ||
72 | this.model.btnText = "前往填写"; | ||
73 | this.model.index = "award"; | ||
74 | this.model.confirmHandler = this.toAward; | ||
75 | this.model.labelBtnShow = false; | ||
76 | this.model.labelBtnText = ""; | ||
77 | this.model.labelBtnHandler = null; | ||
78 | }, | ||
79 | showSubcribeModel() { | ||
80 | this.model.show = true; | ||
81 | this.model.title = ""; | ||
82 | this.model.content = ""; | ||
83 | this.model.btnShow = false; | ||
84 | this.model.btnText = ""; | ||
85 | this.model.index = "subcribe-02"; | ||
86 | this.model.confirmHandler = null; | ||
87 | this.model.labelBtnShow = false; | ||
88 | this.model.labelBtnText = ""; | ||
89 | this.model.labelBtnHandler = null; | ||
90 | }, | ||
91 | toAward() { | ||
92 | console.log("toAward"); | ||
93 | this.model.show = false; | ||
94 | this.$router.push({ | ||
95 | path: "award" | ||
96 | }); | ||
67 | } | 97 | } |
68 | }, | 98 | }, |
69 | components: { | 99 | components: { |
70 | BottomTool, | 100 | BottomTool, |
71 | BizModel | 101 | BizModel |
102 | }, | ||
103 | created() { | ||
104 | if (!this.$root.isInit) { | ||
105 | this.$root.isInit = true; | ||
106 | this.showAwardModel(); | ||
107 | } | ||
72 | } | 108 | } |
73 | }; | 109 | }; |
74 | </script> | 110 | </script> | ... | ... |
-
Please register or sign in to post a comment