1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[49,10,16,18],{439:function(t,e,n){"use strict";var o=n(18),r=n(2),c=n(3),l=n(137),d=n(27),f=n(19),h=n(273),v=n(54),m=n(136),_=n(272),y=n(5),x=n(97).f,w=n(45).f,S=n(25).f,O=n(440),C=n(441).trim,N="Number",j=r.Number,k=j.prototype,E=r.TypeError,M=c("".slice),I=c("".charCodeAt),T=function(t){var e=_(t,"number");return"bigint"==typeof e?e:z(e)},z=function(t){var e,n,o,r,c,l,d,code,f=_(t,"number");if(m(f))throw E("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=C(f),43===(e=I(f,0))||45===e){if(88===(n=I(f,2))||120===n)return NaN}else if(48===e){switch(I(f,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+f}for(l=(c=M(f,2)).length,d=0;d<l;d++)if((code=I(c,d))<48||code>r)return NaN;return parseInt(c,o)}return+f};if(l(N,!j(" 0o1")||!j("0b1")||j("+0x1"))){for(var D,P=function(t){var e=arguments.length<1?0:j(T(t)),n=this;return v(k,n)&&y((function(){O(n)}))?h(Object(e),n,P):e},$=o?x(j):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),A=0;$.length>A;A++)f(j,D=$[A])&&!f(P,D)&&S(P,D,w(j,D));P.prototype=k,k.constructor=P,d(r,N,P)}},440:function(t,e,n){var o=n(3);t.exports=o(1..valueOf)},441:function(t,e,n){var o=n(3),r=n(33),c=n(17),l=n(442),d=o("".replace),f="["+l+"]",h=RegExp("^"+f+f+"*"),v=RegExp(f+f+"*$"),m=function(t){return function(e){var n=c(r(e));return 1&t&&(n=d(n,h,"")),2&t&&(n=d(n,v,"")),n}};t.exports={start:m(1),end:m(2),trim:m(3)}},442:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},443:function(t,e,n){var content=n(446);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("3181fc86",content,!0,{sourceMap:!1})},444:function(t,e,n){"use strict";n.r(e);n(439),n(39),n(274);var o={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},r=(n(445),n(9)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?n("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),n("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?n("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},445:function(t,e,n){"use strict";n(443)},446:function(t,e,n){var o=n(14)(!1);o.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=o},447:function(t,e,n){var content=n(449);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("12a18d22",content,!0,{sourceMap:!1})},448:function(t,e,n){"use strict";n(447)},449:function(t,e,n){var o=n(14)(!1);o.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{width:150px;height:150px}",""]),t.exports=o},450:function(t,e,n){"use strict";n.r(e);var o={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},r=(n(448),n(9)),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"bg-white flex-col col-center null-data"},[n("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),n("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},473:function(t,e,n){var content=n(484);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("0d5a77d2",content,!0,{sourceMap:!1})},478:function(t,e,n){t.exports=n.p+"img/coupons_img_receive.d691393.png"},479:function(t,e,n){t.exports=n.p+"img/bg_coupon_s.3f57cfd.png"},480:function(t,e,n){t.exports=n.p+"img/bg_coupon.b22691e.png"},481:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var o=n(138);var r=n(190),c=n(102);function l(t){return function(t){if(Array.isArray(t))return Object(o.a)(t)}(t)||Object(r.a)(t)||Object(c.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},483:function(t,e,n){"use strict";n(473)},484:function(t,e,n){var o=n(14),r=n(189),c=n(479),l=n(480),d=o(!1),f=r(c),h=r(l);d.push([t.i,".coupons-list[data-v-4191a6d7]{padding:0 18px;flex-wrap:wrap;position:relative}.coupons-list .item[data-v-4191a6d7]{margin-bottom:20px;margin-right:16px;position:relative;cursor:pointer}.coupons-list .item .info[data-v-4191a6d7]{padding:0 10px;background:url("+f+") no-repeat;width:240px;height:80px;background-size:100%}.coupons-list .item .info.gray[data-v-4191a6d7]{background-image:url("+h+")}.coupons-list .item .info .info-hd[data-v-4191a6d7]{overflow:hidden}.coupons-list .item .tips[data-v-4191a6d7]{position:relative;background-color:#f2f2f2;height:30px;padding:0 8px}.coupons-list .item .tips .tips-con[data-v-4191a6d7]{width:100%;left:0;background-color:#f2f2f2;position:absolute;top:30px;padding:10px;z-index:99}.coupons-list .item .receice[data-v-4191a6d7]{position:absolute;top:0;right:0;width:58px;height:45px}.coupons-list .item .choose[data-v-4191a6d7]{position:absolute;top:0;right:0;background-color:#ffe72c;color:#ff2c3c;padding:1px 5px}.coupons-list .more[data-v-4191a6d7]{position:absolute;bottom:20px;cursor:pointer;right:30px}",""]),t.exports=d},500:function(t,e,n){"use strict";n.r(e);n(23),n(20),n(22),n(28),n(29);var o=n(481),r=n(6),c=n(10),l=(n(53),n(439),n(11),n(21),n(65),n(12));function d(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function f(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?d(Object(source),!0).forEach((function(e){Object(c.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):d(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var h={props:{list:{type:Array,default:function(){return[]}},type:{type:Number},showMore:{type:Boolean,default:!1}},data:function(){return{showTips:[],couponsList:[],id:"",isMore:!1}},methods:f(f({},Object(l.b)(["getPublicData"])),{},{onHandle:function(t,e){switch(this.id=t,this.type){case 0:case 1:case 2:break;case 3:e||this.getCoupon();break;case 4:this.selectId==t&&(this.id=""),this.$emit("use",this.id),this.selectId=this.id}},getCoupon:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$post("coupon/getCoupon",{coupon_id:t.id});case 2:n=e.sent,o=n.msg,1==n.code&&(t.$message({message:o,type:"success"}),t.getPublicData(),t.$emit("reflash"));case 6:case"end":return e.stop()}}),e)})))()},onShowTips:function(t){var e=this.showTips;this.showTips[t]=e[t]?0:1,this.showTips=Object.assign([],this.showTips)},changeShow:function(){var t=this;this.isMore=!this.isMore,this.list.forEach((function(e,n){e.isShow=!0,!t.isMore&&n>=4&&(e.isShow=!1)})),this.couponsList=Object(o.a)(this.list)}}),watch:{list:{handler:function(t){var e=this;t.length&&4==this.type&&(this.id=t[0].id,this.selectId=this.id,this.$emit("use",this.id));var n=t.map((function(t){return 0}));this.showTips=n,this.list.forEach((function(t,n){t.isShow=!0,e.showMore&&n>=4&&(t.isShow=!1)})),this.couponsList=this.list},immediate:!0,deep:!0}}},v=(n(483),n(9)),component=Object(v.a)(h,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"coupons-list flex"},[t._l(t.couponsList,(function(e,r){return[o("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"item.isShow"}],key:r,staticClass:"item",on:{"!click":function(n){return t.onHandle(e.id,e.is_get)}}},[o("div",{class:["info white",{gray:2==t.type||1==t.type||e.is_get}]},[o("div",{staticClass:"info-hd flex"},[o("div",[o("price-formate",{attrs:{price:e.money,"first-size":38,"second-size":38}})],1),t._v(" "),o("div",{staticClass:"m-l-8 flex1"},[o("div",{staticClass:"line1"},[t._v(t._s(e.name))]),t._v(" "),o("div",{staticClass:"xs line1"},[t._v(t._s(e.condition_type_desc))])])]),t._v(" "),o("div",{staticClass:"info-time xs"},[t._v(t._s(e.user_time_desc))])]),t._v(" "),o("div",{staticClass:"tips flex row-between",on:{click:function(e){return e.stopPropagation(),t.onShowTips(r)}}},[o("div",{staticClass:"muted xs"},[t._v(t._s(e.use_scene_desc))]),t._v(" "),1==e.use_goods_type||1!=t.type&&2!=t.type&&0!=t.type?t._e():o("div",[o("i",{class:t.showTips[r]?"el-icon-arrow-up":"el-icon-arrow-down"}),t._v(" "),"全场通用"!=e.use_scene_desc&&t.showTips[r]?o("div",{staticClass:"tips-con xs lighter"},[t._v("\n "+t._s(e.use_goods_desc)+"\n ")]):t._e()]),t._v(" "),3!=t.type||e.is_get?t._e():o("div",{staticClass:"primary sm"},[t._v("\n 立即领取\n ")])]),t._v(" "),e.is_get?o("img",{staticClass:"receice",attrs:{src:n(478),alt:""}}):t._e(),t._v(" "),4==t.type&&t.id==e.id?o("div",{staticClass:"choose xs"},[t._v("已选择")]):t._e()])]})),t._v(" "),t.showMore&&t.list.length>4?o("div",{staticClass:"more muted",on:{click:t.changeShow}},[t._v("\n "+t._s(t.isMore?"收起":"更多")+"\n "),o("i",{class:t.isMore?"el-icon-arrow-up":"el-icon-arrow-down"})]):t._e()],2)}),[],!1,null,"4191a6d7",null);e.default=component.exports;installComponents(component,{PriceFormate:n(444).default})},507:function(t,e,n){t.exports=n.p+"img/coupon_null.c73fd02.png"},544:function(t,e,n){var content=n(621);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(15).default)("179a17ff",content,!0,{sourceMap:!1})},620:function(t,e,n){"use strict";n(544)},621:function(t,e,n){var o=n(14)(!1);o.push([t.i,".user-coupons{width:980px}.user-coupons .coupons-header{padding:20px 15px;border-bottom:1px solid #e5e5e5}.user-coupons .tabs{padding:15px 0}.user-coupons .tabs .button{width:104px;height:30px;line-height:0;display:inline-block;background:#fff;color:#666;border:1px solid #e5e5e5}.user-coupons .tabs .active{color:#fff;border:0;background:#ff2c3c}",""]),t.exports=o},673:function(t,e,n){"use strict";n.r(e);var o=n(6),r=(n(11),n(53),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",components:{},data:function(){return{active:0,expand:{valid:0,used:0,expired:0},coupons:[{title:"可使用",type:"valid",list:[],hasData:!0},{title:"已使用",type:"used",list:[],hasData:!0},{title:"已过期",type:"expired",list:[],hasData:!0}]}},mounted:function(){this.getMyCoupons()},methods:{changeTabs:function(t){this.active=t,this.getMyCoupons()},getMyCoupons:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){var n,data,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("coupon/myCouponList",{params:{type:t.coupons[t.active].type+"",page_size:100}});case 2:if(n=e.sent,data=n.data,1==n.code){for(o in t.expand)t.$set(t.expand,o,data.expand[o]);t.changeData(data)}case 6:case"end":return e.stop()}}),e)})))()},changeData:function(data){var t=this;this.coupons.some((function(e,n){if(console.log(data,n),n==t.active)return Object.assign(e,{list:data.lists,hasData:data.lists.length}),!0}))}}}),c=(n(620),n(9)),component=Object(c.a)(r,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"user-coupons"},[o("div",{staticClass:"coupons-header lg"},[t._v("\n 我的优惠券\n ")]),t._v(" "),o("div",{staticClass:"tabs"},[t._l(t.expand,(function(e,n,r){return o("el-button",{key:n,staticClass:"button m-l-18",class:r==t.active?"active":"",attrs:{type:"primary"},on:{click:function(e){return t.changeTabs(r)}}},[t._v("\n "+t._s(t.coupons[r].title)+"("+t._s(e)+")")])})),t._v(" "),t._l(t.coupons,(function(e,r){return o("div",{key:r},[r==t.active?o("div",{staticClass:"m-t-20"},[e.hasData?o("coupons-list",{attrs:{list:e.list,type:t.active}}):o("null-data",{attrs:{img:n(507),text:"暂无优惠券~"}})],1):t._e()])}))],2)])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{CouponsList:n(500).default,NullData:n(450).default})}}]); |