(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-fb4d9dae"],{"6b2d":function(e,t,s){"use strict";var r=s("0613"),a=s("bc3a"),n=s.n(a),i=s("d70b"),o=s("afbc"),c=s("5c96"),l=s("6ddb");const d={baseURL:i.a.baseURL+"/adminapi",headers:{"content-type":"application/json"}},m=(Object(l.g)(()=>(r.a.commit("setToken",""),r.a.commit("setUserInfo",{}),r.a.commit("setPermission",{}),o.b.push("/account/login"),Promise.reject())),n.a.create(d));m.interceptors.request.use(e=>{const t=r.a.getters.token;return t&&(e.headers.token=t),e.headers.version=i.a.version,e},e=>Promise.reject(e)),m.interceptors.response.use(e=>e.data,e=>(Object(c.Message)({type:"error",message:"系统错误，请稍候再试"}),Promise.reject(e))),t.a=m},"8f93":function(e,t,s){"use strict";s.d(t,"d",(function(){return n})),s.d(t,"f",(function(){return i})),s.d(t,"e",(function(){return o})),s.d(t,"b",(function(){return c})),s.d(t,"a",(function(){return l})),s.d(t,"c",(function(){return d}));var r=s("f175"),a=s("6b2d");const n=e=>r.a.get("/workbench/index",e),i=e=>r.a.get("/workbench/topGoods50",{params:e}),o=e=>r.a.get("/workbench/topArticleTop50",{params:e}),c=e=>a.a.get("/version/index",{params:e}),l=e=>a.a.get("/version/getRemoteVersion",{params:e}),d=e=>a.a.post("/version/upper_version",e)},e25e:function(e,t,s){"use strict";s.r(t);var r=s("8f93"),a={data:()=>({form:{},version:{},disable:!1,status:"更新"}),methods:{loadVersionList(){Object(r.b)().then(e=>{this.form=e.data})},loadRemoteVersionList(){Object(r.a)().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(()=>{this.status="更新中，请勿刷新该页面或关闭本窗口",Object(r.c)().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()}},n=s("2877"),i=Object(n.a)(a,(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=i.exports}}]);