|
@@ -70,12 +70,17 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ onShow: function(){
|
|
|
+ this.setData({
|
|
|
+ haveTapMoney : false
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取团购信息并掉起支付
|
|
|
pay: function (e) {
|
|
|
console.log(e)
|
|
|
- if(this.data.haveTapMoney){
|
|
|
- return false
|
|
|
- }
|
|
|
+ if(this.data.haveTapMoney){
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.setData({
|
|
|
haveTapMoney : true
|
|
|
})
|
|
@@ -267,7 +272,12 @@ Page({
|
|
|
}
|
|
|
// const productId = options.productId;
|
|
|
this.getBookInfo(options.productId);
|
|
|
- this.areYouBookSuper(options.productId)
|
|
|
+ if(this.data.isIOS){
|
|
|
+ this.areYouBookSuper('IOS',options.productId)
|
|
|
+ } else {
|
|
|
+ this.areYouBookSuper('ANDROID',options.productId)
|
|
|
+ }
|
|
|
+
|
|
|
this.getGroupInfo(options.productId)
|
|
|
// if (productId) {
|
|
|
this.setData({
|
|
@@ -277,10 +287,10 @@ Page({
|
|
|
|
|
|
},
|
|
|
// 课本鉴权
|
|
|
- areYouBookSuper: function (productId) {
|
|
|
+ areYouBookSuper: function (os,productId) {
|
|
|
// const productArr = [];
|
|
|
// productArr.push(productId);
|
|
|
- httpRequestApi.areYouSuperSecond(productId).success(res => {
|
|
|
+ httpRequestApi.areYouSuperSecond(os,productId).success(res => {
|
|
|
console.log(res)
|
|
|
this.setData({
|
|
|
imSuper: res.data.data.auth ? true : false,
|
|
@@ -290,7 +300,7 @@ Page({
|
|
|
haveCreatedHelp: res.data.data.createdShare, // 创建过助力团
|
|
|
haveJoinHelp: res.data.data.joinShare, // 参加过助力团
|
|
|
haveJoinNormal: res.data.data.joinOrder, // 参加过支付团
|
|
|
- tasteDay: res.data.data.auth ? util.formatDate(res.data.data.auth.endTime - res.data.data.currentTime,5) : ''
|
|
|
+ tasteDay: res.data.data.auth ? ((res.data.data.auth.endTime - res.data.data.currentTime) / 86400000).toFixed(0) : ''
|
|
|
|
|
|
})
|
|
|
console.log(this.data.imSuper)
|