Commit 867e2a4a8ba3f0f89c9310ca7713e61a1f9ac841

Authored by pengye
1 parent e824f2d6

免费券详情页面领券失败问题

@@ -60,7 +60,8 @@ Page({ @@ -60,7 +60,8 @@ Page({
60 }, 60 },
61 // 提交订单(免费券) 61 // 提交订单(免费券)
62 submitOrder: util.throttle(function () { 62 submitOrder: util.throttle(function () {
63 - if (this.data.detail.aexpiration && this.data.detail.aexpiration.valid_forever != '1' && (this.data.dataStr > (this.data.detail.etime * 1))) { 63 + let eTime = this.data.detail.useEtime ? new Date(this.data.detail.useEtime).getTime()/1000 : '0';
  64 + if (this.data.detail.aexpiration && this.data.detail.aexpiration.valid_forever != '1' && (this.data.dataStr > eTime )) {
64 return wx.showToast({ 65 return wx.showToast({
65 title: '优惠券已过期,不可购买!', 66 title: '优惠券已过期,不可购买!',
66 duration: 2000, 67 duration: 2000,
@@ -80,7 +80,7 @@ Page({ @@ -80,7 +80,7 @@ Page({
80 getCouponDetail(e){ 80 getCouponDetail(e){
81 const item= e.currentTarget.dataset['item']; 81 const item= e.currentTarget.dataset['item'];
82 wx.navigateTo({ 82 wx.navigateTo({
83 - url: `./seeRecharge?id=${item.id}&name=${this.data.opt.name}`, 83 + url: `./receiveCoupon?id=${item.id}&name=${this.data.opt.name}&types=5&sid=${this.data.opt.sid}`,
84 }) 84 })
85 }, 85 },
86 submitOrder(){ 86 submitOrder(){
@@ -30,13 +30,19 @@ Page({ @@ -30,13 +30,19 @@ Page({
30 sid:this.data.sid 30 sid:this.data.sid
31 }).then(res => { 31 }).then(res => {
32 let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17]; 32 let arr = [9, 10, 11, 12, 13, 14, 15, 16, 17];
33 - let style =arr.includes(parseInt(res.data.type)) 33 + let StyleType = res.data.type;
  34 + let style =arr.includes(parseInt(StyleType))
34 let url = '' 35 let url = ''
35 if (!style) { 36 if (!style) {
36 - url = `/pack-invitation/pages/detail_owner_invitation${res.data.type}?id=${that.data.oid}`; 37 + url = `/pack-invitation/pages/detail_owner_invitation${StyleType}?id=${that.data.oid}`;
37 } else { 38 } else {
38 url = `/pack-invitation/pages/detail_owner_invitation9?id=${that.data.oid}`; 39 url = `/pack-invitation/pages/detail_owner_invitation9?id=${that.data.oid}`;
39 } 40 }
  41 + if(StyleType == '18' || StyleType == '21') url = `/pack-invitation/pages/detail_owner_invitation11?id=${that.data.oid}`;
  42 + if(StyleType == '19' || StyleType == '22') url = `/pack-invitation/pages/detail_owner_invitation12?id=${that.data.oid}`;
  43 + if(StyleType == '20') url = `/pack-invitation/pages/detail_owner_invitation10?id=${that.data.oid}`;
  44 + if(StyleType == '18' || StyleType == '19') url += '&bookType=1';
  45 + if(StyleType == '21' || StyleType == '22') url += '&bookType=2';
40 return wx.reLaunch({ 46 return wx.reLaunch({
41 url 47 url
42 }) 48 })