selectCouponList.js 4.4 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/coupon/selectCouponList"],{2756:function(n,t,o){"use strict";var e=o("5af6"),u=o.n(e);u.a},"3d95":function(n,t,o){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=c(o("644f")),u=o("7736"),r=(o("5315"),o("5f87"),o("34f9"));function c(n){return n&&n.__esModule?n:{default:n}}function i(n,t,o,e,u,r,c){try{var i=n[r](c),s=i.value}catch(a){return void o(a)}i.done?t(s):Promise.resolve(s).then(e,u)}function s(n){return function(){var t=this,o=arguments;return new Promise((function(e,u){var r=n.apply(t,o);function c(n){i(r,e,u,c,s,"next",n)}function s(n){i(r,e,u,c,s,"throw",n)}c(void 0)}))}}function a(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.push.apply(o,e)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){f(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))}))}return n}function f(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}var p=function(){o.e("admin/coupon/components/selectCouponItem").then(function(){return resolve(o("eaf6"))}.bind(null,o)).catch(o.oe)},d={name:"coupon-sel",props:{},components:{selectCouponItem:p},data:function(){return{couponSelInx:null,couponId:0,data:{},couponSum:"0",list:[]}},computed:l(l({},(0,u.mapGetters)({shopUser:"getShopUser"})),{},{usableList:function(){var n=this;return this.list.filter((function(t){return Number(t.miniCost)<=Number(n.option.price)&&2!=t.take}))},unusableList:function(){var n=this;return this.list.filter((function(t){return Number(t.miniCost)>Number(n.option.price)||2==t.take}))}}),mounted:function(){},onShow:function(){null!=n.getStorageSync("selectCouponInfo").couponId&&(this.couponSelInx=n.getStorageSync("selectCouponInfo").couponSelInx,this.couponId=n.getStorageSync("selectCouponInfo").couponId,this.couponSum=n.getStorageSync("selectCouponInfo").couponSum)},onPullDownRefresh:function(){this._list().then((function(t){n.stopPullDownRefresh()}))},methods:{init:function(){var n=s(e.default.mark((function n(){return e.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:this._list();case 1:case"end":return n.stop()}}),n,this)})));function t(){return n.apply(this,arguments)}return t}(),_list:function(){var n=this;return(0,r.shopCouponList)({status:"1"}).then((function(t){console.log(t),n.list=t.data.list}))},couponChange:function(n,t){this.couponSelInx=this.couponSelInx==t?null:t,this.couponId=this.couponSelInx==t?n.id:0,this.couponSum=this.couponSelInx==t?n.amount:"0",console.log(this.couponId,this.couponSelInx)},ConfirmReachFn:function(){var t={};console.log({couponSum:this.couponSum,couponId:this.couponId}),"0"!=this.couponSum&&(t.couponSum=this.couponSum),"0"!=this.couponId&&(t.couponId=this.couponId),null!=this.couponSelInx&&(t.couponSelInx=this.couponSelInx),console.log(t,116),n.setStorageSync("selectCouponInfo",t),n.navigateBack({})}}};t.default=d}).call(this,o("934e")["default"])},"4fb1":function(n,t,o){"use strict";(function(n){o("6cdc");e(o("b5e3"));var t=e(o("5e53"));function e(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,o("934e")["createPage"])},"5ae2":function(n,t,o){"use strict";o.r(t);var e=o("3d95"),u=o.n(e);for(var r in e)["default"].indexOf(r)<0&&function(n){o.d(t,n,(function(){return e[n]}))}(r);t["default"]=u.a},"5af6":function(n,t,o){},"5e53":function(n,t,o){"use strict";o.r(t);var e=o("7148"),u=o("5ae2");for(var r in u)["default"].indexOf(r)<0&&function(n){o.d(t,n,(function(){return u[n]}))}(r);o("2756");var c,i=o("8261"),s=Object(i["a"])(u["default"],e["b"],e["c"],!1,null,"2b7a44ee",null,!1,e["a"],c);t["default"]=s.exports},7148:function(n,t,o){"use strict";var e;o.d(t,"b",(function(){return u})),o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){return e}));var u=function(){var n=this,t=n.$createElement,o=(n._self._c,n.__map(n.usableList,(function(t,o){var e=n.__get_orig(t),u=t.endTime.substr(0,10);return{$orig:e,g0:u}})));n.$mp.data=Object.assign({},{$root:{l0:o}})},r=[]}},[["4fb1","common/runtime","common/vendor"]]]);