1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-coupon-index"],{"0a04":function(e,t,a){"use strict";a.r(t);var n=a("80ce"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(r);t["default"]=i.a},"0e25":function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a("21aa")),r=new i.default([{key:"RECEIVE",name:"领取后",value:10},{key:"FIXED_TIME",name:"固定时间",value:20}]);t.default=r},"0f40":function(e,t,a){"use strict";a.r(t);var n=a("42f2"),i=a("0a04");for(var r in i)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(r);a("4a64");var o=a("828b"),u=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"2307edc4",null,!1,n["a"],void 0);t["default"]=u.exports},"202d":function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a("21aa")),r=new i.default([{key:"ALL",name:"全部商品",value:10},{key:"SOME_GOODS",name:"指定商品",value:20}]);t.default=r},"21aa":function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("7a76"),a("c9b5"),a("fd3c"),a("aa9c"),a("5ef2");var i=n(a("80b1")),r=n(a("efe5")),o=function(){function e(t){var a=this;(0,i.default)(this,e);var n=[],r=[];if(!Array.isArray(t))throw new Error("param is not an array!");t.map((function(e){e.key&&e.name&&(n.push(e.key),r.push(e.value),a[e.key]=e,e.key!==e.value&&(a[e.value]=e))})),this.data=t,this.keyArr=n,this.valueArr=r}return(0,r.default)(e,[{key:"keyOf",value:function(e){return this.data[this.keyArr.indexOf(e)]}},{key:"valueOf",value:function(e){return this.data[this.valueArr.indexOf(e)]}},{key:"getNameByKey",value:function(e){var t=this.keyOf(e);if(!t)throw new Error("No enum constant"+e);return t.name}},{key:"getNameByValue",value:function(e){var t=this.valueOf(e);if(!t)throw new Error("No enum constant"+e);return t.name}},{key:"getValueByKey",value:function(e){var t=this.keyOf(e);if(!t)throw new Error("No enum constant"+e);return t.key}},{key:"getData",value:function(){return this.data}}]),e}(),u=o;t.default=u},3783:function(e,t,a){var n=a("831c");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("7ba82958",n,!0,{sourceMap:!1,shadowMode:!1})},"42f2":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return n}));var n={uTabs:a("d87a").default},i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"container"},[a("mescroll-body",{ref:"mescrollRef",attrs:{sticky:!0,down:{use:!1},up:e.upOption},on:{init:function(t){arguments[0]=t=e.$handleEvent(t),e.mescrollInit.apply(void 0,arguments)},up:function(t){arguments[0]=t=e.$handleEvent(t),e.upCallback.apply(void 0,arguments)}}},[a("u-tabs",{attrs:{list:e.tabs,"is-scroll":!1,current:e.curTab,"active-color":"#FA2209",duration:.2},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.onChangeTab.apply(void 0,arguments)}}}),a("v-uni-view",{staticClass:"coupon-list"},e._l(e.list.data,(function(t,n){return a("v-uni-view",{key:n,staticClass:"coupon-item"},[a("v-uni-view",{staticClass:"item-wrapper",class:["color-"+(t.state.value?e.color[n%e.color.length]:"gray")]},[a("v-uni-view",{staticClass:"coupon-type"},[e._v(e._s(e.CouponTypeEnum[t.coupon_type].name))]),a("v-uni-view",{staticClass:"tip dis-flex flex-dir-column flex-x-center"},[t.coupon_type==e.CouponTypeEnum.FULL_DISCOUNT.value?a("v-uni-view",[a("v-uni-text",{staticClass:"f-30"},[e._v("¥")]),a("v-uni-text",{staticClass:"money"},[e._v(e._s(t.reduce_price))])],1):e._e(),t.coupon_type==e.CouponTypeEnum.DISCOUNT.value?a("v-uni-text",{staticClass:"money"},[e._v(e._s(t.discount)+"折")]):e._e(),a("v-uni-text",{staticClass:"pay-line"},[e._v("满"+e._s(t.min_price)+"元可用")])],1),a("v-uni-view",{staticClass:"split-line"}),a("v-uni-view",{staticClass:"content dis-flex flex-dir-column flex-x-between"},[a("v-uni-view",{staticClass:"title"},[e._v(e._s(t.name))]),a("v-uni-view",{staticClass:"bottom dis-flex flex-y-center"},[a("v-uni-view",{staticClass:"time flex-box"},[t.start_time===t.end_time?[e._v(e._s(t.start_time)+" 当天有效")]:[e._v(e._s(t.start_time)+"~"+e._s(t.end_time))]],2),a("v-uni-view",{staticClass:"receive state"},[a("v-uni-text",[e._v(e._s(t.state.text))])],1)],1)],1)],1)],1)})),1)],1)],1)},r=[]},"4a64":function(e,t,a){"use strict";var n=a("3783"),i=a.n(n);i.a},"67ec":function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ApplyRangeEnum",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"CouponTypeEnum",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ExpireTypeEnum",{enumerable:!0,get:function(){return r.default}});var i=n(a("202d")),r=n(a("0e25")),o=n(a("da2e"))},"80ce":function(e,t,a){"use strict";a("6a54");var n=a("3639").default,i=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("bf0f");var r=i(a("292a")),o=i(a("bd05")),u=a("d45e"),d=n(a("e2e1")),s=a("67ec"),l=["red","blue","violet","yellow"],c=[{name:"未使用",value:"isUnused"},{name:"已使用",value:"isUse"},{name:"已过期",value:"isExpire"}],f={components:{MescrollBody:r.default},mixins:[o.default],data:function(){return{CouponTypeEnum:s.CouponTypeEnum,color:l,tabs:c,curTab:0,list:(0,u.getEmptyPaginateObj)(),upOption:{auto:!0,page:{size:15},noMoreSize:4,empty:{tip:"亲,暂无相关优惠券"}}}},onLoad:function(e){},methods:{upCallback:function(e){var t=this;t.getCouponList(e.num).then((function(e){var a=e.data.length,n=e.data.total;t.mescroll.endBySize(a,n)})).catch((function(){return t.mescroll.endErr()}))},getCouponList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this;return new Promise((function(a,n){d.list({dataType:t.getTabValue(),page:e},{load:!1}).then((function(n){var i=n.data.list;t.list.data=(0,u.getMoreListData)(i,t.list,e),a(i)}))}))},getTabValue:function(){return this.tabs[this.curTab].value},onChangeTab:function(e){this.curTab=e,this.onRefreshList()},onRefreshList:function(){var e=this;this.list=(0,u.getEmptyPaginateObj)(),setTimeout((function(){e.mescroll.resetUpScroll()}),120)}}};t.default=f},"831c":function(e,t,a){var n=a("c86c");t=n(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 引入uView全局scss变量文件 */.coupon-list[data-v-2307edc4]{padding:%?20?%}.coupon-item[data-v-2307edc4]{position:relative;overflow:hidden;margin-bottom:%?22?%}.item-wrapper[data-v-2307edc4]{width:100%;display:flex;background:#fff;border-radius:%?8?%;color:#fff;height:%?180?%}.item-wrapper .coupon-type[data-v-2307edc4]{position:absolute;top:0;right:0;z-index:10;width:%?128?%;padding:%?6?% 0;background:#a771ff;font-size:%?20?%;text-align:center;color:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:%?64?% %?64?%;transform-origin:%?64?% %?64?%}.item-wrapper.color-blue[data-v-2307edc4]{background:linear-gradient(-125deg,#57bdbf,#2f9de2)}.item-wrapper.color-red[data-v-2307edc4]{background:linear-gradient(-128deg,#ff6d6d,#ff3636)}.item-wrapper.color-violet[data-v-2307edc4]{background:linear-gradient(-113deg,#ef86ff,#b66ff5)}.item-wrapper.color-violet .coupon-type[data-v-2307edc4]{background:#55b5ff}.item-wrapper.color-yellow[data-v-2307edc4]{background:linear-gradient(-141deg,#f7d059,#fdb054)}.item-wrapper.color-gray[data-v-2307edc4]{background:linear-gradient(-113deg,#bdbdbd,#a2a1a2)}.item-wrapper.color-gray .coupon-type[data-v-2307edc4]{background:#9e9e9e}.item-wrapper .content[data-v-2307edc4]{flex:1;padding:%?30?% %?20?%;border-radius:%?16?% 0 0 %?16?%}.item-wrapper .content .title[data-v-2307edc4]{font-size:%?32?%}.item-wrapper .content .bottom .time[data-v-2307edc4]{font-size:%?24?%}.item-wrapper .content .bottom .receive[data-v-2307edc4]{height:%?46?%;width:%?122?%;line-height:%?46?%;text-align:center;border:%?1?% solid #fff;border-radius:%?30?%;color:#fff;font-size:%?24?%}.item-wrapper .content .bottom .receive.state[data-v-2307edc4]{border:none}.item-wrapper .tip[data-v-2307edc4]{position:relative;flex:0 0 32%;text-align:center;border-radius:0 %?16?% %?16?% 0}.item-wrapper .tip .money[data-v-2307edc4]{font-weight:700;font-size:%?52?%}.item-wrapper .tip .pay-line[data-v-2307edc4]{font-size:%?22?%}.item-wrapper .split-line[data-v-2307edc4]{position:relative;flex:0 0 0;border-left:%?4?% solid #fff;margin:0 %?10?% 0 %?6?%;background:#fff}.item-wrapper .split-line[data-v-2307edc4]:before{border-radius:0 0 %?16?% %?16?%;top:0}.item-wrapper .split-line[data-v-2307edc4]:after{border-radius:%?16?% %?16?% 0 0;bottom:0}.item-wrapper .split-line[data-v-2307edc4]:before, .item-wrapper .split-line[data-v-2307edc4]:after{content:"";position:absolute;width:%?24?%;height:%?12?%;background:#f7f7f7;left:%?-14?%;z-index:1}',""]),e.exports=t},da2e:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a("21aa")),r=new i.default([{key:"FULL_DISCOUNT",name:"满减券",value:10},{key:"DISCOUNT",name:"折扣券",value:20}]);t.default=r},e2e1:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.receive=t.list=void 0;var i=n(a("9b1b")),r=n(a("3318")),o={list:"myCoupon/list",receive:"myCoupon/receive"};t.list=function(e,t){var a=(0,i.default)({isPrompt:!0,load:!0},t);return r.default.get(o.list,e,a)};t.receive=function(e,t){return r.default.post(o.receive,(0,i.default)((0,i.default)({couponId:e},e),{},{data:t}))}}}]); |