9d879fe4 by simon

no message

1 parent 7bea0642
......@@ -11,7 +11,10 @@ import 'amfe-flexible/index.js'
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
\ No newline at end of file
router,
store,
data: {
isInit: false,
},
render: h => h(App)
}).$mount('#app')
......
<template>
<div class="home">
<div class="title"></div>
<div class="sys-btn btn-margin" @click="toSign">立即报名</div>
<div class="rule"></div>
<div class="prize"></div>
<div class="leap-01"></div>
<div class="leap-02"></div>
<div class="leap-03"></div>
<div class="remain"></div>
<div class="home">
<div class="title"></div>
<div class="sys-btn btn-margin" @click="toSign">立即报名</div>
<div class="rule"></div>
<div class="prize"></div>
<div class="leap-01"></div>
<div class="leap-02"></div>
<div class="leap-03"></div>
<div class="remain"></div>
<biz-model v-model="model"></biz-model>
<bottom-tool v-model="activityIndex"></bottom-tool>
</div>
<biz-model v-model="model"></biz-model>
<bottom-tool v-model="activityIndex"></bottom-tool>
</div>
</template>
<script>
......@@ -37,9 +37,9 @@ export default {
show: false,
title: "",
content: "",
index: "subcribe-02",
index: "",
// index : "submit",
btnShow: false,
btnShow: true,
btnText: "",
confirmHandler: null,
labelBtnShow: false,
......@@ -50,25 +50,61 @@ export default {
},
methods: {
toSign() {
Toast.loading({
mask: true,
message: "请稍等..."
});
httpGet({ url: urls.index }).then(res => {
Toast.clear();
if (res.isSubcribe == 1) {
this.$router.push("/sign");
} else {
this.model.show = true;
this.showSubcribeModel();
}
});
},
showAwardModel() {
this.model.show = true;
this.model.title = "活动结束";
this.model.content = "";
this.model.btnShow = true;
this.model.btnText = "前往填写";
this.model.index = "award";
this.model.confirmHandler = this.toAward;
this.model.labelBtnShow = false;
this.model.labelBtnText = "";
this.model.labelBtnHandler = null;
},
showSubcribeModel() {
this.model.show = true;
this.model.title = "";
this.model.content = "";
this.model.btnShow = false;
this.model.btnText = "";
this.model.index = "subcribe-02";
this.model.confirmHandler = null;
this.model.labelBtnShow = false;
this.model.labelBtnText = "";
this.model.labelBtnHandler = null;
},
toAward() {
console.log("toAward");
this.model.show = false;
this.$router.push({
path: "award"
});
}
},
components: {
BottomTool,
BizModel
},
created() {
if (!this.$root.isInit) {
this.$root.isInit = true;
this.showAwardModel();
}
}
};
</script>
......