提交 2817952e authored 作者: matian's avatar matian

Auto stash before merge of "master" and "origin/master"

上级 b327478c
......@@ -9,10 +9,5 @@
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
// VConsole will be exported to `window.VConsole` by default.
var vConsole = new window.VConsole()
</script>
</body>
</html>
......@@ -228,11 +228,12 @@ export default {
})
this.data.user_fields.push(baseUserFields)
},
// 点击确定选择时间
onConfirmTime(time) {
this.data.user_fields[this.index][this.cIndex].value = this.bgDate(time)
this.data.user_fields[this.index][this.cIndex].showPicker = false
},
// 日期格式化
bgDate(val) {
const d = new Date(val)
const date = `${d.getFullYear()}-${this.toDo(d.getMonth() + 1)}-${this.toDo(d.getDate())} ${this.toDo(
......@@ -240,19 +241,23 @@ export default {
)}:${this.toDo(d.getMinutes())}:${this.toDo(d.getSeconds())}`
return date
},
// 时间格式化 时分秒变两位数
toDo(n) {
return n < 10 ? `0${n}` : n
},
// 时间弹窗
showTime(index, cIndex) {
this.data.user_fields[index][cIndex].showPicker = true
this.index = index
this.cIndex = cIndex
},
// 选择弹窗
showSelectPicker(index, cIndex) {
this.data.user_fields[index][cIndex].showPicker = true
this.index = index
this.cIndex = cIndex
},
// 点击确定选择项
onConfirm(value) {
this.data.user_fields[this.index][this.cIndex].value = value
this.data.user_fields[this.index][this.cIndex].showPicker = false
......
......@@ -96,30 +96,32 @@ export default {
.map(item => Number(this.payPrice) - Number(item.pay_record.pay_amount))
.reduce((pre, nex) => (pre += nex), 0)
.toFixed(2)
},
getPayLength() {
return this.stepOrderInfo.filter(item => item.pay_record.pay_status === '1')
}
},
mounted() {
this.stepOrderInfo = this.data.payData.list.filter(item => item.pay_record.pay_status !== '1')
console.log(this.stepOrderInfo)
},
methods: {
// 共优惠价格样式
getTotalTotalCompanyPrice() {
const splitPrice = this.totalCompanyPrice.split('.')
// //2.重新赋值
return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>`
},
// 总共价格样式
getTotalPrice() {
const splitPrice = this.totalPrice.split('.')
// //2.重新赋值
return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>`
},
// 实付价样式
getPayPrice() {
const splitPrice = this.payPrice.split('.')
// //2.重新赋值
return `<span style="font-size:0.34rem;">${splitPrice[0]}</span>.<span style="font-size:0.2rem;">${splitPrice[1]}</span>`
},
// 优惠价格样式
getCompanyPrice(item) {
const companyPrice = (Number(this.payPrice).toFixed(2) - Number(item.pay_record.pay_amount).toFixed(2)).toFixed(2)
const splitPrice = companyPrice.split('.')
......@@ -133,33 +135,24 @@ export default {
this.isAll = false
}
},
// 返回
handlePrev() {
this.$emit('prev')
},
// 全选
checkAll() {
this.$refs.checkboxGroup.toggleAll(this.isAll)
},
// 提交 去支付
onSubmit() {
console.log('000')
this.getPayDetail()
},
getPayDetail() {
console.log(this.stepOrderInfo.length, '111')
if (this.stepOrderInfo.length) {
this.stepOrderInfo.forEach((item, index) => {
if (item.pay_record.pay_status === '1') {
const findIndex = this.selctOrderData.findIndex(id => id.id === item.id)
if (findIndex !== -1) {
this.selctOrderData.splice(findIndex, 1)
}
}
})
}
const params = {
pay_record_ids: this.selctOrderData.map(item => item.pay_record.id).toString(),
join_rand: this.data.payData.join_rand
}
// 获取支付二维码 订单id
getPayInfo(params).then(res => {
console.log(this.data, 'this.data')
if (res.code === 0) {
......
......@@ -36,8 +36,6 @@
<script>
import QrcodeVue from 'qrcode.vue'
// import Clipboard from 'clipboard'
// import { Toast } from 'vant'
import { getPayStatus } from '../api'
import commonheader from '../components/Commonheader.vue'
......@@ -139,9 +137,6 @@ export default {
clearInterval(this.time)
},
mounted() {
console.log(this.stepList.length, this.stepList, '111')
console.log(this.data.num, this.data, '222')
if (this.status === 1) {
this.getActivityDetail()
}
......@@ -150,7 +145,6 @@ export default {
this.getPayStatus()
}, 5000)
this.getQrcodeUrl()
// this.initClipboard()
}
}
</script>
......
......@@ -98,7 +98,7 @@ export default {
} else {
initInfo()
}
console.log(this.userMobile, 'phone')
// console.log(this.userMobile, 'phone')
// 初始化拿到数据做的第一步处理:取到需要展示出来的所有页面
function initInfo(fields) {
if (fields) {
......@@ -123,7 +123,7 @@ export default {
item.join_rand = fItem.join_rand
}
// 添加index用于用户排序
ci.mobile === data.info.mobile ? (ci.index = 0) : ci.index = index + 1
ci.mobile === data.info.mobile ? (ci.index = 0) : (ci.index = index + 1)
return item
})
return item
......@@ -208,7 +208,7 @@ export default {
item.num = index + 1
return item
})
console.log(this.stepList, 'steplist')
// console.log(this.stepList, 'steplist')
},
handlePrev() {
if (this.stepIndex <= 0) {
......
export default async function (to, from, next) {
console.log(to)
console.log(from)
next()
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论