coupon.js 3.6 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/widgets/coupon/coupon"],{"396a":function(t,e,n){"use strict";n.r(e);var o=n("c03a"),r=n.n(o);for(var l in o)["default"].indexOf(l)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(l);e["default"]=r.a},"66c7":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return o}));var o={widgetRoot:function(){return n.e("components/widget-root/widget-root").then(n.bind(null,"df5f"))}},r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.list.length),o=n&&1==t.content.style?t.__map(t.list,(function(e,n){var o=t.__get_orig(e),r=t.__get_style([t.itemStyle(e)]),l=3!=e.condition_type?parseFloat(e.money):null,i=3==e.condition_type?parseFloat(e.discount_ratio):null,c=t.__get_style([t.lineStyle(e)]),a=t.__get_style([t.btnStyle(e)]);return{$orig:o,s0:r,m0:l,m1:i,s1:c,s2:a}})):null,r=n&&2==t.content.style?t.__map(t.list,(function(e,n){var o=t.__get_orig(e),r=t.__get_style([t.itemStyle(e)]),l=3!=e.condition_type?parseFloat(e.money):null,i=3==e.condition_type?parseFloat(e.discount_ratio):null,c=t.__get_style([t.lineStyle(e)]);return{$orig:o,s3:r,m2:l,m3:i,s4:c}})):null,l=n&&3==t.content.style?t.__get_style([2==t.content.bg_type?{"background-image":"url("+t.styles.bg_image+")"}:{}]):null,i=n&&3==t.content.style?t.__map(t.list,(function(e,n){var o=t.__get_orig(e),r=3!=e.condition_type?parseFloat(e.money):null,l=3==e.condition_type?parseFloat(e.discount_ratio):null,i=t.__get_style([t.btnStyle(e)]);return{$orig:o,m4:r,m5:l,s6:i}})):null;t.$mp.data=Object.assign({},{$root:{g0:n,l0:o,l1:r,s5:l,l2:i}})},l=[]},"6d05":function(t,e,n){"use strict";n.r(e);var o=n("66c7"),r=n("396a");for(var l in r)["default"].indexOf(l)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(l);n("a1e2");var i=n("828b"),c=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,"13dc6657",null,!1,o["a"],void 0);e["default"]=c.exports},a1e2:function(t,e,n){"use strict";var o=n("b5f0"),r=n.n(o);r.a},b5f0:function(t,e,n){},c03a:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("dc70"),r={props:{content:{type:[Object,Array]},styles:{type:[Object,Array]}},data:function(){return{receiveStyle:{color:"#999999",bgColor:"#f7f9fa",btnColor:"#FFFFFF",btnBgColor:"#D7D7D7"}}},methods:{handleReceive:function(t){var e=this;if(!this.isLogin)return this.$Router.push("/pages/login/login");(0,o.apiCouponGet)({id:t.id}).then((function(){e.$emit("refresh")}))}},computed:{list:function(){return this.content.data},itemStyle:function(){var t=this.styles,e=this.receiveStyle,n=e.color,o=e.bgColor;return function(e){return e.is_available?{"background-color":o,color:n}:{"background-color":t.bg_color,color:t.text_color}}},lineStyle:function(){var t=this.styles,e=this.receiveStyle.color;return function(n){var o=n.is_available?e:t.text_color;return{"background-image":"repeating-linear-gradient(".concat(o," 0px, ").concat(o," 8rpx, transparent 8rpx,transparent 16rpx)")}}},btnStyle:function(){var t=this.styles,e=this.receiveStyle,n=e.btnColor,o=e.btnBgColor;return function(e){return e.is_available?{"background-color":o,color:n}:{"background-color":t.btn_bg_color,color:t.btn_text_color}}}}};e.default=r}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/widgets/coupon/coupon-create-component',
  4. {
  5. 'components/widgets/coupon/coupon-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('df3c')['createComponent'](__webpack_require__("6d05"))
  7. })
  8. },
  9. [['components/widgets/coupon/coupon-create-component']]
  10. ]);