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
28 KiB
1 lines
28 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?2d12","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?88ca","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?44f5","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?2d52","uni-app:///pages/user/coupon/coupon.vue","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?e577","webpack:///C:/Users/Administrator/Documents/high-mini/pages/user/coupon/coupon.vue?56f0"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,qG;AACAA,UAAU,CAACC,eAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;AACc;;;AAGnE;AACgL;AAChL,gBAAgB,yLAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACvCA;AAAA;AAAA;AAAA;AAAupB,CAAgB,4qBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC+F3qB,gE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAGA,EACA,IADA,kBACA,CACA,SACA,mBADA,EAEA,qBAFA,EAGA,YAHA,EAIA;AACA,wBALA,EAMA,YANA,EAOA,cAPA,EAQA,cARA,EASA,aATA,EAUA,UAVA,EAWA,YAXA,EAYA,mBAZA,EAaA,eAbA,GAeA,CAjBA,EAkBA,YAlBA,wBAkBA,CAlBA,EAkBA,CAEA,CApBA,EAqBA;AACA,mBAtBA,+BAsBA,CACA,wBACA,0BACA,CAFA,EAEA,IAFA,EAGA,CA1BA,EA2BA,MA3BA,oBA2BA,CACA,4BADA,CAEA;AAWA,GAxCA,EAyCA,WACA;AACA,8HACA,2BACA,8BACA,gCACA,yBACA,wBACA,2BACA,0BACA,yCACA,iCACA,yBACA,6BACA,yBACA,uHACA,CAhBA,EAzCA,EA2DA,aA3DA,2BA2DA,CACA,gCACA,iBACA,0BACA,0BACA,4BACA,CALA,MAKA,CACA,iBACA,4BACA,0BACA,4BACA,CACA,CAvEA,EAwEA,WACA;AACA,uBAFA,+BAEA,IAFA,EAEA,kBACA,kBACA,eADA,IAGA,wBACA,kBACA,yBACA,aACA,CACA,2BACA,eACA,gBADA,EAEA,YAFA,EAGA,uBAHA,GAKA,2DACA,kCACA,kBACA,kFACA,oFACA,iCACA,2EACA,CAFA,MAEA;AACA;AACA;;AAEA,SAVA,MAUA;AACA;AACA;AACA;AACA;AACA,OAhBA;AAiBA,KAlCA;AAmCA;AACA,eApCA,uBAoCA,CApCA,EAoCA;AACA;AACA,iEADA;;AAGA,KAxCA;AAyCA,cAzCA,sBAyCA,IAzCA,EAyCA;AACA;AACA;AACA;AACA;AACA,oBADA;AAEA,mBAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,OAJA,EAIA,GAJA;AAKA;AACA;AACA;AACA;AACA;AACA,OALA,MAKA;AACA;AACA;AACA;AACA;AACA;AACA,KAnEA;AAoEA;AACA,cArEA,sBAqEA,KArEA,EAqEA,KArEA,EAqEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA/EA;AAgFA,aAhFA,qBAgFA,KAhFA,EAgFA,KAhFA,EAgFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAHA,MAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAFA,EAEA,GAFA;AAGA;AACA;AACA,KA/GA;;AAiHA,YAjHA,oBAiHA,KAjHA,EAiHA,MAjHA,EAiHA;AACA;AACA;AACA,KApHA;;AAsHA;AACA,gBAvHA,wBAuHA,EAvHA,EAuHA,IAvHA,EAuHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAjIA;;AAmIA,WAnIA,qBAmIA;AACA;AACA,KArIA,EAxEA,E;;;;;;;;;;;;;AClGA;AAAA;AAAA;AAAA;AAAqsC,CAAgB,sqCAAG,EAAC,C;;;;;;;;;;;ACAztC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/coupon/coupon.js","sourcesContent":["import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pages/user/coupon/coupon.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./coupon.vue?vue&type=template&id=e01bd4b8&\"\nvar renderjs\nimport script from \"./coupon.vue?vue&type=script&lang=js&\"\nexport * from \"./coupon.vue?vue&type=script&lang=js&\"\nimport style0 from \"./coupon.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\HBuilderX\\\\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/coupon.vue\"\nexport default component.exports","export * from \"-!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./coupon.vue?vue&type=template&id=e01bd4b8&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var l0 = _vm.__map(_vm.couponValidList, function(row, index) {\n var $orig = _vm.__get_orig(row)\n\n var f0 = _vm._f(\"formatDate\")(row.highDiscount.salesEndTime, \"-\")\n\n return {\n $orig: $orig,\n f0: f0\n }\n })\n\n var l1 = _vm.__map(_vm.couponinvalidList, function(row, index) {\n var $orig = _vm.__get_orig(row)\n\n var f1 = _vm._f(\"formatDate\")(row.highDiscount.salesEndTime, \"-\")\n\n return {\n $orig: $orig,\n f1: f1\n }\n })\n\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n l0: l0,\n l1: l1\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./coupon.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./coupon.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<view class=\"tabr\" :style=\"{top:headerTop}\">\r\n\t\t\t<view :class=\"{on:typeClass=='valid'}\" @tap=\"switchType('valid')\">可用({{couponValidList.length}})</view>\r\n\t\t\t<view :class=\"{on:typeClass=='invalid'}\" @tap=\"switchType('invalid')\">已失效</view>\r\n\t\t\t<view class=\"border\" :class=\"typeClass\"></view>\r\n\t\t</view>\r\n\t\t<view class=\"place\"></view>\r\n\t\t<view class=\"list\">\r\n\t\t\t<!-- 优惠券列表 -->\r\n\t\t\t<view class=\"sub-list valid\" :class=\"subState\">\r\n\t\t\t\t<view class=\"tis\" v-if=\"couponValidList.length==0\">没有数据~</view>\r\n\t\t\t\t<view class=\"row\" v-for=\"(row,index) in couponValidList\" :key=\"index\">\r\n\t\t\t\t\t<!-- 删除按钮 -->\r\n\t\t\t\t\t<view class=\"menu\" @tap.stop=\"deleteCoupon(row.id,couponValidList)\">\r\n\t\t\t\t\t\t<view class=\"icon shanchu\"></view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- content -->\r\n\t\t\t\t\t<view class=\"carrier\">\r\n\t\t\t\t\t\t<view class=\"left\">\r\n\t\t\t\t\t\t\t<view class=\"title\">\r\n\t\t\t\t\t\t\t\t{{row.highDiscount.discountName}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"term\">\r\n\t\t\t\t\t\t\t\t截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"gap-top\"></view>\r\n\t\t\t\t\t\t\t<view class=\"gap-bottom\"></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"right\">\r\n\t\t\t\t\t\t\t<view class=\"ticket\">\r\n\t\t\t\t\t\t\t\t<view class=\"num\">\r\n\t\t\t\t\t\t\t\t\t{{row.highDiscount.discountPrice}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view class=\"unit\">\r\n\t\t\t\t\t\t\t\t\t元\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"criteria\">\r\n\t\t\t\t\t\t\t\t{{row.highDiscount.discountName}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"use\" @click=\"jumpcoupons(row.id)\">\r\n\t\t\t\t\t\t\t\t去使用\r\n\t\t\t\t\t\t\t</view>\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\t<view class=\"sub-list invalid\" :class=\"subState\">\r\n\t\t\t\t<view class=\"tis\" v-if=\"couponinvalidList.length==0\">没有数据~</view>\r\n\t\t\t\t<view class=\"row\" v-for=\"(row,index) in couponinvalidList\" :key=\"index\">\r\n\t\t\t\t\t<!-- 删除按钮 -->\r\n\t\t\t\t\t<view class=\"menu\" @tap.stop=\"deleteCoupon(row.id,couponinvalidList)\">\r\n\t\t\t\t\t\t<view class=\"icon shanchu\"></view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- content -->\r\n\t\t\t\t\t<view class=\"carrier\">\r\n\t\t\t\t\t\t<view class=\"left\">\r\n\t\t\t\t\t\t\t<view class=\"title\">\r\n\t\t\t\t\t\t\t\t{{row.highDiscount.discountName}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"term\">\r\n\t\t\t\t\t\t\t\t截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"icon shixiao\">\r\n\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"gap-top\"></view>\r\n\t\t\t\t\t\t\t<view class=\"gap-bottom\"></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"right invalid\">\r\n\t\t\t\t\t\t\t<view class=\"ticket\">\r\n\t\t\t\t\t\t\t\t<view class=\"num\">\r\n\t\t\t\t\t\t\t\t\t{{row.highDiscount.discountPrice}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view class=\"unit\">\r\n\t\t\t\t\t\t\t\t\t元\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"criteria\">\r\n\t\t\t\t\t\t\t\t{{row.highDiscount.discountName}}\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"use\">\r\n\t\t\t\t\t\t\t\t已失效\r\n\t\t\t\t\t\t\t</view>\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\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {\r\n\t\tgetUserDiscountList\r\n\t} from '../../../Utils/Api.js';\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcouponValidList: [],\r\n\t\t\t\tcouponinvalidList: [],\r\n\t\t\t\theaderTop: 0,\r\n\t\t\t\t//控制滑动效果\r\n\t\t\t\ttypeClass: 'valid',\r\n\t\t\t\tsubState: '',\r\n\t\t\t\ttheIndex: null,\r\n\t\t\t\toldIndex: null,\r\n\t\t\t\tisStop: false,\r\n\t\t\t\tpageNum: 1,\r\n\t\t\t\tpageSize: 10,\r\n\t\t\t\tisNoMoreData: false,\r\n\t\t\t\tloadingText: ''\r\n\t\t\t}\r\n\t\t},\r\n\t\tonPageScroll(e) {\r\n\r\n\t\t},\r\n\t\t//下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 \"enablePullDownRefresh\": true\r\n\t\tonPullDownRefresh() {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tuni.stopPullDownRefresh();\r\n\t\t\t}, 1000);\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\tthis.getUserDiscountList(1);\r\n\t\t\t//兼容H5下排序栏位置\r\n\t\t\t// #ifdef H5\r\n\t\t\t//定时器方式循环获取高度为止,这么写的原因是onLoad中head未必已经渲染出来。\r\n\t\t\tlet Timer = setInterval(() => {\r\n\t\t\t\tlet uniHead = document.getElementsByTagName('uni-page-head');\r\n\t\t\t\tif (uniHead.length > 0) {\r\n\t\t\t\t\tthis.headerTop = uniHead[0].offsetHeight + 'px';\r\n\t\t\t\t\tclearInterval(Timer); //清除定时器\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t\t// #endif\r\n\t\t},\r\n\t\tfilters: {\r\n\t\t\t//过滤器 用于格式化时间\r\n\t\t\tformatDate: function(value, spe = '/') {\r\n\t\t\t\tlet data = new Date(value);\r\n\t\t\t\tlet year = data.getFullYear();\r\n\t\t\t\tlet month = data.getMonth() + 1;\r\n\t\t\t\tlet day = data.getDate();\r\n\t\t\t\tlet h = data.getHours();\r\n\t\t\t\tlet mm = data.getMinutes();\r\n\t\t\t\tlet s = data.getSeconds();\r\n\t\t\t\tmonth = month > 10 ? month : \"0\" + month;\r\n\t\t\t\tday = day > 10 ? day : \"0\" + day;\r\n\t\t\t\th = h > 10 ? h : \"0\" + h;\r\n\t\t\t\tmm = mm > 10 ? mm : \"0\" + mm;\r\n\t\t\t\ts = s > 10 ? s : \"0\" + s;\r\n\t\t\t\treturn `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonReachBottom() {\r\n\t\t\tif (this.typeClass == 'valid') {\r\n\t\t\t\tthis.pageNum = 1;\r\n\t\t\t\tthis.couponValidList = []\r\n\t\t\t\tthis.isNoMoreData = false;\r\n\t\t\t\tthis.getUserDiscountList(1);\r\n\t\t\t} else {\r\n\t\t\t\tthis.pageNum = 1;\r\n\t\t\t\tthis.couponinvalidList = []\r\n\t\t\t\tthis.isNoMoreData = false;\r\n\t\t\t\tthis.getUserDiscountList(2);\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t//查询我的优惠券\r\n\t\t\tgetUserDiscountList(item) {\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle: '加载中...'\r\n\t\t\t\t})\r\n\t\t\t\tif (this.isNoMoreData) {\r\n\t\t\t\t\tuni.hideLoading()\r\n\t\t\t\t\tthis.loadingText = '到底了';\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tlet pagenum = this.pageNum;\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tpageNum: pagenum,\r\n\t\t\t\t\tstatus: item,\r\n\t\t\t\t\tpageSize: this.pageSize\r\n\t\t\t\t}\r\n\t\t\t\tgetUserDiscountList(params).then(res => {\r\n\t\t\t\t\tif (res.return_code == '000000') {\r\n\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t\tthis.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;\r\n\t\t\t\t\t\tthis.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;\r\n\t\t\t\t\t\tif (this.typeClass == 'valid') {\r\n\t\t\t\t\t\t\tthis.couponValidList = this.couponValidList.concat(res.return_data.list);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis.couponinvalidList = this.couponinvalidList.concat(res.return_data.list);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.couponValidList = [];\r\n\t\t\t\t\t\tthis.couponinvalidList = [];\r\n\t\t\t\t\t\tuni.hideLoading()\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\tjumpcoupons(e) {\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl: '../mineCouponsDestails/mineCouponsDestails?id='+e\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tswitchType(type) {\r\n\t\t\t\tif (this.typeClass == type) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tuni.pageScrollTo({\r\n\t\t\t\t\tscrollTop: 0,\r\n\t\t\t\t\tduration: 0\r\n\t\t\t\t})\r\n\t\t\t\tthis.typeClass = type;\r\n\t\t\t\tthis.subState = this.typeClass == '' ? '' : 'show' + type;\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.oldIndex = null;\r\n\t\t\t\t\tthis.theIndex = null;\r\n\t\t\t\t\tthis.subState = this.typeClass == 'valid' ? '' : this.subState;\r\n\t\t\t\t}, 200)\r\n\t\t\t\tif (this.typeClass == 'valid') {\r\n\t\t\t\t\tthis.pageNum = 1;\r\n\t\t\t\t\tthis.couponValidList = []\r\n\t\t\t\t\tthis.isNoMoreData = false;\r\n\t\t\t\t\tthis.getUserDiscountList(1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.pageNum = 1;\r\n\t\t\t\t\tthis.couponinvalidList = []\r\n\t\t\t\t\tthis.isNoMoreData = false;\r\n\t\t\t\t\tthis.getUserDiscountList(2);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t//控制左滑删除效果-begin\r\n\t\t\ttouchStart(index, event) {\r\n\t\t\t\t//多点触控不触发\r\n\t\t\t\tif (event.touches.length > 1) {\r\n\t\t\t\t\tthis.isStop = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis.oldIndex = this.theIndex;\r\n\t\t\t\tthis.theIndex = null;\r\n\t\t\t\t//初始坐标\r\n\t\t\t\tthis.initXY = [event.touches[0].pageX, event.touches[0].pageY];\r\n\t\t\t},\r\n\t\t\ttouchMove(index, event) {\r\n\t\t\t\t//多点触控不触发\r\n\t\t\t\tif (event.touches.length > 1) {\r\n\t\t\t\t\tthis.isStop = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tlet moveX = event.touches[0].pageX - this.initXY[0];\r\n\t\t\t\tlet moveY = event.touches[0].pageY - this.initXY[1];\r\n\r\n\t\t\t\tif (this.isStop || Math.abs(moveX) < 5) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (Math.abs(moveY) > Math.abs(moveX)) {\r\n\t\t\t\t\t// 竖向滑动-不触发左滑效果\r\n\t\t\t\t\tthis.isStop = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (moveX < 0) {\r\n\t\t\t\t\tthis.theIndex = index;\r\n\t\t\t\t\tthis.isStop = true;\r\n\t\t\t\t} else if (moveX > 0) {\r\n\t\t\t\t\tif (this.theIndex != null && this.oldIndex == this.theIndex) {\r\n\t\t\t\t\t\tthis.oldIndex = index;\r\n\t\t\t\t\t\tthis.theIndex = null;\r\n\t\t\t\t\t\tthis.isStop = true;\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.oldIndex = null;\r\n\t\t\t\t\t\t}, 150)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\ttouchEnd(index, $event) {\r\n\t\t\t\t//解除禁止触发状态\r\n\t\t\t\tthis.isStop = false;\r\n\t\t\t},\r\n\r\n\t\t\t//删除商品\r\n\t\t\tdeleteCoupon(id, List) {\r\n\t\t\t\tlet len = List.length;\r\n\t\t\t\tfor (let i = 0; i < len; i++) {\r\n\t\t\t\t\tif (id == List[i].id) {\r\n\t\t\t\t\t\tList.splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.oldIndex = null;\r\n\t\t\t\tthis.theIndex = null;\r\n\t\t\t},\r\n\r\n\t\t\tdiscard() {\r\n\t\t\t\t//丢弃\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\t}\r\n</script>\r\n<style lang=\"scss\">\r\n\tview {\r\n\t\tdisplay: flex;\r\n\t\tflex-wrap: wrap;\r\n\r\n\t}\r\n\r\n\tpage {\r\n\t\tposition: relative;\r\n\t\tbackground-color: #f5f5f5;\r\n\t}\r\n\r\n\t.hidden {\r\n\t\tdisplay: none !important;\r\n\t}\r\n\r\n\t.place {\r\n\t\twidth: 100%;\r\n\t\theight: 95upx;\r\n\t}\r\n\r\n\t.tabr {\r\n\t\tbackground-color: #fff;\r\n\t\twidth: 94%;\r\n\t\theight: 95upx;\r\n\t\tpadding: 0 3%;\r\n\t\tborder-bottom: solid 1upx #dedede;\r\n\t\tposition: fixed;\r\n\t\ttop: 0;\r\n\t\tz-index: 10;\r\n\r\n\t\tview {\r\n\t\t\twidth: 50%;\r\n\t\t\theight: 90upx;\r\n\t\t\tjustify-content: center;\r\n\t\t\talign-items: center;\r\n\t\t\tfont-size: 32upx;\r\n\t\t\tcolor: #999;\r\n\t\t}\r\n\r\n\t\t.on {\r\n\t\t\tcolor: #f06c7a;\r\n\t\t}\r\n\r\n\t\t.border {\r\n\t\t\theight: 4upx;\r\n\t\t\tbackground-color: #f06c7a;\r\n\t\t\ttransition: all .3s ease-out;\r\n\r\n\t\t\t&.invalid {\r\n\t\t\t\ttransform: translate3d(100%, 0, 0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t.list {\r\n\t\twidth: 100%;\r\n\t\tdisplay: block;\r\n\t\tposition: relative;\r\n\t}\r\n\r\n\t@keyframes showValid {\r\n\t\t0% {\r\n\t\t\ttransform: translateX(-100%);\r\n\t\t}\r\n\r\n\t\t100% {\r\n\t\t\ttransform: translateX(0);\r\n\t\t}\r\n\t}\r\n\r\n\t@keyframes showInvalid {\r\n\t\t0% {\r\n\t\t\ttransform: translateX(0);\r\n\t\t}\r\n\r\n\t\t100% {\r\n\t\t\ttransform: translateX(-100%);\r\n\t\t}\r\n\t}\r\n\r\n\t.sub-list {\r\n\t\t&.invalid {\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 100%;\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\r\n\t\t&.showvalid {\r\n\t\t\tdisplay: flex;\r\n\t\t\tanimation: showValid 0.20s linear both;\r\n\t\t}\r\n\r\n\t\t&.showinvalid {\r\n\t\t\tdisplay: flex;\r\n\t\t\tanimation: showInvalid 0.20s linear both;\r\n\t\t}\r\n\r\n\t\twidth: 100%;\r\n\t\tpadding: 20upx 0 120upx 0;\r\n\r\n\t\t.tis {\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 60upx;\r\n\t\t\tjustify-content: center;\r\n\t\t\talign-items: center;\r\n\t\t\tfont-size: 32upx;\r\n\t\t}\r\n\r\n\t\t.row {\r\n\t\t\twidth: 92%;\r\n\t\t\theight: 24vw;\r\n\t\t\tmargin: 20upx auto 10upx auto;\r\n\t\t\tborder-radius: 8upx;\r\n\t\t\t// box-shadow: 0upx 0 10upx rgba(0,0,0,0.1);\r\n\t\t\talign-items: center;\r\n\t\t\tposition: relative;\r\n\t\t\toverflow: hidden;\r\n\t\t\tz-index: 4;\r\n\t\t\tborder: 0;\r\n\r\n\t\t\t.menu {\r\n\t\t\t\t.icon {\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\tfont-size: 50upx;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\twidth: 28%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t\tright: 0;\r\n\t\t\t\tjustify-content: center;\r\n\t\t\t\talign-items: center;\r\n\t\t\t\tbackground-color: red;\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t\tz-index: 2;\r\n\t\t\t}\r\n\r\n\t\t\t.carrier {\r\n\t\t\t\t@keyframes showMenu {\r\n\t\t\t\t\t0% {\r\n\t\t\t\t\t\ttransform: translateX(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t100% {\r\n\t\t\t\t\t\ttransform: translateX(-28%);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@keyframes closeMenu {\r\n\t\t\t\t\t0% {\r\n\t\t\t\t\t\ttransform: translateX(-28%);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t100% {\r\n\t\t\t\t\t\ttransform: translateX(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.open {\r\n\t\t\t\t\tanimation: showMenu 0.25s linear both;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.close {\r\n\t\t\t\t\tanimation: closeMenu 0.15s linear both;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbackground-color: #fff;\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\tpadding: 0 0;\r\n\t\t\t\theight: 100%;\r\n\t\t\t\tz-index: 3;\r\n\t\t\t\tflex-wrap: nowrap;\r\n\r\n\t\t\t\t.left {\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t.title {\r\n\t\t\t\t\t\tpadding-top: 3vw;\r\n\t\t\t\t\t\twidth: 90%;\r\n\t\t\t\t\t\tmargin: 0 5%;\r\n\t\t\t\t\t\tfont-size: 36upx;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.term {\r\n\t\t\t\t\t\twidth: 90%;\r\n\t\t\t\t\t\tmargin: 0 5%;\r\n\t\t\t\t\t\tfont-size: 26upx;\r\n\t\t\t\t\t\tcolor: #999;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t.gap-top,\r\n\t\t\t\t\t.gap-bottom {\r\n\t\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\t\twidth: 20upx;\r\n\t\t\t\t\t\theight: 20upx;\r\n\t\t\t\t\t\tright: -10upx;\r\n\t\t\t\t\t\tborder-radius: 100%;\r\n\t\t\t\t\t\tbackground-color: #f5f5f5;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.gap-top {\r\n\t\t\t\t\t\ttop: -10upx;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.gap-bottom {\r\n\t\t\t\t\t\tbottom: -10upx;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.shixiao {\r\n\t\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\t\tright: 20upx;\r\n\t\t\t\t\t\tfont-size: 150upx;\r\n\t\t\t\t\t\tz-index: 6;\r\n\t\t\t\t\t\tcolor: rgba(153, 153, 153, 0.2)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.right {\r\n\t\t\t\t\tflex-shrink: 0;\r\n\t\t\t\t\twidth: 28%;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\tbackground: linear-gradient(to right, #ec625c, #ee827f);\r\n\r\n\t\t\t\t\t&.invalid {\r\n\t\t\t\t\t\tbackground: linear-gradient(to right, #aaa, #999);\r\n\r\n\t\t\t\t\t\t.use {\r\n\t\t\t\t\t\t\tcolor: #aaa;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjustify-content: center;\r\n\r\n\t\t\t\t\t.ticket,\r\n\t\t\t\t\t.criteria {\r\n\t\t\t\t\t\twidth: 100%;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.ticket {\r\n\t\t\t\t\t\tpadding-top: 1vw;\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\talign-items: baseline;\r\n\t\t\t\t\t\theight: 6vw;\r\n\r\n\t\t\t\t\t\t.num {\r\n\t\t\t\t\t\t\tfont-size: 42upx;\r\n\t\t\t\t\t\t\tfont-weight: 600;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t.unit {\r\n\t\t\t\t\t\t\tfont-size: 24upx;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.criteria {\r\n\t\t\t\t\t\tjustify-content: center;\r\n\r\n\t\t\t\t\t\tfont-size: 28upx;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.use {\r\n\t\t\t\t\t\twidth: 50%;\r\n\t\t\t\t\t\theight: 40upx;\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\talign-items: center;\r\n\t\t\t\t\t\tfont-size: 24upx;\r\n\t\t\t\t\t\tbackground-color: #fff;\r\n\t\t\t\t\t\tcolor: #ee827f;\r\n\t\t\t\t\t\tborder-radius: 40upx;\r\n\t\t\t\t\t\tpadding: 0 10upx;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t<view class=\"carrier\" :class=\"[theIndex==index?'open':oldIndex==index?'close':'']\" @touchstart=\"touchStart(index,$event)\" @touchmove=\"touchMove(index,$event)\" @touchend=\"touchEnd(index,$event)\">\r\n\t\t\t\t<view class=\"left\">\r\n\t\t\t\t\t<view class=\"title\">\r\n\t\t\t\t\t\t10元日常用品类\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"term\">\r\n\t\t\t\t\t\t2019-04-01~2019-05-30\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"right\">\r\n\t\t\t\t\t<view class=\"ticket\">\r\n\t\t\t\t\t\t<view class=\"num\">\r\n\t\t\t\t\t\t\t10\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"unit\">\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\t<view class=\"criteria\">\r\n\t\t\t\t\t\t满50使用\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"use\">\r\n\t\t\t\t\t\t去使用\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\t* \r\n\t\t\t* */\r\n\t\t}\r\n\t}\r\n</style>\n","import mod from \"-!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./coupon.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./coupon.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1617712058428\n var cssReload = require(\"D:/HBuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |