1 line
3.4 KiB
JavaScript
1 line
3.4 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["activity/coupon/member"],{"1d41":function(t,e,n){"use strict";n.r(e);var o=n("b9e4"),r=n("96fd");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("2428");var c=n("828b"),i=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=i.exports},2428:function(t,e,n){"use strict";var o=n("ef0b"),r=n.n(o);r.a},"573f":function(t,e,n){"use strict";(function(t){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("7ca3")),a=o(n("be2d")),c=n("8f59");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var s={data:function(){return{options:{},CartSelect:[],amount:0,UserCoupon:[],id_checked:0,IsUseCoupon:1}},computed:(0,c.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"]),onLoad:function(e){t.setNavigationBarTitle({title:this.__("使用优惠券")});var n=a.default.parseJSON(e.val);this.setData({UserCoupon:n,id_checked:e.user_voucher_id,amount:e.amount,options:e}),e.ifcart&&this.getselect()},methods:u(u({},(0,c.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","getUserInfo"])),{},{getselect:function(){var t=this;t.$.request({url:this.Config.URL.cart.getselect,data:{},success:function(e,n,o,r){200==n&&e["items"].length>0&&t.setData({CartSelect:e["items"]})}})},changecoupon:function(t){parseInt(t.currentTarget.dataset.item_id);this.setData({IsUseCoupon:0,id_checked:parseInt(t.currentTarget.dataset.id)}),this.goback()},uesnothing:function(){this.setData({IsUseCoupon:0,id_checked:0}),this.goback()},goback:function(){var t=this;a.default.navigateBack(1,(function(){var e=t.options;e.user_voucher_id=t.id_checked,t.notice.postNotificationName("RefreshCoupon",e)}))}})};e.default=s}).call(this,n("df3c")["default"])},"96fd":function(t,e,n){"use strict";n.r(e);var o=n("573f"),r=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=r.a},b9e4:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.UserCoupon.length),o=n>0?t.__map(t.UserCoupon,(function(e,n){var o=t.__get_orig(e),r=t.__("¥"),a=t.sprintf(t.__("满(%s)可用"),e.voucher_subtotal),c=t.sprintf(t.__("满 %s 减 %s"),e.voucher_subtotal,e.voucher_price);return{$orig:o,m0:r,m1:a,m2:c}})):null,r=n>0?t.__("不使用优惠券"):null,a=n>0?null:t.__("亲~什么都没有"),c=n>0?null:t.__("赶快去领券中心吧");t.$mp.data=Object.assign({},{$root:{g0:n,l0:o,m3:r,m4:a,m5:c}})},r=[]},ceda:function(t,e,n){"use strict";(function(t,e){var o=n("47a9");n("90c2");o(n("3240"));var r=o(n("1d41"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},ef0b:function(t,e,n){t.exports={theme_bg:"#f30213"}}},[["ceda","common/runtime","common/vendor"]]]); |