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
14 KiB
1 lines
14 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/coupon/apply.vue?4bfc","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/coupon/apply.vue?deff","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/coupon/apply.vue?c076","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/coupon/apply.vue?33ac","uni-app:///pages/user/coupon/apply.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","coupon_id","coupon_state","coupon","dataList","reload","total","current_page","last_page","status","contentText","contentdown","contentrefresh","contentnomore","onLoad","onPullDownRefresh","onReachBottom","methods","loadData","url","id","page","success","uni","onReceive","loadingTip"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,cAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAkH;AAClH;AACyD;AACL;;;AAGpD;AACwK;AACxK,gBAAgB,+KAAU;AAC1B,EAAE,2EAAM;AACR,EAAE,gFAAM;AACR,EAAE,yFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,gNAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC9FA;AAAA;AAAA;AAAA;AAA2nB,CAAgB,ynBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eC8E/oB;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MACAC;QACAC;QACAC;QACAC;MACA;IACA;EACA;EACAC;IACA;IACA;IACA;EACA;EACAC;IACA;IACA;IACA;EACA;EACAC;IACA;IACA;MACA;IACA;MACA;MACA;MACA;MACA;IACA;EACA;EACAC;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;kBACAC;kBACAnB;oBACAoB;oBACAC;kBACA;kBACAC;oBACAC;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;kBACAL;kBACAM;kBACAzB;oBACAoB;kBACA;kBACAE;oBACA;oBACA;oBACA;sBACAnB;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;EACA;AACA;AAAA,2B","file":"pages/user/coupon/apply.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/user/coupon/apply.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./apply.vue?vue&type=template&id=3d5d6c60&\"\nvar renderjs\nimport script from \"./apply.vue?vue&type=script&lang=js&\"\nexport * from \"./apply.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../k/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\ncomponent.options.__file = \"pages/user/coupon/apply.vue\"\nexport default component.exports","export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./apply.vue?vue&type=template&id=3d5d6c60&\"","var components\ntry {\n components = {\n wanlProduct: function () {\n return import(\n /* webpackChunkName: \"components/wanl-product/wanl-product\" */ \"@/components/wanl-product/wanl-product.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.coupon ? _vm.$wanlshop.appstc(\"/coupon/bg_coupon_3x.png\") : null\n var g1 =\n _vm.coupon && _vm.coupon_state\n ? _vm.$wanlshop.appstc(\"/coupon/img_couponcentre_received_3x.png\")\n : null\n var m0 =\n _vm.coupon &&\n (_vm.coupon.type == \"reduction\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"reduction\"))\n ? Number(_vm.coupon.price)\n : null\n var m1 =\n _vm.coupon &&\n (_vm.coupon.type == \"reduction\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"reduction\"))\n ? Number(_vm.coupon.limit)\n : null\n var m2 =\n _vm.coupon &&\n (_vm.coupon.type == \"reduction\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"reduction\"))\n ? Number(_vm.coupon.price)\n : null\n var m3 =\n _vm.coupon &&\n (_vm.coupon.type == \"discount\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"discount\"))\n ? Number(_vm.coupon.discount)\n : null\n var m4 =\n _vm.coupon &&\n (_vm.coupon.type == \"discount\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"discount\"))\n ? Number(_vm.coupon.limit)\n : null\n var m5 =\n _vm.coupon &&\n (_vm.coupon.type == \"discount\" ||\n (_vm.coupon.type == \"vip\" && _vm.coupon.usertype == \"discount\"))\n ? Number(_vm.coupon.discount)\n : null\n var m6 =\n _vm.coupon && _vm.coupon.type == \"shipping\"\n ? Number(_vm.coupon.limit)\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n g1: g1,\n m0: m0,\n m1: m1,\n m2: m2,\n m3: m3,\n m4: m4,\n m5: m5,\n m6: m6,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./apply.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./apply.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"wanl-coupon\">\r\n\t\t<view class=\"edgeInsetTop\"></view>\r\n\t\t<view class=\"padding-bj bg-red text-black\">\r\n\t\t\t<view :class=\"coupon.type\" class=\"item radius-bock\" @tap=\"onDetails(coupon)\" v-if=\"coupon\">\r\n\t\t\t\t<image :src=\"$wanlshop.appstc('/coupon/bg_coupon_3x.png')\" class=\"coupon-bg\"></image>\r\n\t\t\t\t<image :src=\"$wanlshop.appstc('/coupon/img_couponcentre_received_3x.png')\" class=\"coupon-sign\" v-if=\"coupon_state\"></image>\r\n\t\t\t\t<view class=\"item-left\">\r\n\t\t\t\t\t<block v-if=\"coupon.type == 'reduction' || (coupon.type == 'vip' && coupon.usertype == 'reduction')\">\r\n\t\t\t\t\t\t<view class=\"colour\">\r\n\t\t\t\t\t\t\t<text class=\"text-price\"></text>\r\n\t\t\t\t\t\t\t<text class=\"price\">{{Number(coupon.price)}}</text>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"cu-tag wanl-gray-dark radius text-sm\">\r\n\t\t\t\t\t\t\t满{{Number(coupon.limit)}}减{{Number(coupon.price)}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t\t<block v-if=\"coupon.type == 'discount' || (coupon.type == 'vip' && coupon.usertype == 'discount')\">\r\n\t\t\t\t\t\t<view class=\"colour\">\r\n\t\t\t\t\t\t\t<text class=\"price\">{{Number(coupon.discount)}}</text>\r\n\t\t\t\t\t\t\t<text class=\"discount\">折</text>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"cu-tag wanl-gray-dark radius text-sm\">\r\n\t\t\t\t\t\t\t满{{Number(coupon.limit)}}打{{Number(coupon.discount)}}折\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t\t<block v-if=\"coupon.type == 'shipping'\">\r\n\t\t\t\t\t\t<view class=\"colour\">\r\n\t\t\t\t\t\t\t<text class=\"price\">包邮</text>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"cu-tag wanl-gray-dark radius text-sm\">\r\n\t\t\t\t\t\t\t满{{Number(coupon.limit)}}元包邮\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"item-right padding-bj\">\r\n\t\t\t\t\t<view class=\"title\">\r\n\t\t\t\t\t\t<view class=\"cu-tag sm radius margin-right-xs tagstyle\">\r\n\t\t\t\t\t\t\t{{coupon.type_text}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<text class=\"text-cut wanl-gray text-min\">{{coupon.name}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"content text-min\">\r\n\t\t\t\t\t\t<view class=\"wanl-gray\">\r\n\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t<text class=\"wlIcon-dot\"></text>当前页面所有商品可用\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<block v-if=\"coupon.pretype == 'fixed'\">\r\n\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t<text class=\"wlIcon-dot\"></text>生效 {{coupon.startdate}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t<text class=\"wlIcon-dot\"></text>结束 {{coupon.enddate}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t\t<block v-if=\"coupon.pretype == 'appoint'\">\r\n\t\t\t\t\t\t\t\t<view v-if=\"coupon.validity == 0\">\r\n\t\t\t\t\t\t\t\t\t<text class=\"wlIcon-dot\"></text>未使用前 永久 有效\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view v-else>\r\n\t\t\t\t\t\t\t\t\t<text class=\"wlIcon-dot\"></text>领取后 {{coupon.validity}} 天有效\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"cu-btn sm round\" @tap.stop=\"onReceive(coupon.id)\" v-if=\"!coupon_state\">\r\n\t\t\t\t\t\t\t立即领取\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<view class=\"\">\r\n\t\t\t<wanl-product :dataList=\"dataList\"/>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcoupon_id: 0,\r\n\t\t\t\tcoupon_state: false,\r\n\t\t\t\tcoupon: null,\r\n\t\t\t\tdataList: [],\r\n\t\t\t\treload: false, //判断是否上拉\r\n\t\t\t\ttotal: 0, //数据量\r\n\t\t\t\tcurrent_page: 1, //当前页码\r\n\t\t\t\tlast_page: 1, //总页码\r\n\t\t\t\tstatus: 'more',\r\n\t\t\t\tcontentText: {\r\n\t\t\t\t\tcontentdown: ' ',\r\n\t\t\t\t\tcontentrefresh: '加载中',\r\n\t\t\t\t\tcontentnomore: ''\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(option) {\r\n\t\t\tthis.coupon_id = option.id;\r\n\t\t\tthis.coupon_state = option.state ? true : false;\r\n\t\t\tthis.loadData();\r\n\t\t},\r\n\t\tonPullDownRefresh() {\r\n\t\t\tthis.current_page = 1;\r\n\t\t\tthis.reload = true;\r\n\t\t\tthis.loadData();\r\n\t\t},\r\n\t\tonReachBottom() {\r\n\t\t\t//判断是否最后一页\r\n\t\t\tif (this.current_page >= this.last_page) {\r\n\t\t\t\tthis.status = 'noMore';\r\n\t\t\t} else {\r\n\t\t\t\tthis.reload = false;\r\n\t\t\t\tthis.current_page = this.current_page + 1; //页码+1\r\n\t\t\t\tthis.status = 'loading';\r\n\t\t\t\tthis.loadData();\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t//获取优惠券和商品列表\r\n\t\t\tasync loadData() {\r\n\t\t\t\tthis.$api.get({\r\n\t\t\t\t\turl: '/wanlshop/coupon/apply',\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\tid: this.coupon_id,\r\n\t\t\t\t\t\tpage: this.current_page\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\tuni.stopPullDownRefresh();\r\n\t\t\t\t\t\tthis.coupon = res.coupon;\r\n\t\t\t\t\t\tthis.dataList = this.reload ? res.goods.data : this.dataList.concat(res.goods.data); //数据 追加\r\n\t\t\t\t\t\tthis.total = res.goods.total; //数据量\r\n\t\t\t\t\t\tthis.current_page = res.goods.current_page; //当前页码\r\n\t\t\t\t\t\tthis.last_page = res.goods.last_page; //总页码\r\n\t\t\t\t\t\tthis.status = res.goods.total == 0 ? 'noMore' : 'more';\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t// 领取优惠券\r\n\t\t\tasync onReceive(coupon_id) {\r\n\t\t\t\tthis.$api.post({\r\n\t\t\t\t\turl: '/wanlshop/coupon/receive',\r\n\t\t\t\t\tloadingTip: '领取中',\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\tid: coupon_id\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\tthis.coupon_state = true;\r\n\t\t\t\t\t\tthis.$wanlshop.msg(res);\r\n\t\t\t\t\t\tthis.$store.commit('statistics/dynamic', {\r\n\t\t\t\t\t\t\tcoupon: this.$store.state.statistics.dynamic.coupon + 1\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\r\n</style>\r\n"],"sourceRoot":""} |