You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
7.9 KiB

{"version":3,"sources":["webpack:////Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue?cecc","webpack:////Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue?9868","webpack:////Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue?33af","webpack:////Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue?9cb7","webpack:////Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue"],"names":["name","props","couponList","type","Array","default","computed","data","value","mounted","methods","checked","isLogin","ids","reduce","initial","coupon","push","id","then","$emit","$dialog","toast","mes","catch","close"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyH;AACzH;AACgE;AACL;;;AAG3D;AAC6M;AAC7M,gBAAgB,iNAAU;AAC1B,EAAE,kFAAM;AACR,EAAE,uFAAM;AACR,EAAE,gGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,2FAAU;AACZ;AACA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;ACzCf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA2zB,CAAgB,0yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACgC/0B;AACA;AACA,sD,8FAlCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;gBAMe,EACbA,IAAI,EAAE,cADO,EAEbC,KAAK,EAAE,EACLC,UAAU,EAAE,EACVC,IAAI,EAAEC,KADI,EAEVC,OAAO,EAAE,4BAAM,EAAN,EAFC,EADP,EAFM,EAQbC,QAAQ,EAAE,sBAAW,CAAC,SAAD,CAAX,CARG,EASbC,IAAI,EAAE,gBAAW,CACf,OAAO,EACLC,KAAK,EAAE,IADF,EAAP,CAGD,CAbY,EAcbC,OAAO,EAAE,mBAAW,CAAE,CAdT,EAebC,OAAO,EAAE,EACPC,OADO,qBACG,kBACR,IAAMC,OAAO,GAAG,KAAKA,OAArB,CACA,IAAI,CAACA,OAAL,EAAc,OAAO,qBAAP,CAEd,IAAMC,GAAG,GAAG,KAAKX,UAAL,CAAgBY,MAAhB,CAAuB,UAACC,OAAD,EAAUC,MAAV,EAAqB,CACtDD,OAAO,CAACE,IAAR,CAAaD,MAAM,CAACE,EAApB,EACA,OAAOH,OAAP,CACD,CAHW,EAGT,EAHS,CAAZ,CAIA,8BAAmBF,GAAnB,EACGM,IADH,CACQ,YAAM,CACV,KAAI,CAACC,KAAL,CAAW,SAAX,EACA,KAAI,CAACC,OAAL,CAAaC,KAAb,CAAmB,EAAEC,GAAG,EAAE,MAAP,EAAnB,EACD,CAJH,EAKGC,KALH,CAKS,YAAM;AACX,aAAI,CAACH,OAAL,CAAaC,KAAb,CAAmB,EAAEC,GAAG,EAAE,KAAP,EAAnB;AACD,OAPH;AAQA,UAAIX,OAAJ,EAAa;AACX,aAAKJ,KAAL,GAAa,KAAb;AACA,aAAKY,KAAL,CAAW,SAAX;AACD;AACF,KArBM;AAsBPK,SAAK,EAAE,iBAAW;AAChB,WAAKjB,KAAL,GAAa,KAAb;AACA,WAAKY,KAAL,CAAW,OAAX;AACD,KAzBM,EAfI,E","file":"components/CouponWindow.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./CouponWindow.vue?vue&type=template&id=eace3198&\"\nvar renderjs\nimport script from \"./CouponWindow.vue?vue&type=script&lang=js&\"\nexport * from \"./CouponWindow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('eace3198')) {\n api.createRecord('eace3198', component.options)\n } else {\n api.reload('eace3198', component.options)\n }\n module.hot.accept(\"./CouponWindow.vue?vue&type=template&id=eace3198&\", function () {\n api.rerender('eace3198', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"Users/piao/Documents/Project/yshopmall_uni/components/CouponWindow.vue\"\nexport default component.exports","export * from \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CouponWindow.vue?vue&type=template&id=eace3198&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CouponWindow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CouponWindow.vue?vue&type=script&lang=js&\"","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { mapGetters } from \"vuex\";\nimport toLogin from \"@/libs/login\";\nimport { couponReceiveBatch } from \"@/api/user\";\n\nexport default {\n name: \"CouponWindow\",\n props: {\n couponList: {\n type: Array,\n default: () => []\n }\n },\n computed: mapGetters([\"isLogin\"]),\n data: function() {\n return {\n value: true\n };\n },\n mounted: function() {},\n methods: {\n checked() {\n const isLogin = this.isLogin;\n if (!isLogin) return toLogin();\n\n const ids = this.couponList.reduce((initial, coupon) => {\n initial.push(coupon.id);\n return initial;\n }, []);\n couponReceiveBatch(ids)\n .then(() => {\n this.$emit(\"success\");\n this.$dialog.toast({ mes: \"领取成功\" });\n })\n .catch(() => {\n this.$dialog.toast({ mes: \"已领取\" });\n });\n if (isLogin) {\n this.value = false;\n this.$emit(\"checked\");\n }\n },\n close: function() {\n this.value = false;\n this.$emit(\"close\");\n }\n }\n};\n"],"sourceRoot":""}