user-my_card_coupon-my_card_coupon~user-my_coupon-my_coupon.01b4a01e.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-my_card_coupon-my_card_coupon~user-my_coupon-my_coupon"],{"0ca2":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.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/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-095e3b7e] .u-form-item--right__content__slot > uni-view,[data-v-095e3b7e] .u-form-item--right__content__slot > div,[data-v-095e3b7e] .u-form-item--right__content__slot > span,[data-v-095e3b7e] .u-form-item--right__content__slot > uni-text{width:100%}.u-badge[data-v-095e3b7e]{display:inline-flex;justify-content:center;align-items:center;line-height:%?24?%;padding:%?4?% %?8?%;border-radius:%?100?%;z-index:9}.u-badge--bg--primary[data-v-095e3b7e]{background-color:#2979ff}.u-badge--bg--error[data-v-095e3b7e]{background-color:#fa3534}.u-badge--bg--success[data-v-095e3b7e]{background-color:#19be6b}.u-badge--bg--info[data-v-095e3b7e]{background-color:#909399}.u-badge--bg--warning[data-v-095e3b7e]{background-color:#f90}.u-badge-dot[data-v-095e3b7e]{height:%?16?%;width:%?16?%;border-radius:%?100?%;line-height:1}.u-badge-mini[data-v-095e3b7e]{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:center center;transform-origin:center center}.u-info[data-v-095e3b7e]{background-color:#909399;color:#fff}',""]),t.exports=e},"17f5":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("2634")),o=i(n("2fdc"));n("64aa"),n("bf0f"),n("5c47"),n("aa9c"),n("fd3c");var a=i(n("55ef")),s=a.default,c=uni.getSystemInfoSync(),u=c.windowWidth,l={name:"u-tabs-swiper",props:{isScroll:{type:Boolean,default:!0},list:{type:Array,default:function(){return[]}},current:{type:[Number,String],default:0},height:{type:[Number,String],default:80},fontSize:{type:[Number,String],default:30},swiperWidth:{type:[String,Number],default:750},activeColor:{type:String,default:"#2979ff"},inactiveColor:{type:String,default:"#303133"},barWidth:{type:[Number,String],default:40},barHeight:{type:[Number,String],default:6},gutter:{type:[Number,String],default:40},zIndex:{type:[Number,String],default:1},bgColor:{type:String,default:"#ffffff"},autoCenterMode:{type:String,default:"window"},name:{type:String,default:"name"},count:{type:String,default:"count"},offset:{type:Array,default:function(){return[5,20]}},bold:{type:Boolean,default:!0},activeItemStyle:{type:Object,default:function(){return{}}},showBar:{type:Boolean,default:!0},barStyle:{type:Object,default:function(){return{}}}},data:function(){return{scrollLeft:0,tabQueryInfo:[],windowWidth:0,animationFinishCurrent:this.current,componentsWidth:0,line3AddDx:0,line3Dx:0,preId:"UEl_",sW:0,tabsInfo:[],colorGradientArr:[],colorStep:100}},computed:{getCurrent:function(){var t=Number(this.current);return t>this.getTabs.length-1?this.getTabs.length-1:t<0?0:t},getTabs:function(){return this.list},scrollBarLeft:function(){return Number(this.line3Dx)+Number(this.line3AddDx)},barWidthPx:function(){return uni.upx2px(this.barWidth)},tabItemStyle:function(){var t=this;return function(e){var n={height:t.height+"rpx",lineHeight:t.height+"rpx",padding:"0 ".concat(t.gutter/2,"rpx"),color:t.tabsInfo.length>0?t.tabsInfo[e]?t.tabsInfo[e].color:t.activeColor:t.inactiveColor,fontSize:t.fontSize+"rpx",zIndex:t.zIndex+2,fontWeight:e==t.getCurrent&&t.bold?"bold":"normal"};return e==t.getCurrent&&(n=Object.assign(n,t.activeItemStyle)),n}},tabBarStyle:function(){var t={width:this.barWidthPx+"px",height:this.barHeight+"rpx",borderRadius:"100px",backgroundColor:this.activeColor,left:this.scrollBarLeft+"px"};return Object.assign(t,this.barStyle)}},watch:{current:function(t,e){this.change(t),this.setFinishCurrent(t)},list:function(){var t=this;this.$nextTick((function(){t.init()}))}},mounted:function(){this.init()},methods:{init:function(){var t=this;return(0,o.default)((0,r.default)().mark((function e(){return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.countPx(),e.next=3,t.getTabsInfo();case 3:t.countLine3Dx(),t.getQuery((function(){t.setScrollViewToCenter()})),t.colorGradientArr=s.colorGradient(t.inactiveColor,t.activeColor,t.colorStep);case 6:case"end":return e.stop()}}),e)})))()},getTabsInfo:function(){var t=this;return new Promise((function(e,n){for(var i=uni.createSelectorQuery().in(t),r=0;r<t.list.length;r++)i.select(".UEl_"+r).boundingClientRect();i.exec((function(n){for(var i=[],r=0;r<n.length;r++)n[r].color=t.inactiveColor,r==t.getCurrent&&(n[r].color=t.activeColor),i.push(n[r]);t.tabsInfo=i,e()}))}))},countLine3Dx:function(){var t=this.tabsInfo[this.animationFinishCurrent];t&&(this.line3Dx=t.left+t.width/2-this.barWidthPx/2-this.tabsInfo[0].left)},countPx:function(){this.sW=uni.upx2px(Number(this.swiperWidth))},emit:function(t){this.$emit("change",t)},change:function(){this.setScrollViewToCenter()},getQuery:function(t){var e=this;try{var n=uni.createSelectorQuery().in(this).select(".u-tabs");n.fields({size:!0},(function(n){n?(e.componentsWidth=n.width,t&&"function"===typeof t&&t(n)):e.getQuery(t)})).exec()}catch(i){this.componentsWidth=u}},setScrollViewToCenter:function(){var t;if(t=this.tabsInfo[this.animationFinishCurrent],t){var e,n=t.left+t.width/2;e="window"===this.autoCenterMode?u:this.componentsWidth,this.scrollLeft=n-e/2}},setDx:function(t){var e=t>0?this.animationFinishCurrent+1:this.animationFinishCurrent-1;e=e<=0?0:e,e=e>=this.list.length?this.list.length-1:e;this.tabsInfo[e];var n=this.tabsInfo[this.animationFinishCurrent],i=n.left+n.width/2,r=this.tabsInfo[e],o=r.left+r.width/2,a=Math.abs(o-i);this.line3AddDx=t/this.sW*a,this.setTabColor(this.animationFinishCurrent,e,t)},setTabColor:function(t,e,n){var i=Math.abs(Math.ceil(n/this.sW*100)),r=this.colorGradientArr.length;i=i>=r?r-1:i<=0?0:i,this.tabsInfo[e].color=this.colorGradientArr[i],this.tabsInfo[t].color=this.colorGradientArr[r-1-i]},setFinishCurrent:function(t){var e=this;this.tabsInfo.map((function(n,i){return n.color=t==i?e.activeColor:e.inactiveColor,n})),this.line3AddDx=0,this.animationFinishCurrent=t,this.countLine3Dx()}}};e.default=l},"4ed2":function(t,e,n){"use strict";n.r(e);var i=n("ed46"),r=n("ff1c");for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("59cb");var a=n("828b"),s=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"095e3b7e",null,!1,i["a"],void 0);e["default"]=s.exports},"59cb":function(t,e,n){"use strict";var i=n("a1b7"),r=n.n(i);r.a},"669e":function(t,e,n){"use strict";n.r(e);var i=n("7d1d"),r=n("dc53");for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("f9d0");var a=n("828b"),s=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"90503cac",null,!1,i["a"],void 0);e["default"]=s.exports},"7d1d":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uBadge:n("4ed2").default},r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"u-tabs",style:{zIndex:t.zIndex,background:t.bgColor}},[n("v-uni-scroll-view",{staticClass:"u-scroll-view",style:{zIndex:t.zIndex+1},attrs:{"scroll-x":!0,"scroll-left":t.scrollLeft,"scroll-with-animation":!0}},[n("v-uni-view",{staticClass:"u-tabs-scroll-box",class:{"u-tabs-scorll-flex":!t.isScroll}},[t._l(t.getTabs,(function(e,i){return n("v-uni-view",{key:i,staticClass:"u-tabs-item",class:[t.preId+i],style:[t.tabItemStyle(i)],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.emit(i)}}},[n("u-badge",{attrs:{count:e[t.count]||e["count"]||0,offset:t.offset,size:"mini"}}),t._v(t._s(e[t.name]||e["name"]))],1)})),t.showBar?n("v-uni-view",{staticClass:"u-scroll-bar",style:[t.tabBarStyle]}):t._e()],2)],1)],1)},o=[]},"89e6":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.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/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-90503cac] .u-form-item--right__content__slot > uni-view,[data-v-90503cac] .u-form-item--right__content__slot > div,[data-v-90503cac] .u-form-item--right__content__slot > span,[data-v-90503cac] .u-form-item--right__content__slot > uni-text{width:100%}uni-view[data-v-90503cac],\nuni-scroll-view[data-v-90503cac]{box-sizing:border-box}.u-tabs[data-v-90503cac]{width:100%;transition-property:background-color,color}[data-v-90503cac]::-webkit-scrollbar,[data-v-90503cac]::-webkit-scrollbar,[data-v-90503cac]::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}uni-scroll-view[data-v-90503cac] ::-webkit-scrollbar{display:none;width:0!important;height:0!important;-webkit-appearance:none;background:transparent}.u-scroll-view[data-v-90503cac]{width:100%;white-space:nowrap;position:relative}.u-tabs-scroll-box[data-v-90503cac]{position:relative}.u-tabs-scorll-flex[data-v-90503cac]{display:flex;flex-direction:row;justify-content:space-between}.u-tabs-scorll-flex .u-tabs-item[data-v-90503cac]{flex:1}.u-tabs-item[data-v-90503cac]{position:relative;display:inline-block;text-align:center;transition-property:background-color,color,font-weight}.content[data-v-90503cac]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.boxStyle[data-v-90503cac]{pointer-events:none;position:absolute;transition-property:all}.boxStyle2[data-v-90503cac]{pointer-events:none;position:absolute;bottom:0;transition-property:all;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.itemBackgroundBox[data-v-90503cac]{pointer-events:none;position:absolute;top:0;transition-property:left,background-color;display:flex;flex-direction:row;flex-direction:row;justify-content:center;align-items:center}.itemBackground[data-v-90503cac]{height:100%;width:100%;transition-property:all}.u-scroll-bar[data-v-90503cac]{position:absolute;bottom:%?4?%}',""]),t.exports=e},"8b32":function(t,e,n){var i=n("89e6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("967d").default;r("c4cea7c4",i,!0,{sourceMap:!1,shadowMode:!1})},9159:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa");var i={name:"u-badge",props:{type:{type:String,default:"error"},size:{type:String,default:"default"},isDot:{type:Boolean,default:!1},count:{type:[Number,String]},overflowCount:{type:Number,default:99},showZero:{type:Boolean,default:!1},offset:{type:Array,default:function(){return[20,20]}},absolute:{type:Boolean,default:!0},fontSize:{type:[String,Number],default:"24"},color:{type:String,default:"#ffffff"},bgColor:{type:String,default:""},isCenter:{type:Boolean,default:!1}},computed:{boxStyle:function(){var t={};return this.isCenter?(t.top=0,t.right=0,t.transform="translateY(-50%) translateX(50%)"):(t.top=this.offset[0]+"rpx",t.right=this.offset[1]+"rpx",t.transform="translateY(0) translateX(0)"),"mini"==this.size&&(t.transform=t.transform+" scale(0.8)"),t},showText:function(){return this.isDot?"":this.count>this.overflowCount?"".concat(this.overflowCount,"+"):this.count},show:function(){return 0!=this.count||0!=this.showZero}}};e.default=i},a1b7:function(t,e,n){var i=n("0ca2");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("967d").default;r("1e2498ec",i,!0,{sourceMap:!1,shadowMode:!1})},dc53:function(t,e,n){"use strict";n.r(e);var i=n("17f5"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a},ed46:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("v-uni-view",{staticClass:"u-badge",class:[t.isDot?"u-badge-dot":"","mini"==t.size?"u-badge-mini":"",t.type?"u-badge--bg--"+t.type:""],style:[{top:t.offset[0]+"rpx",right:t.offset[1]+"rpx",fontSize:t.fontSize+"rpx",position:t.absolute?"absolute":"static",color:t.color,backgroundColor:t.bgColor},t.boxStyle]},[t._v(t._s(t.showText))]):t._e()},r=[]},f9d0:function(t,e,n){"use strict";var i=n("8b32"),r=n.n(i);r.a},ff1c:function(t,e,n){"use strict";n.r(e);var i=n("9159"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a}}]);