e98e568.js 10 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[11,19],{473:function(t,e,o){"use strict";var n=o(14),r=o(4),c=o(5),l=o(141),d=o(24),f=o(18),h=o(290),_=o(54),v=o(104),m=o(289),w=o(3),y=o(105).f,x=o(45).f,S=o(23).f,O=o(474),N=o(475).trim,j="Number",C=r.Number,I=C.prototype,k=r.TypeError,E=c("".slice),T=c("".charCodeAt),M=function(t){var e=m(t,"number");return"bigint"==typeof e?e:P(e)},P=function(t){var e,o,n,r,c,l,d,code,f=m(t,"number");if(v(f))throw k("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=N(f),43===(e=T(f,0))||45===e){if(88===(o=T(f,2))||120===o)return NaN}else if(48===e){switch(T(f,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+f}for(l=(c=E(f,2)).length,d=0;d<l;d++)if((code=T(c,d))<48||code>r)return NaN;return parseInt(c,n)}return+f};if(l(j,!C(" 0o1")||!C("0b1")||C("+0x1"))){for(var z,A=function(t){var e=arguments.length<1?0:C(M(t)),o=this;return _(I,o)&&w((function(){O(o)}))?h(Object(e),o,A):e},F=n?y(C):"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(","),L=0;F.length>L;L++)f(C,z=F[L])&&!f(A,z)&&S(A,z,x(C,z));A.prototype=I,I.constructor=A,d(r,j,A,{constructor:!0})}},474:function(t,e,o){var n=o(5);t.exports=n(1..valueOf)},475:function(t,e,o){var n=o(5),r=o(36),c=o(19),l=o(476),d=n("".replace),f="["+l+"]",h=RegExp("^"+f+f+"*"),_=RegExp(f+f+"*$"),v=function(t){return function(e){var o=c(r(e));return 1&t&&(o=d(o,h,"")),2&t&&(o=d(o,_,"")),o}};t.exports={start:v(1),end:v(2),trim:v(3)}},476:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},477:function(t,e,o){var content=o(480);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(17).default)("7c52e05d",content,!0,{sourceMap:!1})},478:function(t,e,o){"use strict";o.r(e);o(473);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(479),o(8)),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},479:function(t,e,o){"use strict";o(477)},480:function(t,e,o){var n=o(16)(!1);n.push([t.i,".price-format{display:flex;align-items:baseline}",""]),t.exports=n},512:function(t,e,o){t.exports=o.p+"img/coupons_img_receive.d691393.png"},513:function(t,e,o){var content=o(542);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(17).default)("163d9f20",content,!0,{sourceMap:!1})},514:function(t,e,o){t.exports=o.p+"img/bg_coupon_s.3f57cfd.png"},515:function(t,e,o){t.exports=o.p+"img/bg_coupon.b22691e.png"},532:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(142);var r=o(192),c=o(110);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.")}()}},541:function(t,e,o){"use strict";o(513)},542:function(t,e,o){var n=o(16),r=o(190),c=o(514),l=o(515),d=n(!1),f=r(c),h=r(l);d.push([t.i,".coupons-list[data-v-abe2a9d0]{padding:0 18px;flex-wrap:wrap;position:relative}.coupons-list .item[data-v-abe2a9d0]{margin-bottom:20px;margin-right:16px;position:relative;cursor:pointer}.coupons-list .item .info[data-v-abe2a9d0]{padding:0 10px;background:url("+f+") no-repeat;width:240px;height:80px;background-size:100%}.coupons-list .item .info.gray[data-v-abe2a9d0]{background-image:url("+h+")}.coupons-list .item .info .info-hd[data-v-abe2a9d0]{overflow:hidden}.coupons-list .item .tips[data-v-abe2a9d0]{position:relative;background-color:#f2f2f2;height:30px;padding:0 8px}.coupons-list .item .tips .tips-con[data-v-abe2a9d0]{width:100%;left:0;background-color:#f2f2f2;position:absolute;top:30px;padding:10px;z-index:99}.coupons-list .item .receice[data-v-abe2a9d0]{position:absolute;top:0;right:0;width:58px;height:45px}.coupons-list .item .choose[data-v-abe2a9d0]{position:absolute;top:0;right:0;background-color:#ffe72c;color:#ff2c3c;padding:1px 5px}.coupons-list .more[data-v-abe2a9d0]{position:absolute;bottom:20px;cursor:pointer;right:30px}",""]),t.exports=d},558:function(t,e,o){"use strict";o.r(e);o(29),o(26),o(20),o(25),o(30),o(31);var n=o(532),r=o(9),c=o(10),l=(o(53),o(473),o(40),o(106),o(12),o(21),o(66),o(13));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 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,isUse:!1}},methods:f(f({},Object(l.b)(["getPublicData"])),{},{onHandle:function(t,e,o,n,r){switch(this.id=t,r){case 0:case 1:case 2:break;case 3:(!e||e&&o)&&(this.getCoupon(),n.is_get=1,n.can_continue_get=0);break;case 4:0==this.type?(console.log(n),this.$router.replace({path:"/shop_street_detail",query:{id:n.shop_id}})):this.$router.replace({path:"/shop_street_detail",query:{id:n.shop.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());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)})),console.log(this.list,"//////"),this.couponsList=this.list},immediate:!0,deep:!0}}},_=(o(541),o(8)),component=Object(_.a)(h,(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"},[e("div",{class:["info white",{gray:2==t.type||1==t.type}]},[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("\n "+t._s(n.condition_type_desc)+"\n ")])])]),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",on:{"!click":function(e){return t.onHandle(n.id,n.is_get,n.can_continue_get,n,3)}}},[t._v("\n 立即领取\n ")]),t._v(" "),n.is_get&&n.can_continue_get?e("div",{staticClass:"primary sm",on:{"!click":function(e){return t.onHandle(n.id,n.is_get,n.can_continue_get,n,3)}}},[t._v("\n 继续领取\n ")]):t._e(),t._v(" "),n.is_get&&!n.can_continue_get||0==t.type?e("div",{staticClass:"primary sm",on:{"!click":function(e){return t.onHandle(n.id,n.is_get,n.can_continue_get,n,4)}}},[t._v("\n 去使用\n ")]):t._e()]),t._v(" "),n.is_get?e("img",{staticClass:"receice",attrs:{src:o(512),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,"abe2a9d0",null);e.default=component.exports;installComponents(component,{PriceFormate:o(478).default})}}]);