| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[53,10,20],{498:function(t,e,o){var content=o(502);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("1df0c15c",content,!0,{sourceMap:!1})},499:function(t,e,o){"use strict";o(22),o(65);e.a={head:function(){var t=this.$store.getters.headerMeta;return{title:t.title,link:[{rel:"icon",type:"image/x-icon",href:t.ico}],meta:[{hid:"description",name:"description",content:t.description},{hid:"keywords",name:"keywords",content:t.keywords}]}}}},500:function(t,e,o){"use strict";o.r(e);o(309);var n={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=parseFloat(t),t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},r=(o(501),o(9)),component=Object(r.a)(n,(function(){var t=this,e=t._self._c;return e("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?e("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),e("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?e("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},501:function(t,e,o){"use strict";o(498)},502:function(t,e,o){var n=o(20)((function(i){return i[1]}));n.push([t.i,".price-format{align-items:baseline;display:flex}",""]),n.locals={},t.exports=n},514:function(t,e,o){var content=o(528);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("2acdc092",content,!0,{sourceMap:!1})},515:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(146);var r=o(207),c=o(107);function l(t){return function(t){if(Array.isArray(t))return Object(n.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.")}()}},526:function(t,e,o){t.exports=o.p+"img/coupons_img_receive.d691393.png"},527:function(t,e,o){"use strict";o(514)},528:function(t,e,o){var n=o(20),r=o(208),c=o(529),l=o(530),d=n((function(i){return i[1]})),h=r(c),f=r(l);d.push([t.i,".coupons-list[data-v-508c0323]{flex-wrap:wrap;padding:0 18px;position:relative}.coupons-list .item[data-v-508c0323]{cursor:pointer;margin-bottom:20px;margin-right:16px;position:relative}.coupons-list .item .info[data-v-508c0323]{background:url("+h+") no-repeat;background-size:100%;height:80px;padding:0 10px;width:240px}.coupons-list .item .info.gray[data-v-508c0323]{background-image:url("+f+")}.coupons-list .item .info .info-hd[data-v-508c0323]{overflow:hidden}.coupons-list .item .tips[data-v-508c0323]{background-color:#f2f2f2;height:30px;padding:0 8px;position:relative}.coupons-list .item .tips .tips-con[data-v-508c0323]{background-color:#f2f2f2;left:0;padding:10px;position:absolute;top:30px;width:100%;z-index:99}.coupons-list .item .receice[data-v-508c0323]{height:45px;position:absolute;right:0;top:0;width:58px}.coupons-list .item .choose[data-v-508c0323]{background-color:#ffe72c;color:#06b85c;padding:1px 5px;position:absolute;right:0;top:0}.coupons-list .more[data-v-508c0323]{bottom:20px;cursor:pointer;position:absolute;right:30px}",""]),d.locals={},t.exports=d},529:function(t,e,o){t.exports=o.p+"img/bg_coupon_s.3f57cfd.png"},530:function(t,e,o){t.exports=o.p+"img/bg_coupon.b22691e.png"},533:function(t,e,o){"use strict";o.r(e);o(32),o(22),o(26),o(33),o(34),o(25);var n=o(515),r=o(7),c=o(10),l=(o(48),o(68),o(309),o(13),o(24),o(14));function d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function h(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?d(Object(o),!0).forEach((function(e){Object(c.a)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var f={props:{list:{type:Array,default:function(){return[]}},type:{type:Number},showMore:{type:Boolean,default:!1}},data:function(){return{showTips:[],couponsList:[],id:"",isMore:!1}},methods:h(h({},Object(l.b)(["getPublicData"])),{},{onHandle:function(t){switch(this.id=t,this.type){case 0:case 1:case 2:break;case 3: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 o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$post("coupon/receive",{id:t.id});case 2:o=e.sent,o.msg,1==o.code&&(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,o){e.isShow=!0,!t.isMore&&o>=4&&(e.isShow=!1)})),this.couponsList=Object(n.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 o=t.map((function(t){return 0}));this.showTips=o,this.list.forEach((function(t,o){t.isShow=!0,e.showMore&&o>=4&&(t.isShow=!1)})),this.couponsList=this.list},immediate:!0,deep:!0}}},v=(o(527),o(9)),component=Object(v.a)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"coupons-list flex"},[t._l(t.couponsList,(function(n,r){return[e("div",{directives:[{name:"show",rawName:"v-show",value:n.isShow,expression:"item.isShow"}],key:r,staticClass:"item",on:{"!click":function(e){return t.onHandle(n.id)}}},[e("div",{class:["info white",{gray:2==t.type||1==t.type||n.is_get}]},[e("div",{staticClass:"info-hd flex"},[3!=n.condition_type?e("div",{staticStyle:{width:"50%"}},[e("price-formate",{attrs:{price:n.money,"first-size":38,"second-size":38}})],1):t._e(),t._v(" "),3==n.condition_type?e("div",{staticStyle:{width:"50%"}},[e("span",{staticStyle:{"font-size":"38px"}},[t._v("\n "+t._s(n.discount_ratio)+" ")]),e("span",[t._v("折")])]):t._e(),t._v(" "),e("div",{staticClass:"m-l-8 flex-1",staticStyle:{width:"50%"}},[e("div",{staticClass:"line-1"},[t._v(t._s(n.name))]),t._v(" "),e("div",{staticClass:"xs line-1"},[t._v("\n "+t._s(n.condition||n.condition_tips)+"\n ")])])]),t._v(" "),e("div",{staticClass:"info-time xs"},[t._v(t._s(n.use_time_text2))])]),t._v(" "),e("div",{staticClass:"tips flex row-between",on:{click:function(e){return e.stopPropagation(),t.onShowTips(r)}}},[e("div",{staticClass:"muted xs"},[t._v("\n "+t._s(n.use_scene||n.goods_tips)+"\n ")]),t._v(" "),n.tips?e("div",[e("i",{class:t.showTips[r]?"el-icon-arrow-up":"el-icon-arrow-down"}),t._v(" "),n.tips&&t.showTips[r]?e("div",{staticClass:"tips-con xs lighter"},[t._v("\n "+t._s(n.tips)+"\n ")]):t._e()]):t._e(),t._v(" "),3!=t.type||n.is_get?t._e():e("div",{staticClass:"primary sm"},[t._v("\n 立即领取\n ")])]),t._v(" "),n.is_get?e("img",{staticClass:"receice",attrs:{src:o(526),alt:""}}):t._e(),t._v(" "),4==t.type&&t.id==n.id?e("div",{staticClass:"choose xs"},[t._v("\n 已选择\n ")]):t._e()])]})),t._v(" "),t.showMore&&t.list.length>4?e("div",{staticClass:"more muted",on:{click:t.changeShow}},[t._v("\n "+t._s(t.isMore?"收起":"更多")+"\n "),e("i",{class:t.isMore?"el-icon-arrow-up":"el-icon-arrow-down"})]):t._e()],2)}),[],!1,null,"508c0323",null);e.default=component.exports;installComponents(component,{PriceFormate:o(500).default})},561:function(t,e,o){t.exports=o.p+"img/coupon_null.c73fd02.png"},602:function(t,e,o){var content=o(670);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("61f69b88",content,!0,{sourceMap:!1})},669:function(t,e,o){"use strict";o(602)},670:function(t,e,o){var n=o(20)((function(i){return i[1]}));n.push([t.i,".user-coupons{padding:10px;width:980px}.user-coupons .coupons-header{border-bottom:1px solid #e5e5e5;padding:10px 5px}.user-coupons .tabs{padding:15px 0}.user-coupons .tabs .button{background:#fff;border:1px solid #e5e5e5;color:#666;display:inline-block;height:30px;line-height:0px;width:104px}.user-coupons .tabs .active{background:#06b85c;border:0;color:#fff}.user-coupons .tabs .data-null{padding-top:100px;text-align:center}",""]),n.locals={},t.exports=n},729:function(t,e,o){"use strict";o.r(e);var n=o(7),r=(o(13),o(48),o(533)),c={mixins:[o(499).a],layout:"user-layout",components:{couponsList:r.default},data:function(){return{active:0,extend:{normal:0,use:0,invalid:0},coupons:[{title:"可使用",type:0,list:[],hasData:!0},{title:"已使用",type:1,list:[],hasData:!0},{title:"已过期",type:2,list:[],hasData:!0}]}},mounted:function(){this.getMyCoupons()},methods:{changeTabs:function(t){this.active=t,this.getMyCoupons()},getMyCoupons:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var o,data,code,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("coupon/my",{params:{status:t.coupons[t.active].type+"",page_size:100}});case 2:if(o=e.sent,data=o.data,code=o.code,console.log(data,code),1==code){for(n in t.extend)t.$set(t.extend,n,data.extend[n]);t.changeData(data)}case 7:case"end":return e.stop()}}),e)})))()},changeData:function(data){var t=this;this.coupons.some((function(e,o){if(console.log(data,o),o==t.active)return Object.assign(e,{list:data.lists,hasData:data.lists.length}),!0}))}}},l=(o(669),o(9)),component=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-coupons"},[e("div",{staticClass:"coupons-header lg"},[t._v("\n 我的优惠券\n ")]),t._v(" "),e("div",{staticClass:"tabs"},[t._l(t.extend,(function(o,n,r){return e("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(o)+")")])})),t._v(" "),t._l(t.coupons,(function(n,r){return e("div",{key:r},[r==t.active?e("div",{staticClass:"m-t-20"},[n.hasData?e("coupons-list",{attrs:{list:n.list,type:t.active}}):e("div",{staticClass:"data-null"},[e("img",{staticStyle:{width:"150px",height:"150px"},attrs:{src:o(561)}}),t._v(" "),e("div",{staticClass:"muted xs"},[t._v("暂无优惠券~")])])],1):t._e()])}))],2)])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{CouponsList:o(533).default})}}]);
|