coupon.js 2.9 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/diy/components/coupon"],{"0123":function(t,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o("5743"),e=o("26cb"),u=o("86eb"),c={name:"coupon",props:{dataConfig:{type:Object,default:function(){}},isSortType:{type:String|Number,default:0}},computed:(0,e.mapGetters)(["isLogin"]),components:{authorize:function(){o.e("components/Authorize").then(function(){return resolve(o("ad23"))}.bind(null,o)).catch(o.oe)}},watch:{isLogin:{handler:function(t,n){t&&this.getCoupon()},deep:!0}},data:function(){return{isAuto:!1,isShowAuth:!1,couponList:[],bgColor:this.dataConfig.bgColor.color[0].item,themeColor:this.dataConfig.themeColor.color[0].item,mbConfig:this.dataConfig.mbConfig.val,bgStyle:this.dataConfig.bgStyle.type,prConfig:this.dataConfig.prConfig.val}},created:function(){},mounted:function(){this.getCoupon()},methods:{getCoupon:function(){var t=this,n=t.$config.LIMIT;(0,i.getCoupons)({page:1,limit:n,type:-1}).then((function(n){t.$set(t,"couponList",n.data.list)})).catch((function(n){return t.$util.Tips({title:n})}))},receiveCoupon:function(t){var n=this;n.isLogin?(0,i.setCouponReceive)(t.id).then((function(){t.is_use=!0,n.$set(n,"couponList",n.couponList),n.$util.Tips({title:n.$t("领取成功")})})).catch((function(t){n.$util.Tips({title:t})})):(0,u.toLogin)()}}};n.default=c},"932d":function(t,n,o){"use strict";var i=o("cb98"),e=o.n(i);e.a},b567:function(t,n,o){"use strict";o.r(n);var i=o("b9bff"),e=o("c78d");for(var u in e)["default"].indexOf(u)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(u);o("932d");var c=o("f0c5"),s=Object(c["a"])(e["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=s.exports},b9bff:function(t,n,o){"use strict";o.d(n,"b",(function(){return i})),o.d(n,"c",(function(){return e})),o.d(n,"a",(function(){}));var i=function(){var t=this,n=t.$createElement,o=(t._self._c,t.couponList.length),i=o?t.__map(t.couponList,(function(n,o){var i=t.__get_orig(n),e=t.$t("¥"),u=t.$t("满"),c=t.$t("元可用"),s=1==n.is_use?t.$t("已领取"):null,a=1==n.is_use||n.is_use?null:t.$t("立即领取"),r=1!=n.is_use&&n.is_use&&2==n.is_use?t.$t("已过期"):null;return{$orig:i,m0:e,m1:u,m2:c,m3:s,m4:a,m5:r}})):null,e=o?t.$t("更多"):null;t.$mp.data=Object.assign({},{$root:{g0:o,l0:i,m6:e}})},e=[]},c78d:function(t,n,o){"use strict";o.r(n);var i=o("0123"),e=o.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){o.d(n,t,(function(){return i[t]}))}(u);n["default"]=e.a},cb98:function(t,n,o){}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'pages/index/diy/components/coupon-create-component',
  4. {
  5. 'pages/index/diy/components/coupon-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("b567"))
  7. })
  8. },
  9. [['pages/index/diy/components/coupon-create-component']]
  10. ]);