|
|
@ -8,7 +8,7 @@ Page({ |
|
|
* 页面的初始数据 |
|
|
* 页面的初始数据 |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
product: app.globalData.product, |
|
|
product:null, |
|
|
productNum: 1, |
|
|
productNum: 1, |
|
|
linkmanList: [], |
|
|
linkmanList: [], |
|
|
date: "", |
|
|
date: "", |
|
|
@ -35,12 +35,16 @@ Page({ |
|
|
* 生命周期函数--监听页面加载 |
|
|
* 生命周期函数--监听页面加载 |
|
|
*/ |
|
|
*/ |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
|
|
|
console.log(app.globalData.product); |
|
|
|
|
|
console.log(this.data.date); |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
|
|
|
product: app.globalData.product, |
|
|
type: options.type, |
|
|
type: options.type, |
|
|
kjId: app.globalData.kjId, |
|
|
kjId: app.globalData.kjId, |
|
|
gp_id: app.globalData.gp_id || app.globalData.team_id, |
|
|
gp_id: app.globalData.gp_id || app.globalData.team_id, |
|
|
prizeId: wx.getStorageSync('prizeId'), |
|
|
prizeId: wx.getStorageSync('prizeId'), |
|
|
flag:options.flag, |
|
|
flag:options.flag, |
|
|
|
|
|
date:null, |
|
|
ticket_type:app.globalData.product.sku.ticket_type || 1 |
|
|
ticket_type:app.globalData.product.sku.ticket_type || 1 |
|
|
}) |
|
|
}) |
|
|
if (!app.globalData.product) { |
|
|
if (!app.globalData.product) { |
|
|
@ -60,6 +64,7 @@ Page({ |
|
|
product: app.globalData.product, |
|
|
product: app.globalData.product, |
|
|
singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price |
|
|
singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(this.data.product); |
|
|
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { |
|
|
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { |
|
|
this.couponCom = this.selectAllComponents("#coupon")[0]; |
|
|
this.couponCom = this.selectAllComponents("#coupon")[0]; |
|
|
} |
|
|
} |
|
|
@ -269,7 +274,7 @@ Page({ |
|
|
} |
|
|
} |
|
|
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; |
|
|
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; |
|
|
console.log(app.globalData); |
|
|
console.log(app.globalData); |
|
|
if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){ |
|
|
if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1 &&this.data.type!='museum'){ |
|
|
if(app.globalData.createDate){ |
|
|
if(app.globalData.createDate){ |
|
|
app.globalData.createDate.product_list.push(data.product_list[0]) |
|
|
app.globalData.createDate.product_list.push(data.product_list[0]) |
|
|
}else{ |
|
|
}else{ |
|
|
@ -364,8 +369,7 @@ Page({ |
|
|
* 生命周期函数--监听页面显示 |
|
|
* 生命周期函数--监听页面显示 |
|
|
*/ |
|
|
*/ |
|
|
onShow: function () { |
|
|
onShow: function () { |
|
|
|
|
|
if(app.globalData.list && app.globalData.list.length != 0 && this.data.type!='museum'){ |
|
|
if(app.globalData.list && app.globalData.list.length != 0){ |
|
|
|
|
|
app.globalData.product = app.globalData.list[app.globalData.index] |
|
|
app.globalData.product = app.globalData.list[app.globalData.index] |
|
|
} |
|
|
} |
|
|
if (!this.data.isLogin) { |
|
|
if (!this.data.isLogin) { |
|
|
|