chunk-146ed97a.4618834d.js.map 9.4 KB

1
  1. {"version":3,"sources":["webpack:///./src/assets/images/noCoupon.png","webpack:///./src/views/user/coupon/GetCoupon.vue?66c5","webpack:///src/views/user/coupon/GetCoupon.vue","webpack:///./src/views/user/coupon/GetCoupon.vue?f8e1","webpack:///./src/views/user/coupon/GetCoupon.vue"],"names":["module","exports","__webpack_require__","p","render","_vm","this","_h","$createElement","_c","_self","ref","couponsList","length","staticClass","_l","item","index","key","class","is_use","_v","_s","coupon_price","use_min_price","end_time","start_time","on","click","$event","getCoupon","id","_e","attrs","loaded","loadend","loading","page","_m","staticRenderFns","src","GetCouponvue_type_script_lang_js_","name","components","Loading","props","data","limit","mounted","_this","getUseCoupons","$scroll","$refs","container","methods","that","list","Object","user","then","$dialog","toast","mes","catch","res","msg","q","push","apply","coupon_GetCouponvue_type_script_lang_js_","component","componentNormalizer","__webpack_exports__"],"mappings":"qGAAAA,EAAAC,QAAiBC,EAAAC,EAAuB,yECAxC,IAAAC,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BC,EAAAJ,EAAAK,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBE,IAAA,aAAgB,CAAAN,EAAAO,YAAAC,OAAA,EAAAJ,EAAA,OAAyCK,YAAA,eAA0BT,EAAAU,GAAAV,EAAA,qBAAAW,EAAAC,GAA+C,OAAAR,EAAA,OAAiBS,IAAAD,EAAAH,YAAA,oCAAyD,CAAAL,EAAA,OAAYK,YAAA,QAAAK,MAAAH,EAAAI,OAAA,gBAAyD,CAAAf,EAAAgB,GAAA,eAAAZ,EAAA,QAAmCK,YAAA,OAAkB,CAAAT,EAAAgB,GAAAhB,EAAAiB,GAAAN,EAAAO,mBAAAd,EAAA,OAAkDK,YAAA,QAAmB,CAAAL,EAAA,OAAYK,YAAA,mBAA8B,CAAAT,EAAAgB,GAAA,kBAAAhB,EAAAiB,GAAAN,EAAAQ,eAAA,mBAAAf,EAAA,OAAmFK,YAAA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kD,EAAAD,EAAA3C,YACA6C,OAAAC,EAAA,KAAAD,CAAA1B,GACA4B,KAAA,WACAH,EAAAvC,GAAAG,QAAA,EACAmC,EAAAK,QAAAC,MAAA,CAAAC,IAAA,WAEAC,MAAA,SAAAC,GACAT,EAAAK,QAAAC,MAAA,CAAAC,IAAAE,EAAAC,SAGAf,cAAA,WACA,IAAAK,EAAAjD,KACA,IAAAiD,EAAAnB,UACAmB,EAAApB,QAAA,CACAoB,EAAAnB,SAAA,EACA,IAAA8B,EAAA,CAAA7B,KAAAkB,EAAAlB,KAAAU,MAAAQ,EAAAR,OACAU,OAAAC,EAAA,KAAAD,CAAAS,GAAAP,KAAA,SAAAK,GACAT,EAAAnB,SAAA,EAEAmB,EAAA3C,YAAAuD,KAAAC,MAAAb,EAAA3C,YAAAoD,EAAAlB,MACAS,EAAApB,QAAA6B,EAAAlB,KAAAjC,OAAA0C,EAAAR,MACAQ,EAAAlB,KAAAkB,EAAAlB,KAAA,QC9FiXgC,EAAA,cCOjXC,EAAgBb,OAAAc,EAAA,KAAAd,CACdY,EACAjE,EACAmC,GACF,EACA,KACA,KACA,MAIeiC,EAAA,WAAAF","file":"h5/js/chunk-146ed97a.4618834d.js","sourcesContent":["module.exports = __webpack_public_path__ + \"h5/img/noCoupon.e524084b.png\";","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"container\"},[(_vm.couponsList.length > 0)?_c('div',{staticClass:\"coupon-list\"},_vm._l((_vm.couponsList),function(item,index){return _c('div',{key:index,staticClass:\"item acea-row row-center-wrapper\"},[_c('div',{staticClass:\"money\",class:item.is_use ? 'moneyGray' : ''},[_vm._v(\"\\n ¥\"),_c('span',{staticClass:\"num\"},[_vm._v(_vm._s(item.coupon_price))])]),_c('div',{staticClass:\"text\"},[_c('div',{staticClass:\"condition line1\"},[_vm._v(\"\\n 购物满\"+_vm._s(item.use_min_price)+\"元可用\\n \")]),_c('div',{staticClass:\"data acea-row row-between-wrapper\"},[(item.end_time !== 0)?_c('div',[_vm._v(\"\\n \"+_vm._s(item.start_time)+\"-\"+_vm._s(item.end_time)+\"\\n \")]):_c('div',[_vm._v(\"不限时\")]),(item.is_use === true)?_c('div',{staticClass:\"bnt gray\"},[_vm._v(\"已领取\")]):(item.is_use === 2)?_c('div',{staticClass:\"bnt gray\"},[_vm._v(\"已领完\")]):_c('div',{staticClass:\"bnt bg-color-red\",on:{\"click\":function($event){return _vm.getCoupon(item.id, index)}}},[_vm._v(\"\\n 立即领取\\n \")])])])])}),0):_vm._e(),_c('Loading',{attrs:{\"loaded\":_vm.loadend,\"loading\":_vm.loading}}),(_vm.couponsList.length === 0 && _vm.page > 1)?_c('div',{staticClass:\"noCommodity\"},[_vm._m(0)]):_vm._e()],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"noPictrue\"},[_c('img',{staticClass:\"image\",attrs:{\"src\":require(\"@assets/images/noCoupon.png\")}})])}]\n\nexport { render, staticRenderFns }","<template>\r\n <div ref=\"container\">\r\n <div class=\"coupon-list\" v-if=\"couponsList.length > 0\">\r\n <div\r\n class=\"item acea-row row-center-wrapper\"\r\n v-for=\"(item, index) in couponsList\"\r\n :key=\"index\"\r\n >\r\n <div class=\"money\" :class=\"item.is_use ? 'moneyGray' : ''\">\r\n ¥<span class=\"num\">{{ item.coupon_price }}</span>\r\n </div>\r\n <div class=\"text\">\r\n <div class=\"condition line1\">\r\n 购物满{{ item.use_min_price }}元可用\r\n </div>\r\n <div class=\"data acea-row row-between-wrapper\">\r\n <div v-if=\"item.end_time !== 0\">\r\n {{ item.start_time }}-{{ item.end_time }}\r\n </div>\r\n <div v-else>不限时</div>\r\n <div class=\"bnt gray\" v-if=\"item.is_use === true\">已领取</div>\r\n <div class=\"bnt gray\" v-else-if=\"item.is_use === 2\">已领完</div>\r\n <div\r\n class=\"bnt bg-color-red\"\r\n v-else\r\n @click=\"getCoupon(item.id, index)\"\r\n >\r\n 立即领取\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <Loading :loaded=\"loadend\" :loading=\"loading\"></Loading>\r\n <!--暂无优惠券-->\r\n <div\r\n class=\"noCommodity\"\r\n v-cloak\r\n v-if=\"couponsList.length === 0 && page > 1\"\r\n >\r\n <div class=\"noPictrue\">\r\n <img src=\"@assets/images/noCoupon.png\" class=\"image\" />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { getCoupon, getCouponReceive } from \"@api/user\";\r\nimport Loading from \"@components/Loading\";\r\nexport default {\r\n name: \"getCoupon\",\r\n components: {\r\n Loading\r\n },\r\n props: {},\r\n data: function() {\r\n return {\r\n page: 1,\r\n limit: 10,\r\n couponsList: [],\r\n loading: false,\r\n loadend: false\r\n };\r\n },\r\n mounted: function() {\r\n this.getUseCoupons();\r\n this.$scroll(this.$refs.container, () => {\r\n !this.loading && this.getUseCoupons();\r\n });\r\n },\r\n methods: {\r\n getCoupon: function(id, index) {\r\n let that = this;\r\n let list = that.couponsList;\r\n getCouponReceive(id)\r\n .then(function() {\r\n list[index].is_use = true;\r\n that.$dialog.toast({ mes: \"领取成功\" });\r\n })\r\n .catch(function(res) {\r\n that.$dialog.toast({ mes: res.msg });\r\n });\r\n },\r\n getUseCoupons: function() {\r\n let that = this;\r\n if (that.loading) return; //阻止下次请求(false可以进行请求);\r\n if (that.loadend) return; //阻止结束当前请求(false可以进行请求);\r\n that.loading = true;\r\n let q = { page: that.page, limit: that.limit };\r\n getCoupon(q).then(res => {\r\n that.loading = false;\r\n //apply();js将一个数组插入另一个数组;\r\n that.couponsList.push.apply(that.couponsList, res.data);\r\n that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;\r\n that.page = that.page + 1;\r\n });\r\n }\r\n }\r\n};\r\n</script>\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GetCoupon.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GetCoupon.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./GetCoupon.vue?vue&type=template&id=1cdadd04&\"\nimport script from \"./GetCoupon.vue?vue&type=script&lang=js&\"\nexport * from \"./GetCoupon.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}