glhcp/server/public/_nuxt/2687174.js

1 line
7.9 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[10,18],{488:function(t,e,o){var content=o(491);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(18).default)("d7ac674a",content,!0,{sourceMap:!1})},489:function(t,e,o){"use strict";o.r(e);o(300);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=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},r=(o(490),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},490:function(t,e,o){"use strict";o(488)},491:function(t,e,o){var n=o(17)((function(i){return i[1]}));n.push([t.i,".price-format{align-items:baseline;display:flex}",""]),n.locals={},t.exports=n},518:function(t,e,o){var content=o(529);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(18).default)("23f4c996",content,!0,{sourceMap:!1})},523:function(t,e,o){t.exports=o.p+"img/coupons_img_receive.7169d0c.png"},524:function(t,e,o){t.exports=o.p+"img/bg_coupon_s.7cd7066.png"},525:function(t,e,o){t.exports=o.p+"img/bg_coupon.dc72a74.png"},526:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(145);var r=o(198),c=o(111);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.")}()}},528:function(t,e,o){"use strict";o(518)},529:function(t,e,o){var n=o(17),r=o(196),c=o(524),l=o(525),d=n((function(i){return i[1]})),h=r(c),f=r(l);d.push([t.i,".coupons-list[data-v-4191a6d7]{flex-wrap:wrap;padding:0 18px;position:relative}.coupons-list .item[data-v-4191a6d7]{cursor:pointer;margin-bottom:20px;margin-right:16px;position:relative}.coupons-list .item .info[data-v-4191a6d7]{background:url("+h+") no-repeat;background-size:100%;height:80px;padding:0 10px;width:240px}.coupons-list .item .info.gray[data-v-4191a6d7]{background-image:url("+f+")}.coupons-list .item .info .info-hd[data-v-4191a6d7]{overflow:hidden}.coupons-list .item .tips[data-v-4191a6d7]{background-color:#f2f2f2;height:30px;padding:0 8px;position:relative}.coupons-list .item .tips .tips-con[data-v-4191a6d7]{background-color:#f2f2f2;left:0;padding:10px;position:absolute;top:30px;width:100%;z-index:99}.coupons-list .item .receice[data-v-4191a6d7]{height:45px;position:absolute;right:0;top:0;width:58px}.coupons-list .item .choose[data-v-4191a6d7]{background-color:#ffe72c;color:#ff2c3c;padding:1px 5px;position:absolute;right:0;top:0}.coupons-list .more[data-v-4191a6d7]{bottom:20px;cursor:pointer;position:absolute;right:30px}",""]),d.locals={},t.exports=d},545:function(t,e,o){"use strict";o.r(e);o(30),o(24),o(20),o(23),o(31),o(32);var n=o(526),r=o(8),c=o(10),l=(o(56),o(300),o(12),o(21),o(64),o(14));function d(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function h(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 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,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 o,n;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:o=e.sent,n=o.msg,1==o.code&&(t.$message({message:n,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,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(528),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,n.is_get)}}},[e("div",{class:["info white",{gray:2==t.type||1==t.type||n.is_get}]},[e("div",{staticClass:"info-hd flex"},[e("div",[e("price-formate",{attrs:{price:n.money,"first-size":38,"second-size":38}})],1),t._v(" "),e("div",{staticClass:"m-l-8 flex1"},[e("div",{staticClass:"line1"},[t._v(t._s(n.name))]),t._v(" "),e("div",{staticClass:"xs line1"},[t._v(t._s(n.condition_type_desc))])])]),t._v(" "),e("div",{staticClass:"info-time xs"},[t._v(t._s(n.user_time_desc))])]),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(t._s(n.use_scene_desc))]),t._v(" "),1==n.use_goods_type||1!=t.type&&2!=t.type&&0!=t.type?t._e():e("div",[e("i",{class:t.showTips[r]?"el-icon-arrow-up":"el-icon-arrow-down"}),t._v(" "),"全场通用"!=n.use_scene_desc&&t.showTips[r]?e("div",{staticClass:"tips-con xs lighter"},[t._v("\n "+t._s(n.use_goods_desc)+"\n ")]):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(523),alt:""}}):t._e(),t._v(" "),4==t.type&&t.id==n.id?e("div",{staticClass:"choose xs"},[t._v("已选择")]):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,"4191a6d7",null);e.default=component.exports;installComponents(component,{PriceFormate:o(489).default})}}]);