You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/public/admin/js/cloud.5fffd194.js

1 line
7.4 KiB

9 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["cloud"],{1737:function(t,a,s){"use strict";s("46ee")},2217:function(t,a,s){},"46ee":function(t,a,s){},"9e4af":function(t,a,s){"use strict";s.r(a);var e=function(){var t=this,a=t._self._c;return a("a-card",{attrs:{bordered:!1}},[a("content-header",{attrs:{title:"在线更新"}}),a("a-spin",{attrs:{spinning:t.isLoading}},[a("div",{staticClass:"container"},[a("a-alert",{staticClass:"my-description",attrs:{"show-icon":!1,type:"warning"}},[a("span",{attrs:{slot:"description"},slot:"description"},[a("p",[t._v('1. 使用 "一键更新" 功能可以将当前的后端文件和数据库升级到最新的版本(同时包含打包后的H5,不包含uniapp和微信小程序)。')]),a("p",[t._v(" 2. 在使用在线升级功能之前, "),a("strong",[t._v("请务必")]),t._v("对当前后端项目文件和数据库进行备份,否则一旦造成数据损失将无法挽回。 ")]),a("p",[t._v("3. uniapp端包含微信小程序端、APP端的升级,需要手动下载进行替换,然后在XBuilder中重新发行。")]),a("p",[t._v("4. 每次只能升级一个版本,不能跨版本升级。")]),a("p",[t._v(" 5. 如果您的源码做过二次开发或者修改, "),a("strong",[t._v("请不要")]),t._v('使用"一键更新",因为这将会覆盖您工作过的文件,而且无法找回。 ')])])]),t.currentVersion?a("a-alert",{attrs:{type:t.nextVersion?"info":"success",banner:""}},[a("span",{attrs:{slot:"message"},slot:"message"},[a("span",[t._v("您当前的系统版本号是v"+t._s(t.currentVersion)+",")]),t.nextVersion?a("span",[t._v("下一版本是v"+t._s(t.nextVersion)+",可直接使用一键更新")]):a("span",[t._v("已经是最新版本,无需升级")])])]):t._e(),a("div",{staticClass:"update-list"},t._l(t.updateList,(function(s,e){return a("a-row",{key:e,staticClass:"log-item"},[a("div",{staticClass:"col-left"},[a("div",{staticClass:"update-date"},[a("div",{staticClass:"dcircle"},[a("div",{staticClass:"dcircle2"})]),a("p",{staticClass:"date"},[t._v(t._s(s.release_time))])])]),a("div",{staticClass:"col-right"},[a("div",{staticClass:"log-content"},[a("div",{staticClass:"log-title"},[a("span",{staticClass:"version"},[t._v("版本号:V"+t._s(s.version))]),a("span",{staticClass:"actions"},[t.checkModule(s,"server")&&s.version===t.nextVersion?a("a",{staticClass:"live-update",attrs:{href:"javascript:void(0);",title:"一键更新升级到此版本"},on:{click:function(a){return t.handleUpdate(s)}}},[t._v("一键更新")]):t._e(),t.checkModule(s,"uniapp")?a("a",{staticClass:"live-update",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t.handleDownload(s,"uniapp")}}},[t._v("下载uniapp端升级包")]):t._e()])]),a("div",{staticClass:"update-log"},[t._v(t._s(s.update_log))])])])])})),1)],1)])],1)},i=[],n=(s("d3b7"),s("f6ae")),o=s("b775");function r(){return Object(o["b"])({url:n["a"].cloud.upgrade.info,method:"get"})}function c(t){return Object(o["b"])({url:n["a"].cloud.upgrade.update,method:"post",params:{versionId:t}})}function u(t,a){return Object(o["b"])({url:n["a"].cloud.upgrade.download,method:"get",params:{versionId:t,module:a}})}var l=s("2af9"),d=s("ca00"),p={components:{ContentHeader:l["a"]},data:function(){return{isLoading:!1,updateList:[],currentVersion:"",nextVersion:""}},created:function(){var t=this;this.$nextTick((function(){t.getUpgradeInfo()}))},methods:{getUpgradeInfo:function(){var t=this;this.isLoading=!0,r().then((function(a){t.updateList=a.data.updateList,t.currentVersion=a.data.currentVersion,t.nextVersion=a.data.nextVersion})).finally((function(){return t.isLoading=!1}))},checkModule:function(t,a){var s=t.modules;return Object(d["d"])(a,s)},handleDownload:function(t,a){var s=t.version_id,e=this;e.isLoading=!0,u(s,a).then((function(t){e.download(t.data.url)})).finally((function(){return e.isLoading=!1}))},download:function(t){var a=document.createElement("a");a.style.display="none",a.setAttribute("target","_blank"),a.href=t,document.body.appendChild(a),a.click(),document.body.removeChild(a)},handleUpdate:function(t){v