提交 49fb5b32 authored 作者: matian's avatar matian

update

上级 2dbbee72
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
}, },
components: { Commonheader }, components: { Commonheader },
props: { props: {
stepList: { type: Array },
data: { type: Object } data: { type: Object }
}, },
mounted() {}, mounted() {},
...@@ -29,7 +30,11 @@ export default { ...@@ -29,7 +30,11 @@ export default {
this.$emit('prev') this.$emit('prev')
}, },
handleSubmit() { handleSubmit() {
this.$emit('next') if (this.stepList[this.stepList.length - 1].num === this.data.num) {
this.$router.push({ path: '/' })
} else {
this.$emit('next')
}
} }
} }
} }
......
...@@ -174,6 +174,7 @@ export default { ...@@ -174,6 +174,7 @@ export default {
this.$emit('next', res.data) this.$emit('next', res.data)
} }
} else { } else {
console.log(res.data, 'rers')
this.$emit('next', res.data) this.$emit('next', res.data)
} }
this.checkedPay = false this.checkedPay = false
......
...@@ -50,6 +50,14 @@ ...@@ -50,6 +50,14 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <van-pagination
v-model="currentPage"
:total-items="this.total"
:items-per-page="2"
style="margin-top: 10px"
@change="handleChangePage"
force-ellipses
/> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -62,6 +70,8 @@ export default { ...@@ -62,6 +70,8 @@ export default {
components: { Commonheader }, components: { Commonheader },
data() { data() {
return { return {
total: '',
currentPage: 1,
title: '首页', title: '首页',
ismySign: true, ismySign: true,
isOtherSign: true, isOtherSign: true,
...@@ -70,6 +80,14 @@ export default { ...@@ -70,6 +80,14 @@ export default {
} }
}, },
methods: { methods: {
// 点击分页
handleChangePage(val) {
console.log(val)
this.currentPage = val
this.getActivityList()
// this.activityList = val
},
// 首页返回按钮 // 首页返回按钮
onClickLeft() {}, onClickLeft() {},
// 右侧按钮 个人中心 // 右侧按钮 个人中心
...@@ -78,8 +96,13 @@ export default { ...@@ -78,8 +96,13 @@ export default {
}, },
// 获取活动列表 // 获取活动列表
getActivityList() { getActivityList() {
getActivityList().then(res => { const params = {
page: this.currentPage,
' per-page': 50
}
getActivityList(params).then(res => {
this.activityList = res.data.list this.activityList = res.data.list
this.total = res.data.total
}) })
}, },
// 报名 // 报名
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- <commonheader @back="handlePrev" :callBack="true" /> --> <!-- <commonheader @back="handlePrev" :callBack="true" /> -->
<!-- 展示 --> <!-- 展示 -->
<template v-if="Object.keys(stepList).length"> <template v-if="Object.keys(stepList).length">
<img-show :data="setpItem" @prev="handlePrev" @next="handleNext" v-if="setpItem.type === 1" /> <img-show :stepList="stepList" :data="setpItem" @prev="handlePrev" @next="handleNext" v-if="setpItem.type === 1" />
<!-- 表单 --> <!-- 表单 -->
<sign-form <sign-form
:data="setpItem" :data="setpItem"
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
// 处理数据 // 处理数据
this.stepList = data.reduce((a, b) => { this.stepList = data.reduce((a, b) => {
// type: 1 是展示不用处理 // type: 1 是展示不用处理
if (b.type === 1) { if (parseInt(b.type) === 1) {
a.push(b) a.push(b)
} else { } else {
// 表单类型的数据处理 // 表单类型的数据处理
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
this.stepIndex++ this.stepIndex++
if (data) { if (data) {
this.setpItem.payData = data this.setpItem.payData = data
console.log(this.setpItem) // console.log(this.setpItem, '12311')
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论