Commit 2e6dd6dc authored by qipeng's avatar qipeng

兑换票增加过期提示

parent 4f4048b9
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
stringProduct: [], //可兑换产品列表 stringProduct: [], //可兑换产品列表
maskType:false, maskType:false,
active:0, active:0,
exchangeEndDate:'',//结束兑换时间
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -66,6 +67,7 @@ export default { ...@@ -66,6 +67,7 @@ export default {
}, },
listNumFun(index){//当可选产品>1时 选择的产品是 listNumFun(index){//当可选产品>1时 选择的产品是
this.active = index this.active = index
this.exchangeEndDate = this.stringProduct[index].exchangeEndDate
}, },
loadMerchantInfo(){//景区详情 loadMerchantInfo(){//景区详情
var data = { var data = {
...@@ -96,7 +98,7 @@ export default { ...@@ -96,7 +98,7 @@ export default {
var productNameGroup = JSON.parse(JSON.stringify(item.productName)).split('(') var productNameGroup = JSON.parse(JSON.stringify(item.productName)).split('(')
item.productNameGroup =JSON.parse(JSON.stringify(productNameGroup)) item.productNameGroup =JSON.parse(JSON.stringify(productNameGroup))
}) })
console.log(this.stringProduct) this.exchangeEndDate = this.stringProduct[0].exchangeEndDate
}else{ }else{
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
...@@ -113,6 +115,17 @@ export default { ...@@ -113,6 +115,17 @@ export default {
} }
}, },
exchangeCode(){//订单查询 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 = { var data = {
ticketCode : this.ticketCode, ticketCode : this.ticketCode,
//userId : this.userId,//上线之前注销 此为普通票 //userId : this.userId,//上线之前注销 此为普通票
...@@ -130,7 +143,10 @@ export default { ...@@ -130,7 +143,10 @@ export default {
this.fromOrderId = res.data.list[0].thirdOrderId this.fromOrderId = res.data.list[0].thirdOrderId
this.pdFromOrderId = res.data.list[0].id this.pdFromOrderId = res.data.list[0].id
} else { } else {
this.$toast.fail('未查询到相应订单') uni.showToast({
title: '未查询到相应订单',
icon: 'none'
})
} }
}else{ }else{
uni.showToast({ 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