Commit c69bb91b1e021a35edb9cac4047bc01e5cf10668
1 parent
08452ee5
营销礼包的开始时间和结束时间是清空了的,如果清空了的处理
Showing
1 changed file
with
9 additions
and
4 deletions
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
... | ... | @@ -400,6 +400,7 @@ Page({ |
400 | 400 | }) |
401 | 401 | }, |
402 | 402 | |
403 | + | |
403 | 404 | GetBuyGiftList: function () { |
404 | 405 | var _this2 = this; |
405 | 406 | var th = this.data; |
... | ... | @@ -440,10 +441,14 @@ Page({ |
440 | 441 | var isStart = 0; |
441 | 442 | var now = ut.gettimestamp(); |
442 | 443 | |
443 | - var str = res.data.data.starTime; | |
444 | - var start = Date.parse(new Date(str)); | |
445 | - start = start / 1000; | |
446 | - if (start < now) isStart = 1; | |
444 | + if(res.data.data.starTime){ | |
445 | + var str = res.data.data.starTime; | |
446 | + var start = Date.parse(new Date(str)); | |
447 | + start = start / 1000; | |
448 | + if (start < now) isStart = 1; | |
449 | + }else{ | |
450 | + isStart = 1; | |
451 | + } | |
447 | 452 | |
448 | 453 | _this2.setData({ |
449 | 454 | giftDate: res.data.data.endTime, | ... | ... |