|
@@ -24,9 +24,11 @@ Page({ |
|
@@ -24,9 +24,11 @@ Page({ |
|
24
|
signboard: {},
|
24
|
signboard: {},
|
|
25
|
store: {},
|
25
|
store: {},
|
|
26
|
recharge_data: {},
|
26
|
recharge_data: {},
|
|
27
|
- activeData: {},
|
|
|
|
28
|
coupon_dataList: [],
|
27
|
coupon_dataList: [],
|
|
29
|
seller: {},
|
28
|
seller: {},
|
|
|
|
29
|
+ priceInfo: '',
|
|
|
|
30
|
+ scoreInfo: '',
|
|
|
|
31
|
+ certificate: '',
|
|
30
|
dataStr: Date.now() * 1 / 1000,
|
32
|
dataStr: Date.now() * 1 / 1000,
|
|
31
|
swich_phone: '0', //是否显示前台电话
|
33
|
swich_phone: '0', //是否显示前台电话
|
|
32
|
is_comments: '0',
|
34
|
is_comments: '0',
|
|
@@ -671,8 +673,10 @@ Page({ |
|
@@ -671,8 +673,10 @@ Page({ |
|
671
|
couponList = this.addCoupons(coupon_data_free,couponList);
|
673
|
couponList = this.addCoupons(coupon_data_free,couponList);
|
|
672
|
// 根据券ID获取券详情
|
674
|
// 根据券ID获取券详情
|
|
673
|
this.getActivityByIdFun(couponList)
|
675
|
this.getActivityByIdFun(couponList)
|
|
674
|
- // 获取所有充值活动
|
|
|
|
675
|
- this.getRechargeDetail()
|
676
|
+ // 根据充值ID获取充值详情
|
|
|
|
677
|
+ if (marketing && marketing.is_recharge && marketing.is_recharge == '1' && marketing.recharge_data) {
|
|
|
|
678
|
+ this.getRechargeDetail(marketing.recharge_data.id)
|
|
|
|
679
|
+ }
|
|
676
|
if (store && store.images && store.images.length > 0) store.images = util.determine(store.images);
|
680
|
if (store && store.images && store.images.length > 0) store.images = util.determine(store.images);
|
|
677
|
if (reserve && reserve.park_info_images && reserve.park_info_images.length > 0) reserve.park_info_images = util.determine(reserve.park_info_images);
|
681
|
if (reserve && reserve.park_info_images && reserve.park_info_images.length > 0) reserve.park_info_images = util.determine(reserve.park_info_images);
|
|
678
|
if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images);
|
682
|
if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images);
|
|
@@ -860,42 +864,31 @@ Page({ |
|
@@ -860,42 +864,31 @@ Page({ |
|
860
|
}
|
864
|
}
|
|
861
|
},
|
865
|
},
|
|
862
|
// 根据充值ID获取充值详情
|
866
|
// 根据充值ID获取充值详情
|
|
863
|
- getRechargeDetail() {
|
|
|
|
864
|
- App.Activity.GetNewRechargeList({
|
|
|
|
865
|
- sellerid: this.data.detail.seller.id,
|
867
|
+ getRechargeDetail(id) {
|
|
|
|
868
|
+ App.Activity.GetNewRecharge({
|
|
|
|
869
|
+ id
|
|
866
|
}).then(res => {
|
870
|
}).then(res => {
|
|
867
|
if (res.data) {
|
871
|
if (res.data) {
|
|
868
|
- let arr = []
|
|
|
|
869
|
- res.data.forEach(i => {
|
|
|
|
870
|
- if (i.status != '1') {
|
|
|
|
871
|
- arr.push(i)
|
|
|
|
872
|
- }
|
|
|
|
873
|
- })
|
|
|
|
874
|
- let recharge_data = arr;
|
|
|
|
875
|
- recharge_data.forEach(item => {
|
|
|
|
876
|
- item.recharge_list = item.recharge_list ? JSON.parse(item.recharge_list) : '';
|
|
|
|
877
|
- let recharge_list = item.recharge_list;
|
|
|
|
878
|
- item.priceInfo = '';
|
|
|
|
879
|
- item.scoreInfo = '';
|
|
|
|
880
|
- item.certificate = '';
|
|
|
|
881
|
- if (recharge_list.is_price == '1') item.priceInfo = '会员充值满' + item.recharge_money + '元赠送' + item.recharge_list.price + '元余额';
|
|
|
|
882
|
- if (recharge_list.is_score == '1') item.scoreInfo = '会员充值满' + item.recharge_money + '元赠送' + item.recharge_list.score + '积分';
|
|
|
|
883
|
- if (recharge_list.is_coupons == '1' && recharge_list.coupons_names.length > 0) item.certificate = recharge_list.coupons_names.join('、');
|
|
|
|
884
|
- item.timeStr = util.unixtoTime(item.stime, 'YYYY-MM-DD') + ' - ' + util.unixtoTime(item.etime, 'YYYY-MM-DD')
|
|
|
|
885
|
- })
|
|
|
|
886
|
- // 筛选出 未过期的 && 开启状态的充值活动
|
|
|
|
887
|
- recharge_data = recharge_data.filter(item => {
|
|
|
|
888
|
- return this.data.dataStr < (item.etime * 1) && item.is_open == '1'
|
|
|
|
889
|
- })
|
872
|
+ let detail = res.data
|
|
|
|
873
|
+ let exp_date = res.data.exp_date ? JSON.parse(res.data.exp_date) : ''
|
|
|
|
874
|
+ let recharge_list = res.data.recharge_list ? JSON.parse(res.data.recharge_list) : ''
|
|
|
|
875
|
+ let priceInfo, scoreInfo, certificate;
|
|
|
|
876
|
+ detail.recharge_list = recharge_list;
|
|
|
|
877
|
+ detail.exp_date = exp_date;
|
|
|
|
878
|
+ if (recharge_list.is_price == '1') priceInfo = '会员充值满' + detail.recharge_money + '元赠送' + recharge_list.price + '元余额';
|
|
|
|
879
|
+ if (recharge_list.is_score == '1') scoreInfo = '会员充值满' + detail.recharge_money + '元赠送' + recharge_list.score + '积分';
|
|
|
|
880
|
+ if (recharge_list.is_coupons == '1' && recharge_list.coupons_names.length > 0) certificate = recharge_list.coupons_names.join('、');
|
|
|
|
881
|
+ let recharge_data = (this.data.dataStr < detail.etime * 1 && detail.is_open == '1') ? detail : ''
|
|
890
|
console.log('邀请函--------------充值', recharge_data);
|
882
|
console.log('邀请函--------------充值', recharge_data);
|
|
891
|
this.setData({
|
883
|
this.setData({
|
|
892
|
recharge_data,
|
884
|
recharge_data,
|
|
893
|
- activeData: recharge_data.length > 0 ? recharge_data[0] : {},
|
885
|
+ scoreInfo,
|
|
|
|
886
|
+ priceInfo,
|
|
|
|
887
|
+ certificate
|
|
894
|
})
|
888
|
})
|
|
895
|
} else {
|
889
|
} else {
|
|
896
|
this.setData({
|
890
|
this.setData({
|
|
897
|
- recharge_data: [],
|
|
|
|
898
|
- activeData: {},
|
891
|
+ recharge_data: {},
|
|
899
|
})
|
892
|
})
|
|
900
|
}
|
893
|
}
|
|
901
|
})
|
894
|
})
|