chunk-63428207.3dd3af01.js.map 13 KB

1
  1. {"version":3,"sources":["webpack:///./src/assets/images/noCoupon.png","webpack:///./src/views/user/coupon/GetCoupon.vue?12a4","webpack:///src/views/user/coupon/GetCoupon.vue","webpack:///./src/views/user/coupon/GetCoupon.vue?2f62","webpack:///./src/views/user/coupon/GetCoupon.vue","webpack:///./src/views/user/coupon/GetCoupon.vue?44a5"],"names":["module","exports","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","type","title","end_time","start_time","on","$event","getCoupon","id","_e","attrs","loadend","loading","page","_m","staticRenderFns","name","components","Loading","props","data","limit","mounted","getUseCoupons","$scroll","$refs","container","methods","that","push","apply","res","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,gC,yCCA3C,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,IAAI,aAAa,CAAEN,EAAIO,YAAYC,OAAS,EAAGJ,EAAG,MAAM,CAACK,YAAY,eAAeT,EAAIU,GAAIV,EAAe,aAAE,SAASW,EAAKC,GAAO,OAAOR,EAAG,MAAM,CAACS,IAAID,EAAMH,YAAY,oCAAoC,CAACL,EAAG,MAAM,CAACK,YAAY,QAAQK,MAAMH,EAAKI,OAAS,YAAc,IAAI,CAACX,EAAG,MAAM,CAACJ,EAAIgB,GAAG,iBAAiBZ,EAAG,OAAO,CAACK,YAAY,OAAO,CAACT,EAAIgB,GAAGhB,EAAIiB,GAAGN,EAAKO,mBAAmBd,EAAG,MAAM,CAACK,YAAY,WAAW,CAACT,EAAIgB,GAAG,IAAIhB,EAAIiB,GAAGN,EAAKQ,eAAe,WAAWf,EAAG,MAAM,CAACK,YAAY,QAAQ,CAACL,EAAG,MAAM,CAACK,YAAY,mBAAmB,CAAgB,IAAdE,EAAKS,KAAYhB,EAAG,OAAO,CA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AAI4B,MAAM,IACnzBM,EAAkB,CAAC,WAAa,IAAIlC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACK,YAAY,aAAa,CAACL,EAAG,MAAM,CAACK,YAAY,QAAQoB,MAAM,CAAC,IAAM,EAAQ,e,wBC4EjM,GACEM,KAAM,YACNC,WAAY,CACVC,QAAJ,QAEEC,MAAO,GACPC,KAAM,WACJ,MAAO,CACLP,KAAM,EACNQ,MAAO,GACPjC,YAAa,GACbwB,SAAS,EACTD,SAAS,IAGbW,QAAS,WAAX,WACIxC,KAAKyC,gBACLzC,KAAK0C,QAAQ1C,KAAK2C,MAAMC,WAAW,YAChC,EAAP,+BAGEC,QAAS,CACPpB,UAAW,SAAf,KACM,IAAN,OACA,gBACM,OAAN,OAAM,CAAN,GACA,iBACQ,EAAR,aACQ,EAAR,eAAU,IAAV,YAEA,mBACQ,EAAR,eAAU,IAAV,YAGIgB,cAAe,WACb,IAAN,OACM,IAAIK,EAAKhB,UACLgB,EAAKjB,QAAT,CACAiB,EAAKhB,SAAU,EACf,IAAN,8BACM,OAAN,OAAM,CAAN,qBACQgB,EAAKhB,SAAU,EAEfgB,EAAKxC,YAAYyC,KAAKC,MAAMF,EAAKxC,YAAa2C,EAAIX,MAClDQ,EAAKjB,QAAUoB,EAAIX,KAAK/B,OAASuC,EAAKP,MACtCO,EAAKf,KAAOe,EAAKf,KAAO,SChIqb,I,wBCQjdmB,EAAY,eACd,EACApD,EACAmC,GACA,EACA,KACA,WACA,MAIa,aAAAiB,E,2CCnBf,yBAA0oB,EAAG,G","file":"h5/js/chunk-63428207.3dd3af01.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' : ''},[_c('div',[_vm._v(\"\\n ¥\"),_c('span',{staticClass:\"num\"},[_vm._v(_vm._s(item.coupon_price))])]),_c('div',{staticClass:\"pic-num\"},[_vm._v(\"\"+_vm._s(item.use_min_price)+\"元可用\")])]),_c('div',{staticClass:\"text\"},[_c('div',{staticClass:\"condition line1\"},[(item.type === 0)?_c('span',{staticClass:\"line-title\",class:item.is_use === true || item.is_use === 2\n ? 'bg-color-huic'\n : 'bg-color-check'},[_vm._v(\"通用劵\")]):(item.type === 1)?_c('span',{staticClass:\"line-title\",class:item.is_use === true || item.is_use === 2\n ? 'bg-color-huic'\n : 'bg-color-check'},[_vm._v(\"品类券\")]):_c('span',{staticClass:\"line-title\",class:item.is_use === true || item.is_use === 2\n ? 'bg-color-huic'\n : 'bg-color-check'},[_vm._v(\"商品券\")]),_c('span',[_vm._v(_vm._s(item.title))])]),_c('div',{staticClass:\"data acea-row row-between-wrapper\"},[(item.end_time !== 0)?_c('div',[_vm._v(\"\\n \"+_vm._s(item.start_time ? 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 <div>\r\n ¥<span class=\"num\">{{ item.coupon_price }}</span>\r\n </div>\r\n <div class=\"pic-num\">满{{ item.use_min_price }}元可用</div>\r\n </div>\r\n <div class=\"text\">\r\n <div class=\"condition line1\">\r\n <span\r\n class=\"line-title\"\r\n :class=\"\r\n item.is_use === true || item.is_use === 2\r\n ? 'bg-color-huic'\r\n : 'bg-color-check'\r\n \"\r\n v-if=\"item.type === 0\"\r\n >通用劵</span\r\n >\r\n <span\r\n class=\"line-title\"\r\n :class=\"\r\n item.is_use === true || item.is_use === 2\r\n ? 'bg-color-huic'\r\n : 'bg-color-check'\r\n \"\r\n v-else-if=\"item.type === 1\"\r\n >品类券</span\r\n >\r\n <span\r\n class=\"line-title\"\r\n :class=\"\r\n item.is_use === true || item.is_use === 2\r\n ? 'bg-color-huic'\r\n : 'bg-color-check'\r\n \"\r\n v-else\r\n >商品券</span\r\n >\r\n <span>{{ item.title }}</span>\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.start_time + \"-\" : \"\"\r\n }}{{ 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<style scoped>\r\n.bg-color-check {\r\n color: #e83323;\r\n background: #fff7f7;\r\n border: 1px solid #e83323;\r\n}\r\n</style>\r\n","import mod from \"-!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./GetCoupon.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/_vue-loader@15.9.0@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=b6e27ec2&scoped=true&\"\nimport script from \"./GetCoupon.vue?vue&type=script&lang=js&\"\nexport * from \"./GetCoupon.vue?vue&type=script&lang=js&\"\nimport style0 from \"./GetCoupon.vue?vue&type=style&index=0&id=b6e27ec2&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b6e27ec2\",\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/_mini-css-extract-plugin@0.8.2@mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./GetCoupon.vue?vue&type=style&index=0&id=b6e27ec2&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/_mini-css-extract-plugin@0.8.2@mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/_vue-loader@15.9.0@vue-loader/lib/index.js??vue-loader-options!./GetCoupon.vue?vue&type=style&index=0&id=b6e27ec2&scoped=true&lang=css&\""],"sourceRoot":""}