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

update

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