Files
BlockChainH5/unpackage/dist/build/h5/static/js/pages-coupons-management.9915286f.js

1 line
18 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-coupons-management"],{"13bf":function(e,t,a){var o=a("b3f7");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=a("4f06").default;n("56a63334",o,!0,{sourceMap:!1,shadowMode:!1})},"1de5":function(e,t,a){"use strict";e.exports=function(e,t){return t||(t={}),e=e&&e.__esModule?e.default:e,"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},"25f8":function(e,t,a){"use strict";a.r(t);var o=a("4fae"),n=a("c146");for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);a("fd0f");var s,l=a("f0c5"),c=Object(l["a"])(n["default"],o["b"],o["c"],!1,null,"68a98e99",null,!1,o["a"],s);t["default"]=c.exports},"4fae":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return o}));var o={uniIcons:a("f1a7").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"basics-content"},[a("v-uni-view",{staticClass:"header"},[a("v-uni-view",{staticClass:"tabs"},[a("v-uni-view",{staticClass:"item",class:{show:""==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("")}}},[e._v("全部")]),a("v-uni-view",{staticClass:"item",class:{show:"1"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("1")}}},[e._v("服务券")]),a("v-uni-view",{staticClass:"item",class:{show:"2"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("2")}}},[e._v("代金券")]),a("v-uni-view",{staticClass:"item",class:{show:"3"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("3")}}},[e._v("提货券")])],1),a("v-uni-view",{staticClass:"tabs-type"},[a("v-uni-view",{staticClass:"item",class:{show:""==e.tabsType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabsType("")}}},[e._v("全部")]),a("v-uni-view",{staticClass:"item",class:{show:"shown"==e.tabsType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabsType("shown")}}},[e._v("已上架")]),a("v-uni-view",{staticClass:"item",class:{show:"unshown"==e.tabsType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabsType("unshown")}}},[e._v("已下架")]),a("v-uni-view",{staticClass:"item",class:{show:"expire"==e.tabsType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabsType("expire")}}},[e._v("即将过期")]),a("v-uni-view",{staticClass:"item",class:{show:"over"==e.tabsType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabsType("over")}}},[e._v("已过期")])],1)],1),e.coupons.length>0?[a("v-uni-view",{staticClass:"coupons"},e._l(e.coupons,(function(t,o){return a("v-uni-view",{key:o,staticClass:"coupons-flex",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.$Router.push({name:"magDetails",params:{couponId:t.coupon_id}})}}},[a("v-uni-view",{staticClass:"item cover"},[2===t.type.value?a("v-uni-view",[a("v-uni-view",{staticClass:"cover-price"},[e._v(e._s(t.price||0)),a("v-uni-text",[e._v("元")])],1),a("v-uni-view",{staticClass:"cover-subtitle"},[e._v("代金券")])],1):a("v-uni-image",{staticClass:"cover-img",attrs:{src:t.cover,mode:"aspectFill"}})],1),a("v-uni-view",{staticClass:"item mian"},[a("v-uni-view",{staticClass:"title nowrap"},[e._v(e._s(t.title))]),a("v-uni-view",{staticClass:"time nowrap"},[1==t.time_type.value?[e._v(e._s(t.start_at)+"至"+e._s(t.end_at))]:e._e(),2==t.time_type.value?[e._v("领取后"+e._s(t.days)+"天内有效")]:e._e()],2),a("v-uni-view",{staticClass:"tags nowrap"},[a("v-uni-text",[e._v("已"+e._s(t.status.text))]),a("v-uni-text",[e._v(e._s(t.goods_count)+"商品可用")])],1)],1),a("v-uni-view",{staticClass:"arrowright"},[a("uni-icons",{attrs:{type:"arrowright",size:"16",color:"#999"}})],1)],1)})),1)]:[a("v-uni-view",{staticClass:"list-null"},[a("v-uni-view",{staticClass:"sub-title"},[e._v("暂无相关优惠券")])],1)],a("v-uni-view",{staticClass:"basisc-btn"},[a("v-uni-button",{staticClass:"btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.$Router.push({name:"couponsAdd"})}}},[e._v("添加优惠券")])],1)],2)},i=[]},"57dc":function(e,t,a){e.exports=a.p+"static/fonts/uni.75745d34.ttf"},"5f33":function(e,t,a){"use strict";a.r(t);var o=a("caa6"),n=a.n(o);for(var i in o)"default"!==i&&function(e){a.d(t,e,(function(){return o[e]}))}(i);t["default"]=n.a},6876:function(e,t,a){"use strict";var o;a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return o}));var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-text",{staticClass:"uni-icons",class:[e.fontFamily,e.fontFamily?e.type:""],style:{color:e.color,"font-size":e.size+"px"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e._onClick.apply(void 0,arguments)}}},[e._v(e._s(e.fontFamily?"":e.icons[e.type]))])},i=[]},"89ef":function(e,t,a){var o=a("24fb"),n=a("1de5"),i=a("57dc");t=o(!1);var s=n(i);t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-218f84fe]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-218f84fe]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-218f84fe]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-218f84fe]{padding-top:0}.vertical[data-v-218f84fe]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-218f84fe]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-218f84fe]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */@font-face{font-family:uniicons;src:url('+s+') format("truetype")}.uni-icons[data-v-218f84fe]{font-family:uniicons;text-decoration:none;text-align:center}',""]),e.exports=t},"99ac":function(e,t,a){"use strict";var o=a("a9a0"),n=a.n(o);n.a},a1d0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.magCouponsRecommend=t.magCouponsStatus=t.magCouponsInfo=t.couponsGoods=t.pushCoupons=t.toolsCoupons=void 0;var o=a("89d9"),n=function(e){return(0,o.request)({url:"coupons/tools/coupons",data:e})};t.toolsCoupons=n;var i=function(e){return(0,o.request)({url:"coupons/tools/coupons",method:"POST",data:e})};t.pushCoupons=i;var s=function(e){return(0,o.request)({url:"coupons/tools/coupons/goods",data:e})};t.couponsGoods=s;var l=function(e){return(0,o.request)({url:"coupons/tools/coupons/"+e})};t.magCouponsInfo=l;var c=function(e){return(0,o.request)({url:"coupons/tools/coupons/"+e+"/status",method:"POST"})};t.magCouponsStatus=c;var r=function(e){return(0,o.request)({url:"coupons/tools/coupons/"+e+"/recommend"})};t.magCouponsRecommend=r},a9a0:function(e,t,a){var o=a("89ef");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=a("4f06").default;n("2acee188",o,!0,{sourceMap:!1,shadowMode:!1})},b3f7:function(e,t,a){var o=a("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-68a98e99], .coupons[data-v-68a98e99]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-68a98e99]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-68a98e99]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-68a98e99]{padding-top:0}.vertical[data-v-68a98e99], .list-null[data-v-68a98e99], .coupons .coupons-flex .arrowright[data-v-68a98e99], .coupons .coupons-flex .mian[data-v-68a98e99]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-68a98e99]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-68a98e99]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-68a98e99]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-68a98e99]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-68a98e99]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.basics-content[data-v-68a98e99]{padding-bottom:%?180?%}.basisc-btn[data-v-68a98e99]{position:fixed;bottom:0;left:0;right:0;padding:%?30?%;background:#fff;box-shadow:0 0 %?4?% %?4?% rgba(0,0,0,.02)}.basisc-btn .btn[data-v-68a98e99]{background:#8b64fd;color:#fff;border-radius:0;font-size:%?30?%;line-height:%?88?%;height:%?88?%}.basisc-btn .btn[data-v-68a98e99]::after{border:none}.basisc-btn .btn[disabled][data-v-68a98e99]{background:rgba(139,100,253,.6)}.header[data-v-68a98e99]{position:fixed;top:0;left:0;right:0;z-index:99}.header .tabs[data-v-68a98e99]{display:flex;justify-content:space-around;background:#fff;padding:%?15?% 0;font-size:%?30?%;color:#555}.header .tabs .item[data-v-68a98e99]{height:%?60?%;line-height:%?60?%}.header .tabs .item.show[data-v-68a98e99]{color:#8b64fd;border-bottom:solid %?4?% #8b64fd}.header .tabs-type[data-v-68a98e99]{display:flex;padding:%?20?% %?30?%;background:#fff}.header .tabs-type .item[data-v-68a98e99]{font-size:%?26?%;height:%?46?%;line-height:%?46?%;border-radius:%?23?%;padding:0 %?20?%;background:#fff;margin-right:%?15?%;color:#555}.header .tabs-type .item.show[data-v-68a98e99]{background-color:rgba(139,100,253,.1);color:#8b64fd}.list-null[data-v-68a98e99]{width:100vw;height:100vh;box-sizing:border-box;text-align:center}.list-null .sub-title[data-v-68a98e99]{color:#555;font-size:%?28?%}.list-null .icon[data-v-68a98e99]{width:%?288?%}.coupons[data-v-68a98e99]{padding-top:%?180?%}.coupons .coupons-flex[data-v-68a98e99]{position:relative;background:#fff;margin:%?30?%;border-radius:%?10?%;display:flex;justify-content:space-between;flex-wrap:wrap;padding:%?30?% %?70?% %?30?% 0}.coupons .coupons-flex .item[data-v-68a98e99]{position:relative;padding:0 %?30?%}.coupons .coupons-flex .arrowright[data-v-68a98e99]{position:absolute;right:%?30?%;top:0;bottom:0}.coupons .coupons-flex .cover[data-v-68a98e99]{position:relative;border-right:dashed %?3?% #ddd;width:%?148?%;text-align:center}.coupons .coupons-flex .cover .cover-img[data-v-68a98e99]{width:%?148?%;height:%?148?%;border-radius:%?10?%;vertical-align:top;background:#eff4f2;border:solid %?1?% #ddd;box-sizing:border-box}.coupons .coupons-flex .cover .cover-price[data-v-68a98e99]{padding-top:%?24?%;font-weight:700;line-height:%?58?%;font-size:%?42?%;color:#8b64fd}.coupons .coupons-flex .cover .cover-price uni-text[data-v-68a98e99]{font-size:70%;padding-left:%?5?%}.coupons .coupons-flex .cover .cover-subtitle[data-v-68a98e99]{padding-bottom:%?24?%;line-height:%?40?%;color:#555;font-size:%?26?%}.coupons .coupons-flex .cover[data-v-68a98e99]::after, .coupons .coupons-flex .cover[data-v-68a98e99]::before{position:absolute;width:%?30?%;height:%?30?%;background:#f8f8f8;content:" ";right:%?-16?%;border-radius:50%}.coupons .coupons-flex .cover[data-v-68a98e99]::after{top:%?-45?%}.coupons .coupons-flex .cover[data-v-68a98e99]::before{bottom:%?-45?%}.coupons .coupons-flex .mian[data-v-68a98e99]{justify-content:center;width:calc(100% - %?148?% - %?60?%);box-sizing:border-box}.coupons .coupons-flex .mian .title[data-v-68a98e99]{font-size:%?30?%;line-height:%?50?%;font-weight:700}.coupons .coupons-flex .mian .time[data-v-68a98e99], .coupons .coupons-flex .mian .tags[data-v-68a98e99]{color:#999;font-size:%?28?%;line-height:%?40?%}.coupons .coupons-flex .mian .tags[data-v-68a98e99]{margin-top:%?10?%}.coupons .coupons-flex .mian .tags uni-text[data-v-68a98e99]{background:#eff4f2;color:#555;padding:0 %?15?%;margin-right:%?15?%}.coupons .coupons-flex .mian .tags uni-text[data-v-68a98e99]:last-child{margin-right:0}',""]),e.exports=t},c146:function(e,t,a){"use strict";a.r(t);var o=a("d225"),n=a.n(o);for(var i in o)"default"!==i&&function(e){a.d(t,e,(function(){return o[e]}))}(i);t["default"]=n.a},caa6:function(e,t,a){"use strict";var o=a("4ea4");a("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(a("e437")),i={name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},fontFamily:{type:String,default:""}},data:function(){return{icons:n.default}},methods:{_onClick:function(){this.$emit("click")}}};t.default=i},d225:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a("a1d0"),n={data:function(){return{listType:"",tabsType:"",coupons:[],pages:{}}},onShow:function(){this.getCoupons()},methods:{onTabs:function(e){e!=this.listType&&(this.listType=e,this.getCoupons())},onTabsType:function(e){this.tabsType!==e&&(this.tabsType=e,this.getCoupons())},getCoupons:function(){var e=this;(0,o.toolsCoupons)({type:this.listType,status:this.tabsType}).then((function(t){console.log(t),e.coupons=t.lists.data,e.pages=t.lists.page})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))}}};t.default=n},e437:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={pulldown:"",refreshempty:"",back:"",forward:"",more:"","more-filled":"",scan:"",qq:"",weibo:"",weixin:"",pengyouquan:"",loop:"",refresh:"","refresh-filled":"",arrowthindown:"",arrowthinleft:"",arrowthinright:"",arrowthinup:"","undo-filled":"",undo:"",redo:"","redo-filled":"",bars:"",chatboxes:"",camera:"","chatboxes-filled":"","camera-filled":"","cart-filled":"",cart:"","checkbox-filled":"",checkbox:"",arrowleft:"",arrowdown:"",arrowright:"","smallcircle-filled":"",arrowup:"",circle:"","eye-filled":"","eye-slash-filled":"","eye-slash":"",eye:"","flag-filled":"",flag:"","gear-filled":"",reload:"",gear:"","hand-thumbsdown-filled":"","hand-thumbsdown":"","hand-thumbsup-filled":"","heart-filled":"","hand-thumbsup":"",heart:"",home:"",info:"","home-filled":"","info-filled":"","circle-filled":"","chat-filled":"",chat:"","mail-open-filled":"","email-filled":"","mail-open":"",email:"",checkmarkempty:"",list:"","locked-filled":"",locked:"","map-filled":"","map-pin":"","map-pin-ellipse":"",map:"","minus-filled":"","mic-filled":"",minus:"",micoff:"",mic:"",clear:"",smallcircle:"",close:"",closeempty:"",paperclip:"",paperplane:"","paperplane-filled":"","person-filled":"","contact-filled":"",person:"",contact:"","images-filled":"",phone:"",images:"",image:"","image-filled":"","location-filled":"",location:"","plus-filled":"",plus:"",plusempty:"","help-filled":"",help:"","navigate-filled":"",navigate:"","mic-slash-filled":"",search:"",settings:"",sound:"","sound-filled":"","spinner-cycle":"","download-filled":"","personadd-filled":"","videocam-filled":"",personadd:"",upload:"","upload-filled":"",starhalf:"","star-filled":"",star:"",trash:"","phone-filled":"",compose:"",videocam:"","trash-filled":"",download:"","chatbubble-filled":"",chatbubble:"","cloud-download":"","cloud-upload-filled":"","cloud-upload":"","cloud-download-filled":"",headphones:"",shop:""};t.default=o},f1a7:function(e,t,a){"use strict";a.r(t);var o=a("6876"),n=a("5f33");for(var i in n)"default"!==i&&function(e){a.d(t,e,(function(){return n[e]}))}(i);a("99ac");var s,l=a("f0c5"),c=Object(l["a"])(n["default"],o["b"],o["c"],!1,null,"218f84fe",null,!1,o["a"],s);t["default"]=c.exports},fd0f:function(e,t,a){"use strict";var o=a("13bf"),n=a.n(o);n.a}}]);