You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.4 KiB
1 lines
4.4 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/coupon/coupon"],{"071e":function(t,i,e){"use strict";(function(t){e("eba6");n(e("66fd"));var i=n(e("cfe9"));function n(t){return t&&t.__esModule?t:{default:t}}t(i.default)}).call(this,e("543d")["createPage"])},1637:function(t,i,e){"use strict";var n;e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){return n}));var o=function(){var t=this,i=t.$createElement,e=(t._self._c,t.__map(t.couponValidList,(function(i,e){var n=t.__get_orig(i),o=t._f("formatDate")(i.highDiscount.salesEndTime,"-");return{$orig:n,f0:o}}))),n=t.__map(t.couponinvalidList,(function(i,e){var n=t.__get_orig(i),o=t._f("formatDate")(i.highDiscount.salesEndTime,"-");return{$orig:n,f1:o}}));t.$mp.data=Object.assign({},{$root:{l0:e,l1:n}})},s=[]},3365:function(t,i,e){"use strict";var n=e("fb2a"),o=e.n(n);o.a},b357:function(t,i,e){"use strict";e.r(i);var n=e("b5f2"),o=e.n(n);for(var s in n)"default"!==s&&function(t){e.d(i,t,(function(){return n[t]}))}(s);i["default"]=o.a},b5f2:function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("b528"),o={data:function(){return{couponValidList:[],couponinvalidList:[],headerTop:0,typeClass:"valid",subState:"",theIndex:null,oldIndex:null,isStop:!1,pageNum:1,pageSize:10,isNoMoreData:!1,loadingText:""}},onPageScroll:function(t){},onPullDownRefresh:function(){setTimeout((function(){t.stopPullDownRefresh()}),1e3)},onLoad:function(){this.getUserDiscountList(1)},filters:{formatDate:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",e=new Date(t),n=e.getFullYear(),o=e.getMonth()+1,s=e.getDate(),a=e.getHours(),u=e.getMinutes(),c=e.getSeconds();return o=o>10?o:"0"+o,s=s>10?s:"0"+s,a=a>10?a:"0"+a,u=u>10?u:"0"+u,c=c>10?c:"0"+c,"".concat(n).concat(i).concat(o).concat(i).concat(s," ").concat(a,":").concat(u,":").concat(c)}},onReachBottom:function(){"valid"==this.typeClass?(this.pageNum=1,this.couponValidList=[],this.isNoMoreData=!1,this.getUserDiscountList(1)):(this.pageNum=1,this.couponinvalidList=[],this.isNoMoreData=!1,this.getUserDiscountList(2))},methods:{getUserDiscountList:function(i){var e=this;if(t.showLoading({title:"加载中..."}),this.isNoMoreData)return t.hideLoading(),this.loadingText="到底了",!1;var o=this.pageNum,s={pageNum:o,status:i,pageSize:this.pageSize};(0,n.getUserDiscountList)(s).then((function(i){"000000"==i.return_code?(t.hideLoading(),e.isNoMoreData=i.return_data.list.length!=e.pageSize,e.pageNum=i.return_data.list.length==e.pageSize?++o:o,"valid"==e.typeClass?e.couponValidList=e.couponValidList.concat(i.return_data.list):e.couponinvalidList=e.couponinvalidList.concat(i.return_data.list)):(e.couponValidList=[],e.couponinvalidList=[],t.hideLoading())}))},jumpcoupons:function(i){t.navigateTo({url:"../mineCouponsDestails/mineCouponsDestails?id="+i})},switchType:function(i){var e=this;this.typeClass!=i&&(t.pageScrollTo({scrollTop:0,duration:0}),this.typeClass=i,this.subState=""==this.typeClass?"":"show"+i,setTimeout((function(){e.oldIndex=null,e.theIndex=null,e.subState="valid"==e.typeClass?"":e.subState}),200),"valid"==this.typeClass?(this.pageNum=1,this.couponValidList=[],this.isNoMoreData=!1,this.getUserDiscountList(1)):(this.pageNum=1,this.couponinvalidList=[],this.isNoMoreData=!1,this.getUserDiscountList(2)))},touchStart:function(t,i){i.touches.length>1?this.isStop=!0:(this.oldIndex=this.theIndex,this.theIndex=null,this.initXY=[i.touches[0].pageX,i.touches[0].pageY])},touchMove:function(t,i){var e=this;if(i.touches.length>1)this.isStop=!0;else{var n=i.touches[0].pageX-this.initXY[0],o=i.touches[0].pageY-this.initXY[1];this.isStop||Math.abs(n)<5||(Math.abs(o)>Math.abs(n)?this.isStop=!0:n<0?(this.theIndex=t,this.isStop=!0):n>0&&null!=this.theIndex&&this.oldIndex==this.theIndex&&(this.oldIndex=t,this.theIndex=null,this.isStop=!0,setTimeout((function(){e.oldIndex=null}),150)))}},touchEnd:function(t,i){this.isStop=!1},deleteCoupon:function(t,i){for(var e=i.length,n=0;n<e;n++)if(t==i[n].id){i.splice(n,1);break}this.oldIndex=null,this.theIndex=null},discard:function(){}}};i.default=o}).call(this,e("543d")["default"])},cfe9:function(t,i,e){"use strict";e.r(i);var n=e("1637"),o=e("b357");for(var s in o)"default"!==s&&function(t){e.d(i,t,(function(){return o[t]}))}(s);e("3365");var a,u=e("f0c5"),c=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],a);i["default"]=c.exports},fb2a:function(t,i,e){}},[["071e","common/runtime","common/vendor"]]]); |