chunk-b30e.4285d2cd.js 14 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b30e"],{fXoU:function(e,t,s){},k0kQ:function(e,t,s){"use strict";s.r(t);var i={name:"upgrad",data:function(){return{file:"",update:"",dialogVisible:!0,search:{current_domain:"",domain_status_txt:"",local_backend_version:"",local_frontend_version:"",local_plugins_count:"",no_auth_plugins:"",origin_backend_version:"",origin_domain:"",origin_frontend_version:"",origin_plugins_count:"",service_time:"",upgrade_status:"",hasUpgradeFile:0},twoSearch:{},log:[],agreeCheckList:[],files:[],not_files:[],agreeLoading:!1,logLoading:!1,init_loading:!1,filecount:"",frontendUpgrad:"",is_update:"",is_update_type:1,error_msg:"",is_show_progress:0,is_show_progress_type:0,total_file:0,updated_file:0,current_page:1,total:1,per_page:1}},watch:{logLoading:function(e,t){e&&(document.getElementsByClassName("update-log")[0].scrollTop=0)}},methods:{cancel:function(){window.history.go(-1)},search1:function(e){this.getDataLog(e)},agreeCheck:function(e){var t=this;this.init_loading=!0,this.agreeLoading=!0,$http.post("/admin/system/update/system-info").then(function(s){var i=s.data,a=s.msg;s.result?(void 0==i.hasUpgradeFile&&(i.hasUpgradeFile=0),t.search=i,t.getDataLog(1),t.dialogVisible=!1,t.agreeLoading=!1,t.init_loading=!1):e&&(t.$message.success(a),t.agreeLoading=!1,t.init_loading=!1)}).catch(function(e){console.log(e)})},getDataLog:function(e){var t=this;this.logLoading=!1,$http.post("/admin/system/update/log",{page:e}).then(function(e){var s=e.data,i=e.msg;e.result?(t.log=s.data,t.total=s.total,t.per_page=s.per_page,t.current_page=s.current_page,t.logFormat(),t.logLoading=!0):(t.$message.success(i),t.logLoading=!0)}).catch(function(e){console.log(e)})},logFormat:function(){if(this.log&&this.log.length>=0)for(var e=0;e<this.log.length;e++)this.log[e].created_at=this.log[e].created_at.split(" ")[0],this.log[e].content=this.log[e].content.split("\n")},checkUpdateFile:function(){var e=this;this.is_update=3,this.init_loading=!0,$http.get("/admin/system/update/verifyCheck",{}).then(function(t){1==t.result?(t.filecount>0?(e.files=t.files,e.filecount=t.filecount,e.frontendUpgrad=t.frontendUpgrad,e.is_update=1,e.is_update_type=1):t.filecount<=0&&(0==t.frontendUpgrad?e.is_update=99:(e.filecount=t.filecount,e.frontendUpgrad=t.frontendUpgrad,e.is_update=1,e.is_update_type=2)),e.init_loading=!1):-1==t.result?(e.$message.error("暂未授权!"),e.is_update=-1,e.init_loading=!1):-2==t.result?(e.$message.error("网络请求超时!"),e.is_update=-2,e.init_loading=!1):99==t.result?(e.$message.success("当前版本为最新版!"),e.is_update=99,e.init_loading=!1):98==t.result?(e.$message.error(t.msg),e.error_msg=t.msg,e.is_update=98,e.init_loading=!1):0===t.result&&e.$router.push({path:"/login"})}).catch(function(){e.init_loading=!1})},upgrade:function(){var e=this;e.is_show_progress=1;for(var t=0;t<e.files.length;t++)1===e.files[t].is_choose&&e.not_files.push(e.files[t].path);console.log(e.not_files,"that.not_files"),$http.post("/admin/system/update/fileDownload",{protocol:{file:1,update:1},nofiles:e.not_files}).then(function(t){console.log(t),1==t.result?(e.is_show_progress_type=1,e.updated_file=t.success,e.total_file=t.total,e.upgrade()):2==t.result?e.frontendUpgrad>0?e.upgradeFront():(e.is_show_progress_type=3,e.is_show_progress=0,location.reload()):3==t.result&&e.upgrade()}).catch(function(){}),console.log(e.not_files)},upgradeFront:function(){var e=this;e.is_show_progress=1,e.is_show_progress_type=2,$http.post("/admin/system/update/startDownload",{}).then(function(t){console.log(t),1==t.status?(e.is_show_progress_type=3,e.is_show_progress=0,location.reload()):(e.is_show_progress_type=4,e.is_show_progress=0)}).catch(function(){})}}},a=(s("sbOL"),s("KHd+")),o=Object(a.a)(i,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.init_loading,expression:"init_loading"}],attrs:{id:"upgrad"}},[s("el-row",{staticClass:"box",attrs:{gutter:10}},[s("el-col",{attrs:{span:12}},[s("div",{staticClass:"grid-content bg-purple"},[s("div",{staticClass:"top-title"},[s("span",{staticClass:"line"}),e._v(" "),s("span",[e._v("系统更新")])]),e._v(" "),s("div",{staticClass:"version-card"},[s("div",[e._v("本地后端版本: "+e._s(""!==e.search.local_backend_version?e.search.local_backend_version:"未知"))]),e._v(" "),s("div",[e._v("本地前端 (H5) 版本: "+e._s(""!==e.search.local_frontend_version?e.search.local_frontend_version:"未知"))]),e._v(" "),s("div",{staticClass:"new-version"},[e._v("云端后台最新版本: "+e._s(""!==e.search.origin_backend_version?e.search.origin_backend_version:"未知"))]),e._v(" "),s("div",{staticClass:"new-version"},[e._v("云端前端最新版本: "+e._s(""!==e.search.origin_frontend_version?e.search.origin_frontend_version:"未知"))]),e._v(" "),""==e.is_update?s("el-button",{class:1==e.search.upgrade_status?"":"active-disabled",attrs:{type:"primary",size:"medium",loading:e.init_loading,disabled:1!=e.search.upgrade_status},on:{click:e.checkUpdateFile}},[e._v("检查最新文件")]):e._e(),e._v(" "),1==e.is_update?s("div",[1===e.is_update_type?s("el-button",{class:2==e.agreeCheckList.length?"":"active-disabled",attrs:{type:"success",icon:"el-icon-download",disabled:2!=e.agreeCheckList.length,loading:1===e.is_show_progress},on:{click:function(t){e.upgrade()}}},[e._v("立即更新")]):e._e(),e._v(" "),2===e.is_update_type?s("el-button",{class:2==e.agreeCheckList.length?"":"active-disabled",attrs:{type:"success",icon:"el-icon-download",disabled:2!=e.agreeCheckList.length,loading:1===e.is_show_progress},on:{click:function(t){e.upgradeFront()}}},[e._v("立即更新")]):e._e()],1):e._e()],1),e._v(" "),1==e.is_update?s("div",[-1==e.is_update?s("div",{staticStyle:{"fonr-weight":"800","line-height":"50px"}},[e._v("\n 暂未授权!\n ")]):e._e(),e._v(" "),3==e.is_update?s("div",{staticStyle:{color:"green","fonr-weight":"800","line-height":"50px"}},[e._v("\n 检查更新中...\n ")]):e._e(),e._v(" "),-2===e.is_update?s("div",{staticStyle:{color:"red","fonr-weight":"800","line-height":"50px"}},[e._v("\n 网络请求超时!\n ")]):e._e(),e._v(" "),98==e.is_update?s("div",{staticStyle:{color:"red","fonr-weight":"800","line-height":"50px"}},[e._v("\n "+e._s(e.error_msg)+"\n ")]):e._e(),e._v(" "),1!=e.is_update||1!=e.is_update_type&&2!=e.is_update_type?e._e():s("div",{staticClass:"update-tip"},[s("el-checkbox-group",{model:{value:e.agreeCheckList,callback:function(t){e.agreeCheckList=t},expression:"agreeCheckList"}},[s("el-checkbox",{attrs:{label:"file"}},[e._v("我已知晓,点击立即更新将会请求云端文件覆盖本地文件,并执行数据库迁移文件以更新数据库表、字段等信息;")]),e._v(" "),s("el-checkbox",{attrs:{label:"update"}},[e._v("我已知晓,在线更新不能保证100%成功,可能会因更新失败导致程序运行异常,异常技术处理需要时间;如果我的剩余售后服务时长为0,官方将不会处理我的任何问题,包括更新导致的程序异常等.")])],1)],1),e._v(" "),s("div",{staticClass:"update-file"},[s("div",{staticStyle:{display:"flex","align-items":"center"}},[1==e.is_update&&1==e.is_update_type?s("div",{staticClass:"title-tip"},[e._v("更新之前请注意数据备份")]):e._e(),e._v(" "),1===e.is_show_progress?s("div",{staticStyle:{display:"inline-block","padding-left":"10px",color:"#999","margin-top":"20px"}},[1===e.is_show_progress_type?s("div",[e._v("\n 后台文件已更新\n "),s("span",{staticStyle:{color:"red","font-weight":"900"}},[e._v("\n "+e._s(e.updated_file)+"\n ")]),e._v("\n 个文件 / 共\n "),s("span",{staticStyle:{color:"red","font-weight":"900"}},[e._v("\n "+e._s(e.total_file)+" ")]),e._v("个文件!\n ")]):e._e(),e._v(" "),2===e.is_show_progress_type?s("div",[e._v("\n 前端文件正在下载更新\n ")]):e._e(),e._v(" "),3===e.is_show_progress_type?s("div",[e._v("\n 更新完成\n ")]):e._e(),e._v(" "),4===e.is_show_progress_type?s("div",[e._v("\n 网络请求超时\n ")]):e._e()]):e._e()]),e._v(" "),1==e.is_update&&1==e.is_update_type?s("div",[e._v("更新文件(选中则不更新)")]):e._e(),e._v(" "),s("div",{staticClass:"check-box"},e._l(e.files,function(t,i){return 1==e.is_update&&1==e.is_update_type?s("el-checkbox",{key:i,attrs:{"true-label":1,"false-label":0,label:t.path},model:{value:t.is_choose,callback:function(s){e.$set(t,"is_choose",e._n(s))},expression:"item.is_choose"}}):e._e()}))])]):e._e()])]),e._v(" "),s("el-col",{attrs:{span:12}},[s("div",{staticClass:"grid-content"},[s("div",{staticClass:"right-system"},[s("div",{staticClass:"top-title"},[s("span",{staticClass:"line"}),e._v(" "),s("span",[e._v("系统信息")])]),e._v(" "),s("div",{staticClass:"systen-new"},[s("br"),e._v(" "),s("div",[e._v("当前域名: "+e._s(""!==e.search.current_domain?e.search.current_domain:"未知")+" "),e.search.current_domain?s("span",{staticClass:"active-color origin-state"},[e._v(e._s(e.search.domain_status_txt))]):e._e()]),e._v(" "),s("div",[e._v("客户端授权域名: "+e._s(""!==e.search.origin_domain?e.search.origin_domain:"未知"))]),e._v(" "),s("br"),e._v(" "),s("div",[e._v("已安装插件数量: "+e._s(""!==e.search.local_plugins_count?e.search.local_plugins_count+"个":"未知"))]),e._v(" "),s("div",[e._v("已授权插件数量: "+e._s(""!==e.search.origin_plugins_count?e.search.origin_plugins_count+"个":"未知"))]),e._v(" "),e.search.no_auth_plugins>0?s("div",{staticClass:"active-color"},[e._v("未授权安装插件数量: "+e._s(""!==e.search.no_auth_plugins?e.search.no_auth_plugins+"个":"未知"))]):s("div",{staticClass:"active-color"},[e._v(" ")]),e._v(" "),0===e.search.upgrade_status?s("br"):e._e(),e._v(" "),0===e.search.upgrade_status?s("div",{staticClass:"active-color"},[e._v("涉嫌使用盗版插件,为了保证您的权益,请及时联系客服处理!")]):e._e(),e._v(" "),0===e.search.upgrade_status?s("div",{staticClass:"active-color"},[e._v("我国《中华人民共和国刑法》第二百一十七条规定: 以营利为目的,有下列侵犯著作权情形之一,违法所得数额较大或者有其他严重情节的,处三年以下有期徒刑或者拘役,并处或者单处罚金;违法所得数额巨大或者有其他特别严重情节的,处三年以上七年以下有期徒刑,并处罚金:\n (一)未经著作权人许可,复制发行其文字作品、音乐、电影、电视、录像作品、计算软件及其他作品的; (二)出版他人享有专有出版权的图书的;(三)\n 未经录音录像制作者许可,复制发行其制作的录音录像的; (四)制作、出售假冒他人著名的美术作品的.")]):e._e(),e._v(" "),0===e.search.upgrade_status?s("br"):e._e(),e._v(" "),s("div",{staticClass:"service-time"},[e._v("剩余售后服务时长: "),s("span",{staticClass:"active-color"},[e._v(e._s(""!==e.search.service_time?e.search.service_time+"天":"未知"))])]),e._v(" "),s("div",{staticClass:"active-weith-color",staticStyle:{height:"80px"}},[0===e.search.service_time?s("div",[e._v("\n 温馨提示: 当前售后服务时长为0,我们不会限制您更新系统,系统更新为所有客户统一推送,不管您是否付费,都不存在差别对待;但是因您售后服务\n 时长为0,我们将不会处理您的任何问题,包括因为更新出错导致系统异常等,如果您不具备技术维护能力,建议您续费后再进行系统更新!详情请联系客服!!!\n ")]):e._e()])])]),e._v(" "),s("div",{staticClass:"right-system"},[s("br"),e._v(" "),s("div",{staticClass:"top-title"},[s("span",{staticClass:"line"}),e._v(" "),s("span",[e._v("更新日志")])]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:0==e.log.length,expression:"log.length == 0"}],staticClass:"no-update-log"},[e._v("未知")]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.log.length>0,expression:"log.length > 0"}],staticClass:"update-log",style:{height:0===e.search.upgrade_status?"483px":"633px"}},[e._l(e.log,function(t,i){return s("div",{key:i,staticClass:"version-box"},[s("div",{staticClass:"version-radius"}),e._v(" "),s("div",{staticClass:"version-margin-left"},[s("div",{staticClass:"version-num"},[e._v(e._s(t.title))]),e._v(" "),s("div",{staticClass:"version-margin-bottom"},[s("span",{staticClass:"version-time"},[e._v(e._s(t.created_at))])]),e._v(" "),s("div",{staticStyle:{"padding-bottom":"30px"}},e._l(t.content,function(t,i){return s("div",{key:i,domProps:{innerHTML:e._s(t)}})}))])])}),e._v(" "),s("div",{staticClass:"vue-page"},[s("el-row",[s("el-col",{attrs:{align:"center"}},[s("el-pagination",{attrs:{layout:"prev, pager, next,jumper",total:e.total,"page-size":e.per_page,"current-page":e.current_page,background:""},on:{"current-change":e.search1}})],1)],1)],1)],2)])])])],1),e._v(" "),s("el-dialog",{attrs:{title:"温馨提示",center:"",visible:e.dialogVisible,"show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"25%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[s("div",[e._v("进入系统更新页面,您的程序将会请求我们的云端系统,检验您当前程序的版本和信息,用于检测是否存在新的更新文件.")]),e._v(" "),s("div",{staticClass:"text-tip"},[e._v("该请求不会修改您本地的任何文件和数据!")]),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"info"},on:{click:e.cancel}},[e._v("取消")]),e._v(" "),s("el-button",{attrs:{type:"primary",loading:e.agreeLoading},on:{click:function(t){e.agreeCheck(1)}}},[e._v("我已知晓并同意!")])],1)])],1)},[],!1,null,null,null);o.options.__file="index.vue";t.default=o.exports},sbOL:function(e,t,s){"use strict";var i=s("fXoU");s.n(i).a}}]);