{"version":3,"sources":["webpack:///./src/static/coupon_empty.png","webpack:///./src/api/pay.js","webpack:///./node_modules/@em/ym/lib/common/nativeLifecycle.js","webpack:///./src/views/Coupon/DisabledCoupon.vue","webpack:///src/views/Coupon/DisabledCoupon.vue","webpack:///./src/views/Coupon/DisabledCoupon.vue?f5da","webpack:///./src/views/Coupon/DisabledCoupon.vue?ee7e","webpack:///./src/views/Coupon/DisabledCoupon.vue?b612"],"names":["module","exports","async","getGoods","goodsId","setId","pid","axios","get","Urls","DOMAIN_YKT","params","then","data","detail","result","code","createOrder","productId","source","quantity","createPayOrder","payMethod","orderId","extendToken","tradeType","appId","PaymentStatus","unPaid","paying","paymentSuccess","paymentFailed","queryOrderStatus","paymentStatus","catch","getCouponApi","viewState","url","method","headers","getCouponCountApi","post","resumeEventList","hasWatchOnResume","watchOnResume","onResumeMiddle_1","window","onResume","forEach","handler","error","console","timeout","isInit","middlewareCallback","resumeIndex","push","setTimeout","render","_vm","this","_c","_self","_setupProxy","staticClass","_l","statusList","item","index","key","class","activeStatus","value","on","$event","statusSelect","_v","_s","name","couponList","length","valueAmount","minLimitAmount","dayjs","validFrom","format","validEnd","status","attrs","require","staticRenderFns","defineComponent","setup","ref","state","reactive","activeStatusVal","computed","find","a","getCouponData","direction","list","onMounted","getClientInfo","toRefs","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,iC,6DCA3C,oRA4BOC,eAAeC,EAASC,EAASC,EAAOC,GAC7C,OAAOC,OACJC,IAAOC,OAAKC,WAAP,mBAAqC,CACzCC,OAAQ,CACNP,UACAC,QACAC,SAGHM,KAAKC,IACJ,IAAIC,EAAS,KAIb,OAHyB,IAArBD,EAAKE,OAAOC,OACdF,EAASD,EAAKC,QAETA,IAsBNZ,eAAee,EAAYC,EAAWC,EAAQC,EAAW,GAC9D,OAAOb,OACJC,IAAOC,OAAKC,WAAP,2BAA6C,CACjDC,OAAQ,CACNO,YACAC,SACAC,cAGHR,KAAKC,GACGA,GAUNX,eAAemB,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B,MAAMhB,EAAKiB,WAAWC,OAAO,eAAe,MAAM1B,EAAIkB,GAAGlB,EAAIwB,MAAMhB,EAAKmB,UAAUD,OAAO,eAAe,WAAWxB,EAAG,MAAM,CAACG,YAAY,YAAYM,MAAsB,IAAhBH,EAAKoB,OAAe,UAAY,UAAS,GAA7/B1B,EAAG,MAAM,CAACG,YAAY,oBAAoB,CAACH,EAAG,MAAM,CAAC2B,MAAM,CAAC,IAAMC,EAAQ,QAA6B,IAAM,MAAM5B,EAAG,MAAM,CAACG,YAAY,SAAS,CAACL,EAAIiB,GAAG,mBAE/sBc,EAAkB,G,qECoEtBC,iBAAA,CACAC,QACA,MAAAb,EAAAc,eAAA,IACAC,EAAAC,eAAA,CACA3D,UAAA,GACAmC,aAAA,EACAL,WAAA,CACA,CAAAY,KAAA,MAAAN,MAAA,GACA,CAAAM,KAAA,MAAAN,MAAA,MAGAwB,EAAAC,eACA,IAAAH,EAAA5B,WAAAgC,KAAAC,KAAA3B,QAAAsB,EAAAvB,cAAAC,OAUA,eAAA4B,IACA,aAAAtF,EAAA,OAAAC,SAAAoB,eACA,CACAkE,UAAAP,EAAA1D,UAAA,IACA8B,WACA,IAAA8B,EAAAxB,MAAA,OAAAwB,EAAAxB,QAEAsB,EAAA1D,WAEA,IAAArB,EAAAC,OACA+D,EAAAP,MAAA1D,EAAAwF,MAGA,SAAA3B,EAAAR,GACA2B,EAAAvB,aAAAJ,EAAAK,MACAsB,EAAA1D,UAAA,GACAgE,IAEA,OA1BAG,eAAA,KACAH,IACArD,eAAA,KACAyD,eAAA,KACAJ,UAsBA,IACAK,eAAAX,GACAf,aACAJ,eACAQ,cClHsW,I,wBCQlWuB,EAAY,eACd,EACAhD,EACAgC,GACA,EACA,KACA,WACA,MAIa,aAAAgB,E,2CCnBf","file":"js/chunk-aa94f902.21d5616d.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/coupon_empty.b70e2d78.png\";","import axios from '@/assets/js/axios'\r\nimport Urls from '@/assets/js/Urls'\r\nimport appInfo from '@/assets/js/appInfo'\r\n\r\n/**\r\n * 单个商品的信息\r\n * @typedef GoodsItem\r\n * @property {number} id 商品唯一id\r\n * @property {string} name 商品名称\r\n * @property {number} savePerMonth 每月节省的金额\r\n * @property {number} price 价格\r\n * @property {number} applePrice 苹果上的价格?\r\n */\r\n\r\n/**\r\n * 商品信息\r\n * @typedef GoodsInfo\r\n * @property {string} title 标题\r\n * @property {goodsId} goodsId 商品id\r\n * @property {Array<>} sets 商品列表\r\n */\r\n\r\n/**\r\n * 获取商品信息\r\n * @param goodsId 商品id\r\n * @param {number} pid 权限Id\r\n * @return {Promise}\r\n */\r\nexport async function getGoods(goodsId, setId, pid) {\r\n return axios\r\n .get(`${Urls.DOMAIN_YKT}/Shop/Data/Goods`, {\r\n params: {\r\n goodsId,\r\n setId,\r\n pid\r\n }\r\n })\r\n .then(data => {\r\n let detail = null\r\n if (data.result.code === 0) {\r\n detail = data.detail\r\n }\r\n return detail\r\n })\r\n}\r\n\r\n/**\r\n * @typedef OrderInfo 订单信息\r\n * @property {string} [transactionCode] 账单流水号,支付成功后由支付系统生成\r\n * @property {string} orderId 订单号\r\n * @property {string} [productName] 商品名称\r\n * @property {Date} createTime 订单创建时间\r\n * @property {number} orderStatus 订单状态\r\n * @property {number} userId 用户Id\r\n * @property {number} amount 订单金额\r\n */\r\n\r\n/**\r\n * 创建订单\r\n * @param {number} productId 商品id\r\n * @param {string} source 订单来源\r\n * @param {number} quantity 购买数量,默认1\r\n * @return {Promise<{result: ResponseResult, detail: OrderInfo}>}\r\n */\r\nexport async function createOrder(productId, source, quantity = 1) {\r\n return axios\r\n .get(`${Urls.DOMAIN_YKT}/Order/Order/CreateOrder`, {\r\n params: {\r\n productId,\r\n source,\r\n quantity\r\n }\r\n })\r\n .then(data => {\r\n return data\r\n })\r\n}\r\n\r\n/**\r\n * 创建支付订单\r\n * @param {number} payMethod 支付方式\r\n * @param {number} orderId 订单号\r\n * @return {Promise<{result:ResponseResult,detail:Object}>}\r\n */\r\nexport async function createPayOrder(\r\n payMethod,\r\n orderId,\r\n extendToken,\r\n tradeType = 2,\r\n appId = 31\r\n) {\r\n // if (appId === '') {\r\n // appId = localStorage.getItem('currentAppId')\r\n // }\r\n return axios.get(`${Urls.DOMAIN_YKT}/Order/Order/PayOrder`, {\r\n params: {\r\n payMethod,\r\n orderId,\r\n extendToken,\r\n tradeType,\r\n appId\r\n }\r\n })\r\n}\r\n\r\n/**\r\n * 支付状态\r\n * @type {{paymentSuccess: number, paying: number, paymentFailed: number, unPaid: number}}\r\n */\r\nexport const PaymentStatus = {\r\n /**\r\n * 未支付\r\n */\r\n unPaid: 1,\r\n /**\r\n * 支付中\r\n */\r\n paying: 2,\r\n /**\r\n * 支付成功\r\n */\r\n paymentSuccess: 3,\r\n /**\r\n * 支付失败\r\n */\r\n paymentFailed: 4\r\n}\r\n\r\n/**\r\n * 查询订单支付状态\r\n * @param {string} orderId 订单id\r\n * @return {Promise} 支付状态\r\n */\r\nexport async function queryOrderStatus(orderId) {\r\n return axios\r\n .get(`${Urls.DOMAIN_YKT}/Order/Order/QueryOrderStatus`, {\r\n params: {\r\n orderId\r\n }\r\n })\r\n .then(data => {\r\n let paymentStatus = PaymentStatus.paymentFailed\r\n if (data.result.code === 0) {\r\n paymentStatus = data.detail\r\n }\r\n\r\n return paymentStatus\r\n })\r\n .catch(() => {\r\n return PaymentStatus.paymentFailed\r\n })\r\n}\r\n\r\n/**\r\n * 获取优惠券\r\n * data {userId,type,statusList}\r\n * @param {number} userId 用户id\r\n * @param {number} type 用户id 1.平台通用券 2. 指定商品通用券 3.指定商品优惠券\r\n * @param {number} statusList []返回指定状态的优惠券 0. 生效 1.已使用 2.已锁定 3.已过期\r\n */\r\nexport function getCouponApi(data, viewState) {\r\n return axios({\r\n url: `${Urls.DOMAIN_YKT}/Coupon/Api/Page`,\r\n method: 'post',\r\n data,\r\n headers: {\r\n 'Ykt-ViewState': viewState\r\n }\r\n })\r\n .then(result => {\r\n return result\r\n })\r\n .catch(() => null)\r\n}\r\n\r\n/**\r\n * 获取有效优惠券数量\r\n */\r\nexport function getCouponCountApi() {\r\n const url = `${Urls.DOMAIN_YKT}/coupon/api/Count`\r\n return axios\r\n .post(url)\r\n .then(result => {\r\n return result\r\n })\r\n .catch(() => null)\r\n}\r\n","import { isClient } from '../utils';\r\nvar resumeEventList = [];\r\nvar pauseEventList = [];\r\nvar hasWatchOnResume = false;\r\nfunction watchOnResume() {\r\n if (isClient && !hasWatchOnResume) {\r\n hasWatchOnResume = true;\r\n var onResumeMiddle_1 = window.onResume;\r\n window.onResume = function () {\r\n try {\r\n resumeEventList.forEach(function (handler) {\r\n handler && handler();\r\n });\r\n if (onResumeMiddle_1) {\r\n onResumeMiddle_1();\r\n }\r\n }\r\n catch (error) {\r\n console.error('[onResume]:', error);\r\n }\r\n };\r\n }\r\n}\r\nvar hasWatchOnPause = false;\r\nfunction watchOnPause() {\r\n if (isClient && !hasWatchOnPause) {\r\n hasWatchOnPause = true;\r\n var onPauseMiddle_1 = window.onPause;\r\n window.onPause = function () {\r\n try {\r\n pauseEventList.forEach(function (handler) {\r\n handler && handler();\r\n });\r\n if (onPauseMiddle_1) {\r\n onPauseMiddle_1();\r\n }\r\n }\r\n catch (error) {\r\n console.error('[onPause]:', error);\r\n }\r\n };\r\n }\r\n}\r\n/**\r\n * 监听页面激活事件\r\n * @param handler 监听器,页面激活时的回调\r\n * @param timeout 延迟监听的时长,默认为1000毫秒,防止页面加载时被执行\r\n */\r\nexport function onResume(handler, timeout) {\r\n if (timeout === void 0) { timeout = 1000; }\r\n var isInit = false;\r\n var middlewareCallback = function () {\r\n isInit && handler();\r\n };\r\n var resumeIndex = resumeEventList.push(middlewareCallback) - 1;\r\n setTimeout(function () { return (isInit = true); }, timeout);\r\n watchOnResume();\r\n return resumeIndex;\r\n}\r\n/**\r\n * 取消监听页面激活\r\n * @param handler 调用onResume时返回的值或传入的handler\r\n */\r\nexport function offResume(handler) {\r\n resumeEventList.splice(typeof handler === 'number'\r\n ? handler\r\n : resumeEventList.indexOf(handler) >>> 0, 1, undefined);\r\n}\r\n/**\r\n * 监听页面离开事件\r\n * @param handler 监听器,页面离开时的回调\r\n */\r\nexport function onPause(handler) {\r\n watchOnPause();\r\n return pauseEventList.push(handler) - 1;\r\n}\r\n/**\r\n * 取消监听页面离开\r\n * @param handler 调用onPause时返回的值或传入的handler\r\n */\r\nexport function offPause(handler) {\r\n pauseEventList.splice(typeof handler === 'number'\r\n ? handler\r\n : pauseEventList.indexOf(handler) >>> 0, 1, undefined);\r\n}\r\n//# sourceMappingURL=nativeLifecycle.js.map","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"content mt-56\"},[_c('div',{staticClass:\"filter-row\"},[_c('div',{staticClass:\"filter-row-content\"},_vm._l((_vm.statusList),function(item,index){return _c('div',{key:index,staticClass:\"filter-item-wrap\"},[_c('div',{staticClass:\"item-bottom-10 filter-item\",class:{ 'select-item': _vm.activeStatus == item.value },on:{\"click\":function($event){return _vm.statusSelect(item, index)}}},[_vm._v(\" \"+_vm._s(item.name)+\" \")])])}),0)]),(!_vm.couponList.length)?_c('div',{staticClass:\"nodata-container\"},[_c('img',{attrs:{\"src\":require(\"@/static/coupon_empty.png\"),\"alt\":\"\"}}),_c('div',{staticClass:\"s6 t3\"},[_vm._v(\"暂无此类型优惠券\")])]):_c('ul',{staticClass:\"payment-mode-list t3\"},_vm._l((_vm.couponList),function(item,index){return _c('li',{key:index,staticClass:\"payment-mode payment-mode--disable\"},[_c('div',{staticClass:\"t1 flex\"},[_c('div',{staticClass:\"left-count text-center\"},[_c('div',{staticClass:\"s4\"},[_vm._v(\" ¥\"),_c('span',{staticClass:\"s10 font-bold\"},[_vm._v(_vm._s(item.valueAmount))])]),_c('div',{staticClass:\"s4 min-limit\"},[_vm._v(\" \"+_vm._s(item.minLimitAmount ? `满${item.minLimitAmount}可用` : '无门槛优惠券')+\" \")])]),_c('div',{staticClass:\"right-count\"},[_c('div',{staticClass:\"s8 mb-20 name\"},[_vm._v(_vm._s(item.name))]),_c('div',{staticClass:\"s4\"},[_vm._v(\" \"+_vm._s(_vm.dayjs(item.validFrom).format('YYYY.MM.DD'))+\" ~ \"+_vm._s(_vm.dayjs(item.validEnd).format('YYYY.MM.DD'))+\" \")])])]),_c('div',{staticClass:\"click-btn\",class:item.status === 3 ? 'expired' : ''})])}),0)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\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!./DisabledCoupon.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!./DisabledCoupon.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./DisabledCoupon.vue?vue&type=template&id=be2bdbf0&scoped=true\"\nimport script from \"./DisabledCoupon.vue?vue&type=script&lang=js\"\nexport * from \"./DisabledCoupon.vue?vue&type=script&lang=js\"\nimport style0 from \"./DisabledCoupon.vue?vue&type=style&index=0&id=be2bdbf0&prod&lang=scss&scoped=true\"\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 \"be2bdbf0\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DisabledCoupon.vue?vue&type=style&index=0&id=be2bdbf0&prod&lang=scss&scoped=true\""],"sourceRoot":""}