pnkx-admin-mongo/pnkx-app-apk/unpackage/cache/wgt/H5A8E5E14/static/js/chunk-5bd22bfa.63248466.js
2024-01-13 13:29:20 +08:00

1 line
5.7 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([["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你看雪App")),plus.runtime.getProperty(plus.runtime.appid,(function(e){Object(h["a"])().then((function(n){if(n.data.version!==e.version){var i=plus.downloader.createDownload(n.data.downloadUrl,{},(function(e,n){200===n?(console.log("下载更新成功:"+e.filename),t.installWgt(e.filename)):(console.log("下载更新失败!"),plus.nativeUI.toast("下载更新失败!")),plus.nativeUI.closeWaiting()}));i.start();var o=0;t.showProgress=!0,i.addEventListener("statechanged",(function(e,n){switch(e.state){case 1:plus.push.createMessage("正在下载···");break;case 2:plus.push.createMessage("已连接到服务器···");break;case 3:o=parseInt(parseFloat(e.downloadedSize)/parseFloat(e.totalSize)*100),t.percentageNum=o;break;case 4:t.showProgress=!1;break}}))}}))}))},installWgt:function(t){plus.nativeUI.showWaiting("安装更新"),plus.runtime.install(t,{},(function(){plus.nativeUI.closeWaiting(),console.log("安装更新成功!"),plus.nativeUI.alert("更新完成!",(function(){plus.runtime.restart()}))}),(function(t){plus.nativeUI.closeWaiting(),console.log("安装更新失败!["+t.code+"]"+t.message),plus.nativeUI.toast("安装更新失败!")}))},addRecord:function(){"/addRecord"!==this.$route.path&&this.$router.push("/addRecord")}}}),p=m,f=(n("bb8e"),Object(l["a"])(p,i,o,!1,null,"75fd6af9",null));e["default"]=f.exports},"40b4":function(t,e,n){"use strict"},"5ee3":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var i=n("b775");function o(){return Object(i["a"])({url:"/open/getNewestAppInfo",method:"get"})}function a(){return Object(i["a"])({url:"/app/getNewestAppInfo",method:"get"})}},bb15:function(t,e,n){},bb8e:function(t,e,n){"use strict";n("dcad")},dcad:function(t,e,n){}}]);