1 line
4.3 KiB
JavaScript
1 line
4.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-23ecdb4a"],{"5ee3":function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return o}));var a=n("b775");function s(){return Object(a["a"])({url:"/open/getNewestAppInfo",method:"get"})}function o(){return Object(a["a"])({url:"/app/getNewestAppInfo",method:"get"})}},"858a":function(t,e,n){"use strict";n("9f81")},9639:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"my"},[n("van-nav-bar",{attrs:{fixed:"",title:"我的"}}),n("van-row",{attrs:{justify:"center",type:"flex"}},[n("van-col",{staticClass:"user-header"},[n("van-image",{attrs:{src:t.avatar,fit:"scale-down",height:"8rem",width:"8rem"}})],1)],1),n("van-row",{staticClass:"user-name",attrs:{justify:"center",type:"flex"}},[n("van-col",[t._v(t._s(t.userInfo.nickName))])],1),n("van-cell-group",[n("van-cell",{attrs:{value:t.userInfo.nickName,title:"用户昵称"}}),n("van-cell",{attrs:{value:t.userInfo.phonenumber,title:"手机号码"}}),n("van-cell",{attrs:{value:t.userInfo.email,title:"邮箱"}}),n("van-cell",{attrs:{value:"0"===t.userInfo.sex?"男":"女",title:"性别"}}),n("van-cell",{attrs:{value:t.userInfo.remark,title:"个性签名"}})],1),n("van-cell-group",[n("van-cell",{attrs:{title:"检查版本更新","is-link":""},on:{click:t.inspectVersion}})],1),n("van-row",{staticClass:"log-out"},[n("van-button",{attrs:{type:"info"},on:{click:t.logOut}},[t._v("退 出")])],1),n("div",{staticClass:"version-info"},[n("van-row",[t._v(" 当前版本"+t._s(t.version)+" ")]),n("van-row",[t._v(" Pei你看雪 ")])],1),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)},s=[],o=n("5ee3"),i={name:"index",data:function(){return{userInfo:this.$store.getters.userInfo,version:"v1.1.9",percentageNum:0,showProgress:!1}},computed:{avatar:function(){return-1!==this.userInfo.avatar.indexOf("http")?this.userInfo.avatar:"http://120.53.247.15/prod-api"+this.userInfo.avatar}},mounted:function(){window.plus?this.plusReady():document.addEventListener("plusready",this.plusReady,!1)},methods:{plusReady:function(){var t=this;plus.runtime.getProperty(plus.runtime.appid,(function(e){t.version=e.version}))},inspectVersion:function(){var t=this;this.$toast("正在检查更新···"),Object(o["a"])().then((function(e){t.version===e.data.version?t.$dialog.confirm({title:"更新提示",message:"没有可用的更新版本"}).then((function(){})).catch((function(){})):t.$dialog.confirm({title:"更新提示",message:"存在新版本,确认更新?"}).then((function(){var n=plus.downloader.createDownload(e.data.downloadUrl,{},(function(e,n){200===n?(console.log("下载更新成功:"+e.filename),t.installWgt(e.filename)):(console.log("下载更新失败!"),plus.nativeUI.toast("下载更新失败!")),plus.nativeUI.closeWaiting()}));n.start();var a=0;t.showProgress=!0,n.addEventListener("statechanged",(function(e,n){switch(e.state){case 1:plus.push.createMessage("正在下载···");break;case 2:plus.push.createMessage("已连接到服务器···");break;case 3:a=parseInt(parseFloat(e.downloadedSize)/parseFloat(e.totalSize)*100),t.percentageNum=a;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("安装更新失败!")}))},logOut:function(){var t=this;this.$dialog.confirm({title:"退出登录",message:"确认退出登录?"}).then((function(){t.$toast("退出成功"),t.$store.dispatch("LogOut").then((function(){t.$router.push({path:"/"})}))})).catch((function(){}))}}},r=i,l=(n("858a"),n("2877")),u=Object(l["a"])(r,a,s,!1,null,"48199a18",null);e["default"]=u.exports},"9f81":function(t,e,n){}}]); |