(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0c6b8e2a"],{"6b2d":function(e,t,s){"use strict";var a=s("0613"),r=s("bc3a"),i=s.n(r),o=s("d70b"),n=s("afbc"),l=s("5c96"),c=s("6ddb");const m={baseURL:o.a.baseURL+"/adminapi",headers:{"content-type":"application/json"}},d=(Object(c.g)(()=>(a.a.commit("setToken",""),a.a.commit("setUserInfo",{}),a.a.commit("setPermission",{}),n.b.push("/account/login"),Promise.reject())),i.a.create(m));d.interceptors.request.use(e=>{const t=a.a.getters.token;return t&&(e.headers.token=t),e.headers.version=o.a.version,e},e=>Promise.reject(e)),d.interceptors.response.use(e=>e.data,e=>(Object(l.Message)({type:"error",message:"系统错误，请稍候再试"}),Promise.reject(e))),t.a=d},e25e:function(e,t,s){"use strict";s.r(t);s("f175");var a=s("6b2d");var r={data:()=>({form:{},version:{},disable:!1,status:"更新"}),methods:{loadVersionList(){var e;a.a.get("/version/index",{params:e}).then(e=>{this.form=e.data})},loadRemoteVersionList(){var e;a.a.get("/version/getRemoteVersion",{params:e}).then(e=>{this.version=e.data.data})},update(){this.$confirm('<span>数据无价，</span> <strong style="color: red;">请先备份好数据库和源码（更新过程造成数据丢失概不负责）</strong> <span>，是否确认更新覆盖源代码？</span>',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",dangerouslyUseHTMLString:!0}).then(()=>{var e;this.status="更新中，请勿刷新该页面或关闭本窗口",a.a.post("/version/upper_version",e).then(e=>{this.status="更新",this.disable=!1,this.$message.success(e.msg),this.loadVersionList(),this.loadRemoteVersionList()})}).catch(()=>{this.disable=!1})}},mounted(){this.loadVersionList(),this.loadRemoteVersionList()}},i=s("2877"),o=Object(i.a)(r,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"ls-card m-t-16"},[s("div",{staticClass:"card-title"},[e._v("当前系统版本")]),s("div",{staticClass:"card-content m-t-24"},[s("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[s("el-form-item",{attrs:{label:"PHP版本"}},[s("span",[e._v(e._s(e.form.php_version))])]),s("el-form-item",{attrs:{label:"ThinkPHP版本"}},[s("span",[e._v(e._s(e.form.think_version))])]),s("el-form-item",{attrs:{label:"系统版本"}},[s("span",[e._v(e._s(e.form.system_version))]),e.form.system_version<e.version.version?s("el-button",{staticStyle:{"margin-left":"20px"},attrs:{disabled:e.disable,type:"text"},on:{click:function(t){e.update(),e.disable=!0}}},[e._v(e._s(e.status))]):e._e(),e.form.system_version==e.version.version?s("span",{staticStyle:{color:"green","margin-left":"20px"}},[e._v("当前为最新版本")]):e._e()],1)],1)],1)]),s("div",{staticClass:"ls-card m-t-16"},[s("div",{staticClass:"card-title"},[e._v("远程系统最新版本")]),s("div",{staticClass:"card-content m-t-24"},[s("el-form",{ref:"form",attrs:{model:e.version,"label-width":"100px"}},[s("el-form-item",{attrs:{label:"名称"}},[s("span",[e._v(e._s(e.version.title))])]),s("el-form-item",{attrs:{label:"版本"}},[s("span",[e._v(e._s(e.version.version))])]),s("el-form-item",[s("span",{domProps:{innerHTML:e._s(e.version.desc)}})]),s("el-form-item",[s("el-button",{attrs:{disabled:e.disable,type:"primary"},on:{click:function(t){e.update(),e.disable=!0}}},[e._v(e._s(e.status))])],1)],1)],1)])])}),[],!1,null,null,null);t.default=o.exports}}]);