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
8.1 KiB
1 lines
8.1 KiB
{"version":3,"sources":["webpack:////Users/gaoxs/Documents/project/yshopmall_uni/components/CouponWindow.vue?3735","webpack:////Users/gaoxs/Documents/project/yshopmall_uni/components/CouponWindow.vue?73b0","webpack:////Users/gaoxs/Documents/project/yshopmall_uni/components/CouponWindow.vue?8506","webpack:////Users/gaoxs/Documents/project/yshopmall_uni/components/CouponWindow.vue?31bc","webpack:////Users/gaoxs/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","uni","showToast","title","icon","duration","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4B/0B;;;AAGA;AACA,sD,8FAhCA;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;gBAUe,EACdA,IAAI,EAAE,cADQ,EAEdC,KAAK,EAAE,EACNC,UAAU,EAAE,EACXC,IAAI,EAAEC,KADK,EAEXC,OAAO,EAAE,4BAAM,EAAN,EAFE,EADN,EAFO,EAQdC,QAAQ,EAAE,sBAAW,CAAC,SAAD,CAAX,CARI,EASdC,IAAI,EAAE,gBAAW,CAChB,OAAO,EACNC,KAAK,EAAE,IADD,EAAP,CAGA,CAba,EAcdC,OAAO,EAAE,mBAAW,CAAE,CAdR,EAedC,OAAO,EAAE,EACRC,OADQ,qBACE,kBACT,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,CACvDD,OAAO,CAACE,IAAR,CAAaD,MAAM,CAACE,EAApB,EACA,OAAOH,OAAP,CACA,CAHW,EAGT,EAHS,CAAZ;AAIA,oCAAmBF,GAAnB;AACEM,UADF,CACO,YAAM;AACX,aAAI,CAACC,KAAL,CAAW,SAAX;AACAC,WAAG,CAACC,SAAJ,CAAc;AACbC,eAAK,EAAE,MADM;AAEbC,cAAI,EAAE,SAFO;AAGbC,kBAAQ,EAAE,IAHG,EAAd;;AAKA,OARF;AASEC,WATF,CASQ,YAAM;AACZL,WAAG,CAACC,SAAJ,CAAc;AACbC,eAAK,EAAE,KADM;AAEbC,cAAI,EAAE,MAFO;AAGbC,kBAAQ,EAAE,IAHG,EAAd;;AAKA,OAfF;AAgBA,UAAIb,OAAJ,EAAa;AACZ,aAAKJ,KAAL,GAAa,KAAb;AACA,aAAKY,KAAL,CAAW,SAAX;AACA;AACD,KA7BO;AA8BRO,SAAK,EAAE,iBAAW;AACjB,WAAKnB,KAAL,GAAa,KAAb;AACA,WAAKY,KAAL,CAAW,OAAX;AACA,KAjCO,EAfK,E","file":"components/CouponWindow.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./CouponWindow.vue?vue&type=template&id=8e036aba&\"\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('8e036aba')) {\n api.createRecord('8e036aba', component.options)\n } else {\n api.reload('8e036aba', component.options)\n }\n module.hot.accept(\"./CouponWindow.vue?vue&type=template&id=8e036aba&\", function () {\n api.rerender('8e036aba', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"Users/gaoxs/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=8e036aba&\"","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\nimport {\n\tmapGetters\n} from \"vuex\";\nimport toLogin from \"@/libs/login\";\nimport {\n\tcouponReceiveBatch\n} from \"@/api/user\";\n\nexport default {\n\tname: \"CouponWindow\",\n\tprops: {\n\t\tcouponList: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => []\n\t\t}\n\t},\n\tcomputed: mapGetters([\"isLogin\"]),\n\tdata: function() {\n\t\treturn {\n\t\t\tvalue: true\n\t\t};\n\t},\n\tmounted: function() {},\n\tmethods: {\n\t\tchecked() {\n\t\t\tconst isLogin = this.isLogin;\n\t\t\tif (!isLogin) return toLogin();\n\n\t\t\tconst ids = this.couponList.reduce((initial, coupon) => {\n\t\t\t\tinitial.push(coupon.id);\n\t\t\t\treturn initial;\n\t\t\t}, []);\n\t\t\tcouponReceiveBatch(ids)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.$emit(\"success\");\n\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\ttitle: '领取成功',\n\t\t\t\t\t\ticon: 'success',\n\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\ttitle: '已领取',\n\t\t\t\t\t\ticon: 'none',\n\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tif (isLogin) {\n\t\t\t\tthis.value = false;\n\t\t\t\tthis.$emit(\"checked\");\n\t\t\t}\n\t\t},\n\t\tclose: function() {\n\t\t\tthis.value = false;\n\t\t\tthis.$emit(\"close\");\n\t\t}\n\t}\n};\n"],"sourceRoot":""} |