提交 17dd3ead authored 作者: lihuihui's avatar lihuihui

update

上级 e0f63721
......@@ -146,7 +146,6 @@ export default {
isRemoveInfo(item) {
return !!item.find(f => f.enable_edit === false)
},
// 提交
onSubmit() {
const params = {
......@@ -177,7 +176,6 @@ export default {
})
}
})
let flag = false
params.users_info.forEach(item => {
if (item.check_in_time && item.check_out_time) {
......
......@@ -21,7 +21,7 @@ const routes = [
},
// 报名页面
{
path: '/SignMainPage',
path: '/signmainpage',
component: () => import('./views/SignMainPage.vue')
},
// 订单支付
......
......@@ -141,7 +141,7 @@ export default {
})
.then(() => {
this.$router.push({
path: '/SignMainPage',
path: '/signmainpage',
query: {
id: item.id
}
......@@ -154,7 +154,7 @@ export default {
if (this.detailList.self_fill_in.need_fill_in_status) {
this.$router.push({
path: '/SignMainPage',
path: '/signmainpage',
query: {
id: item.id
}
......@@ -169,7 +169,7 @@ export default {
})
.then(() => {
this.$router.push({
path: '/SignMainPage',
path: '/signmainpage',
query: {
id: item.id
}
......
......@@ -83,7 +83,15 @@ export default {
},
getOrderList() {
getOrderList().then(res => {
this.orderList = res.data
this.orderList = res.data.map(item => {
const listItem = item.list[0]
if (listItem) {
const findItem = item.activity.details.find(i => i.id === listItem.pay_record.activity_detail_id)
console.log(findItem, 'list')
item.activity.name = `${item.activity.name}-${findItem.title}`
}
return item
})
})
},
getDataByType(type) {
......@@ -111,7 +119,7 @@ export default {
stepDetails.join_rand = item.join_rand
window.localStorage.orderStepDetails = JSON.stringify([stepDetails])
this.$router.push({
path: '/SignMainPage'
path: '/signmainpage'
})
}
}
......
......@@ -128,7 +128,7 @@ export default {
},
continueSign() {
this.$router.push({
path: 'SignMainPage',
path: 'signmainpage',
query: {
activityId: this.$route.query.activityId
}
......
......@@ -61,6 +61,7 @@ export default {
},
mounted() {
this.userMobile = JSON.parse(window.localStorage.userInfo).mobile
console.log(this.$route.query, 'query')
if (this.$route.query.id) {
this.getActivityDetail()
} else {
......@@ -115,12 +116,37 @@ export default {
// if (!findOwn) {
// data[fields].list.push(data.info)
// }
item.list = data[fields].list
item.list.map((ci, index) => {
const fItem = ci.pay_records.find(cif => cif.activity_detail_id === item.id)
if (fItem) {
item.join_rand = fItem.join_rand
}
item.mobile === data.info.mobile ? (item.index = 0) : item.index = index + 1
return item
})
// const payRecords = item.list[0] ? item.list[0].pay_records : ''
// if (Array.isArray(payRecords)) {
// console.log(payRecords, 'payRecords')
// }
// if (payRecords) {
// if (payRecords.activity_detail_id === item.id) {
// item.join_rand = payRecords.join_rand
// } else {
// item.list.push(data.info)
// }
// }
// 添加index用于用户排序
item.list = data[fields].list.map((item, index) => {
item.mobile === data.info.mobile ? (item.index = 0) : (item.index = index + 1)
if (item.mobile === data.info.mobile) {
item.index = 0
} else {
item.index = index + 1
}
return item
})
item.join_rand = item.list[0] ? item.list[0].pay_records[0].join_rand : ''
console.log(item.list, 'listitem')
// item.join_rand = item.list[0] ? item.list[0].pay_records[0].join_rand : ''
return item
} else {
item.list = []
......@@ -144,7 +170,6 @@ export default {
})
},
setData(data) {
console.log(data, 'datas')
// 处理数据
this.stepList = data.reduce((a, b) => {
// type: 1 是展示不用处理
......@@ -203,6 +228,7 @@ export default {
item.num = index + 1
return item
})
console.log(this.stepList, 'steplist')
},
handlePrev() {
if (this.stepIndex <= 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论