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

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

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