pages-coupon-myCoupon.06dd1b2a.js 7.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-coupon-myCoupon"],{"10cc":function(t,e,n){"use strict";var i=n("dbce");Object.defineProperty(e,"__esModule",{value:!0}),e.groom4=o,e.groom1=r,e.groom3=c,e.loadIndexs=s,e.transaction=u,e.upPz=d,e.getQr=f,e.upload=l,e.getCouponList=p,e.getMyCoupons=g,e.lqyhq=v,e.advertisement=h;var a=i(n("03d5"));function o(t){return(0,a.default)({url:"/api/groom/list/4",method:"get",data:t})}function r(t){return(0,a.default)({url:"/api/groom/list/1",method:"get",data:t})}function c(t){return(0,a.default)({url:"/api/groom/list/3",method:"get",data:t})}function s(t){return(0,a.default)({url:"/api/index",method:"get",data:t})}function u(t){return(0,a.default)({url:"/api/edit_pas",method:"post",data:t})}function d(t){return(0,a.default)({url:"/api/examine",method:"post",data:t})}function f(t){return(0,a.default)({url:"/api/brc",method:"get",data:t})}function l(t){return(0,a.upFilse)({url:"/api/upload",method:"post",data:t})}function p(t){return(0,a.default)({url:"/api/coupons",method:"get",data:t})}function g(t,e){return(0,a.default)({url:"/api/coupons/user/"+e,method:"get",data:t})}function v(t){return(0,a.default)({url:"/api/coupon/receive",method:"post",data:t})}function h(t){return(0,a.default)({url:"/api/advertisement",method:"post",data:t})}},3510:function(t,e,n){t.exports=n.p+"static/img/my-kq-1.cc9db60f.png"},"5a57":function(t,e,n){var i=n("9790");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("cbe950ce",i,!0,{sourceMap:!1,shadowMode:!1})},"70a7":function(t,e,n){"use strict";var i=n("4ea4");n("99af"),n("d81d"),n("ac1f"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("5cc0")),o=i(n("8080")),r=n("10cc"),c={components:{uniLoadMore:a.default,empty:o.default},data:function(){return{height:"",tabCurrentIndex:0,navList:[{state:0,text:"全部",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1},{state:1,text:"未使用",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1},{state:2,text:"已使用",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1}]}},onLoad:function(){this.getMyCoupons()},onShow:function(){},onReachBottom:function(){},onReady:function(){var t=this;uni.getSystemInfo({success:function(e){var n=uni.createSelectorQuery();n.select(".swiper-box").boundingClientRect(),n.exec((function(n){t.height=e.windowHeight-n[0].top+"px"}))},fail:function(t){}})},methods:{getMyCoupons:function(t){var e=this,n=this,i=n.tabCurrentIndex,a=n.navList[i];"tab"==t&&a.loaded||"noMore"!=a.loadingType&&"loading"!=a.loadingType&&(a.loadingType="loading",(0,r.getMyCoupons)({pages:a.page,limit:a.limit},a.state).then((function(t){var n=t.data,i=n.map((function(t){return t.coupon_price=+t.coupon_price.replace(",",""),t.use_min_price=+t.use_min_price.replace(",",""),t}));a.orderList=a.orderList.concat(i),console.log(a.orderList),a.page++,a.limit!=n.length?(a.loadingType="noMore",uni.hideLoading(),e.$set(a,"loaded",!0)):a.loadingType="more"})))},tabClick:function(t){this.tabCurrentIndex=t,this.getMyCoupons()},changeTab:function(t){console.log(t,"eeeeeeeeeeeeeeeeee"),t.target.current>this.navList.length-1?this.tabCurrentIndex=0:this.tabCurrentIndex=t.target.current}}};e.default=c},"8b80":function(t,e,n){"use strict";n.r(e);var i=n("bf23"),a=n("d50c");for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("d8a2");var r,c=n("f0c5"),s=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"09b24cfc",null,!1,i["a"],r);e["default"]=s.exports},9790:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-09b24cfc],\n.content[data-v-09b24cfc]{background:#f8f8f8;height:100%}.navbar[data-v-09b24cfc]{display:flex;height:40px;padding:0 5px;background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.06);position:relative;z-index:10}.navbar .nav-item[data-v-09b24cfc]{flex:1;display:flex;justify-content:center;align-items:center;height:100%;font-size:15px;color:#303133;position:relative}.navbar .nav-item.current[data-v-09b24cfc]{color:#ff4c4c}.navbar .nav-item.current[data-v-09b24cfc]:after{content:"";position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:44px;height:0;border-bottom:2px solid #ff4c4c}.swiper-box[data-v-09b24cfc]{height:calc(100% - 40px)}.swiper-box .tab-content[data-v-09b24cfc]{font-size:%?28?%;color:#1b1b1b}.kp-item[data-v-09b24cfc]{width:%?690?%;height:%?240?%;margin:0 auto %?20?%;position:relative}.kp-item .kp-bg[data-v-09b24cfc]{width:%?690?%;height:%?240?%;position:absolute;top:0;left:0}.kp-item .kp-left[data-v-09b24cfc]{width:%?221?%;height:%?240?%;justify-content:center;align-items:center;position:relative;flex-shrink:0}.kp-item .kp-left .left-val[data-v-09b24cfc]{font-size:%?90?%;font-weight:400;color:#fff;text-shadow:0 10px 5px rgba(255,125,69,.3)}.kp-item .kp-left .left-val[data-v-09b24cfc]::before{content:"¥";font-size:%?40?%;font-weight:400;color:#fff}.kp-item .kp-right[data-v-09b24cfc]{flex-grow:1;height:%?240?%;position:relative;flex-direction:column;justify-content:space-between;padding:%?40?%;align-items:flex-end;text-align:right}.kp-item .kp-right .right-tit[data-v-09b24cfc]{font-size:%?40?%;font-weight:400;color:#fff}.kp-item .kp-right .right-tip[data-v-09b24cfc]{font-size:%?24?%;font-weight:400;color:#fff}.kp-item .kp-right .right-time[data-v-09b24cfc]{font-size:%?20?%;font-weight:700;color:#fff}.sy .kp-left .left-val[data-v-09b24cfc]{text-shadow:0 10px 5px hsla(0,0%,67.8%,.3)}body.?%PAGE?%[data-v-09b24cfc]{background:#f8f8f8}',""]),t.exports=e},bf23:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uniLoadMore:n("5cc0").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"navbar"},t._l(t.navList,(function(e,n){return i("v-uni-view",{key:n,staticClass:"nav-item",class:{current:t.tabCurrentIndex===n},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabClick(n)}}},[t._v(t._s(e.text))])})),1),i("v-uni-swiper",{staticClass:"swiper-box",attrs:{current:t.tabCurrentIndex,duration:"300"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.changeTab.apply(void 0,arguments)}}},t._l(t.navList,(function(e,a){return i("v-uni-swiper-item",{key:a,staticClass:"tab-content"},[i("v-uni-scroll-view",{style:{height:t.height},attrs:{"scroll-y":"true"}},[!0===e.loaded&&0===e.orderList.length?i("empty"):t._e(),t._l(e.orderList,(function(e){return i("v-uni-view",{key:e.id,staticClass:"kp-item flex",class:{sy:0!=t.tabCurrentIndex}},[2!=e._type?i("v-uni-image",{staticClass:"kp-bg",attrs:{src:n("3510"),mode:""}}):t._e(),2==e._type?i("v-uni-image",{staticClass:"kp-bg",attrs:{src:n("f5bc"),mode:""}}):t._e(),i("v-uni-view",{staticClass:"kp-left flex"},[i("v-uni-view",{staticClass:"left-val"},[t._v(t._s(e.coupon_price))])],1),i("v-uni-view",{staticClass:"kp-right flex"},[i("v-uni-view",{},[i("v-uni-view",{staticClass:"right-tit clamp2"},[t._v(t._s(e.coupon_title))]),i("v-uni-view",{staticClass:"right-tip"},[t._v("购物下单时自动抵扣")])],1),i("v-uni-view",{staticClass:"right-time"},[t._v("有效期至:"+t._s(e._end_time))])],1)],1)})),i("uni-load-more",{attrs:{status:e.loadingType}})],2)],1)})),1)],1)},o=[]},d50c:function(t,e,n){"use strict";n.r(e);var i=n("70a7"),a=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},d8a2:function(t,e,n){"use strict";var i=n("5a57"),a=n.n(i);a.a},f5bc:function(t,e,n){t.exports=n.p+"static/img/my-kq.260d3f98.png"}}]);