1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bd22bfa"],{"0a19":function(t,e,n){"use strict";n("bb15")},"1e4b":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.menuShow?"index-bottom":"",attrs:{id:"index"}},[n("router-view"),n("van-tabbar",{directives:[{name:"show",rawName:"v-show",value:t.menuShow,expression:"menuShow"}],attrs:{"active-color":"#5A8DEE"},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[n("van-tabbar-item",{attrs:{icon:"home-o",to:"/homepage"}},[t._v("首页")]),n("van-tabbar-item",{attrs:{icon:"qr",to:"/manage"}},[t._v("管理")]),n("van-tabbar-item",{attrs:{icon:"contact",to:"/my"}},[t._v("我")])],1),n("drag-button",{attrs:{text:"记一笔",itemWidth:64,itemHeight:64},on:{onFloatBtnClicked:t.addRecord}}),n("van-dialog",{attrs:{title:"正在下载","confirm-button-text":"后台下载"},model:{value:t.showProgress,callback:function(e){t.showProgress=e},expression:"showProgress"}},[n("van-row",{staticClass:"download",staticStyle:{padding:"1rem","text-align":"center"}},[t._v(" 下载进度"),n("span",{staticClass:"theme-blue",staticStyle:{padding:"0 0.2rem"}},[t._v(t._s(t.percentageNum))]),t._v("% ")])],1)],1)},o=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"float_button"},[n("div",{ref:"floatButton",staticClass:"float_info",style:{width:t.itemWidth+"px",height:t.itemHeight+"px",left:t.left+"px",top:t.top+"px"},on:{click:t.onBtnClicked}},[n("span",{staticClass:"text"},[t._v(t._s(t.text))])])])},s=[],c=(n("a9e3"),{data:function(){return{clientWidth:0,clientHeight:0,timer:null,currentTop:0,left:0,top:0}},props:{text:{type:String,default:"首页"},itemWidth:{type:Number,default:40},itemHeight:{type:Number,default:50},gapWidth:{type:Number,default:50},coefficientHeight:{type:Number,default:.75}},created:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.left=this.clientWidth-this.itemWidth-this.gapWidth,this.top=this.clientHeight*this.coefficientHeight},methods:{onBtnClicked:function(){this.$emit("onFloatBtnClicked")},handleScrollStart:function(){var t=this;this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){t.handleScrollEnd()}),300),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth-this.itemWidth/2:this.left=-this.itemWidth/2},handleScrollEnd:function(){var t=document.documentElement.scrollTop||document.body.scrollTop;t===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.itemWidth-this.gapWidth:this.left=this.gapWidth,clearTimeout(this.timer))}},mounted:function(){var t=this;this.$nextTick((function(){var e=t.$refs.floatButton;e.addEventListener("touchstart",(function(){e.style.transition="none"})),e.addEventListener("touchmove",(function(e){if(1===e.targetTouches.length){var n=e.targetTouches[0];t.left=n.clientX-20,t.top=n.clientY-25}})),e.addEventListener("touchend",(function(){e.style.transition="all 0.3s",t.left>document.documentElement.clientWidth/2?t.left=document.documentElement.clientWidth-64-t.gapWidth:t.left=0}))}))},beforeDestroy:function(){window.removeEventListener("scroll",this.handleScrollStart)},destroyed:function(){}}),r=c,l=(n("0a19"),n("2877")),u=Object(l["a"])(r,a,s,!1,null,"392a75ba",null),d=u.exports,h=n("5ee3"),m=(n("40b4"),{name:"index",components:{DragButton:d},data:function(){return{active:0,menuShow:!0,percentageNum:0,showProgress:!1}},watch:{$route:function(t){switch(this.menuShow=!t.meta.hideTabBar,t.path){case"/homepage":this.active=0,this.menuShow=!0;break;case"/manage":this.active=1,this.menuShow=!0;break;case"/my":this.active=2,this.menuShow=!0;break;default:break}}},mounted:function(){window.plus?this.plusReady():document.addEventListener("plusready",this.plusReady,!1)},methods:{plusReady:function(){var t=this;plus.push.createMessage("欢迎".concat(this.$store.getters.userInfo.nickName,"使用pei你看雪A
|