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
11 KiB
1 lines
11 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-coupon-index"],{"5bd6":function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("d9e2"),a("d401"),a("d81d"),a("14d9"),a("c975");var r=n(a("d4ec")),i=n(a("bee2")),o=function(){function e(t){var a=this;(0,r.default)(this,e);var n=[],i=[];if(!Array.isArray(t))throw new Error("param is not an array!");t.map((function(e){e.key&&e.name&&(n.push(e.key),i.push(e.value),a[e.key]=e,e.key!==e.value&&(a[e.value]=e))})),this.data=t,this.keyArr=n,this.valueArr=i}return(0,i.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},7182:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a("5bd6")),i=new r.default([{key:"ALL",name:"全部商品",value:10},{key:"SOME_GOODS",name:"指定商品",value:20}]);t.default=i},8790:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a("5bd6")),i=new r.default([{key:"RECEIVE",name:"领取后",value:10},{key:"FIXED_TIME",name:"固定时间",value:20}]);t.default=i},"8ed6":function(e,t,a){"use strict";var n=a("b0f8"),r=a.n(n);r.a},"8f02":function(e,t,a){"use strict";a.r(t);var n=a("ff95"),r=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=r.a},"91dc":function(e,t,a){var n=a("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\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},a1c7:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a("5bd6")),i=new r.default([{key:"FULL_DISCOUNT",name:"满减券",value:10},{key:"DISCOUNT",name:"折扣券",value:20}]);t.default=i},b0f8:function(e,t,a){var n=a("91dc");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=a("4f06").default;r("73d040c6",n,!0,{sourceMap:!1,shadowMode:!1})},b7bf:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.receive=t.list=void 0;var r=n(a("5530")),i=n(a("0227")),o={list:"myCoupon/list",receive:"myCoupon/receive"};t.list=function(e,t){var a=(0,r.default)({isPrompt:!0,load:!0},t);return i.default.get(o.list,e,a)};t.receive=function(e,t){return i.default.post(o.receive,(0,r.default)((0,r.default)({couponId:e},e),{},{data:t}))}},df5e:function(e,t,a){"use strict";a.r(t);var n=a("e760"),r=a("8f02");for(var i in r)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return r[e]}))}(i);a("8ed6");var o=a("f0c5"),u=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"2307edc4",null,!1,n["a"],void 0);t["default"]=u.exports},e760:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return n}));var n={uTabs:a("6827").default},r=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)},i=[]},fa24:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ApplyRangeEnum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"CouponTypeEnum",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ExpireTypeEnum",{enumerable:!0,get:function(){return i.default}});var r=n(a("7182")),i=n(a("8790")),o=n(a("a1c7"))},ff95:function(e,t,a){"use strict";a("7a82");var n=a("dbce").default,r=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("d3b7");var i=r(a("0641")),o=r(a("57a2")),u=a("1a63"),d=n(a("b7bf")),s=a("fa24"),l=["red","blue","violet","yellow"],c=[{name:"未使用",value:"isUnused"},{name:"已使用",value:"isUse"},{name:"已过期",value:"isExpire"}],f={components:{MescrollBody:i.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 r=n.data.list;t.list.data=(0,u.getMoreListData)(r,t.list,e),a(r)}))}))},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}}]);
|