|
|
|
@ -34,7 +34,6 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: function (options) { |
|
|
|
console.log(app.globalData.product) |
|
|
|
this.setData({ |
|
|
|
type: options.type, |
|
|
|
kjId: app.globalData.kjId, |
|
|
|
@ -249,9 +248,10 @@ Page({ |
|
|
|
postData.team_name = this.data.groupName |
|
|
|
postData.type = 1; |
|
|
|
} |
|
|
|
app.globalData.list[app.globalData.index] = this.data.product |
|
|
|
if(app.globalData.list){ |
|
|
|
app.globalData.list[app.globalData.index] = this.data.product |
|
|
|
} |
|
|
|
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; |
|
|
|
console.log(app.globalData.list,app.globalData.list.length) |
|
|
|
if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){ |
|
|
|
if(app.globalData.createDate){ |
|
|
|
app.globalData.createDate.product_list.push(data.product_list[0]) |
|
|
|
@ -265,7 +265,6 @@ Page({ |
|
|
|
}) |
|
|
|
return |
|
|
|
}else{ |
|
|
|
console.log(app.globalData.list.length,app.globalData.postProduct) |
|
|
|
if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ |
|
|
|
if(app.globalData.createDate){ |
|
|
|
app.globalData.createDate.product_list.push(data.product_list[0]) |
|
|
|
@ -348,11 +347,9 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示 |
|
|
|
*/ |
|
|
|
onShow: function () { |
|
|
|
console.log(this.data.flag); |
|
|
|
if(app.globalData.list.length != 0){ |
|
|
|
if(app.globalData.list && app.globalData.list.length != 0){ |
|
|
|
app.globalData.product = app.globalData.list[app.globalData.index] |
|
|
|
} |
|
|
|
console.log(app.globalData.product) |
|
|
|
if (!this.data.isLogin) { |
|
|
|
commonApi.user_post("token/check").then(res => { |
|
|
|
if (res.code == 1) { |
|
|
|
@ -370,7 +367,6 @@ Page({ |
|
|
|
commonApi.user_post("product/getProductAllowancePrice", { |
|
|
|
product_code: this.data.product.product.product_code |
|
|
|
}).then(resTwo => { |
|
|
|
console.log(resTwo) |
|
|
|
if (resTwo && resTwo.code == 1) { |
|
|
|
this.setData({ |
|
|
|
allowance_data: resTwo.data |
|
|
|
|