Commit 2e6dd6dc authored by qipeng's avatar qipeng

兑换票增加过期提示

parent 4f4048b9
......@@ -49,6 +49,7 @@ export default {
stringProduct: [], //可兑换产品列表
maskType:false,
active:0,
exchangeEndDate:'',//结束兑换时间
}
},
onLoad(option) {
......@@ -66,6 +67,7 @@ export default {
},
listNumFun(index){//当可选产品>1时 选择的产品是
this.active = index
this.exchangeEndDate = this.stringProduct[index].exchangeEndDate
},
loadMerchantInfo(){//景区详情
var data = {
......@@ -96,7 +98,7 @@ export default {
var productNameGroup = JSON.parse(JSON.stringify(item.productName)).split('(')
item.productNameGroup =JSON.parse(JSON.stringify(productNameGroup))
})
console.log(this.stringProduct)
this.exchangeEndDate = this.stringProduct[0].exchangeEndDate
}else{
uni.showToast({
title: res.message,
......@@ -113,6 +115,17 @@ export default {
}
},
exchangeCode(){//订单查询
var today = this.$commonjs.today()
var todayNum = this.$commonjs.changeTime(today)
var playEndDay = this.$commonjs.changeTime(this.exchangeEndDate)
if(playEndDay<todayNum){
uni.showToast({
title: '当前兑换码已过兑换期限。',
icon: 'none',
duration:5000,
})
return false
}
var data = {
ticketCode : this.ticketCode,
//userId : this.userId,//上线之前注销 此为普通票
......@@ -130,7 +143,10 @@ export default {
this.fromOrderId = res.data.list[0].thirdOrderId
this.pdFromOrderId = res.data.list[0].id
} else {
this.$toast.fail('未查询到相应订单')
uni.showToast({
title: '未查询到相应订单',
icon: 'none'
})
}
}else{
uni.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment