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.744464c5.js

1 lines
7.4 KiB

(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["a"])(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){var a=t.version_id,s=this;s.$confirm({title:"您确定要升级到这个版本吗? ",content:"请务必做好后端文件与数据库的备份工作,否则造成数据损失将无法逆转",okText:"我已备份,确认升级",onOk:function(){return s.onSubmitUpdate(a)}})},onSubmitUpdate:function(t){var a=this;return a.isLoading=!0,c(t).then((function(t){a.$message.success(t.message),a.getUpgradeInfo()})).finally((function(){return a.isLoading=!1}))}}},v=p,f=(s("1737"),s("2877")),h=Object(f["a"])(v,e,i,!1,null,"1e37461c",null);a["default"]=h.exports},a1b9:function(t,a,s){"use strict";s("2217")},da27:function(t,a,s){"use strict";s.r(a);s("b0c0");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}},[t.authorize?a("div",{staticClass:"message"},[a("a-alert",{attrs:{type:t.authorize.authStatus?"success":"error",message:t.authorize.message,banner:""}})],1):t._e(),t.authorize?a("div",{staticClass:"authorize"},[a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("用户名称:")]),a("span",{staticClass:"value"},[t._v(t._s(t.authorize.name))])]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("联系方式:")]),a("span",{staticClass:"value"},[t._v(t._s(t.authorize.contact))])]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("授权时间:")]),a("span",{staticClass:"value"},[t._v(t._s(t.authorize.authorizeTime))])]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("到期时间:")]),a("span",{staticClass:"value"},[t._v(t._s(t.authorize.expirationTime))])]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("授权文件:")]),a("span",{staticClass:"value"},[a("a-tag",{attrs:{color:t.authorize.licenseStatus?"":"red"}},[t._v(t._s(t.authorize.licenseStatus?"正常":"异常"))])],1)]),a("a-divider",{attrs:{orientation:"left"}},[t._v("账户信息")]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("UserKey:")]),a("span",{staticClass:"value"},[a("a-tag",[t._v(t._s(t.authorize.userKey))])],1)]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("注册时间:")]),a("span",{staticClass:"value"},[t._v(t._s(t.authorize.registerTime))])]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("账户状态:")]),a("span",{staticClass:"value"},[a("a-tag",{attrs:{color:t.authorize.accountStatus?"":"red"}},[t._v(t._s(t.authorize.accountStatus?"正常":"禁用"))])],1)]),a("p",{staticClass:"info-item"},[a("span",{staticClass:"label"},[t._v("授权域名:")]),a("span",{staticClass:"value"},[t.authorize.accountDomains&&t.authorize.accountDomains.length?a("div",t._l(t.authorize.accountDomains,(function(s,e){return a("a-tag",{key:e},[t._v(t._s(s))])})),1):a("div",[t._v("无")])])])],1):t._e()])],1)},i=[],n=(s("d3b7"),s("f6ae")),o=s("b775");function r(){return Object(o["b"])({url:n["a"].cloud.authorize.info,method:"get"})}var c=s("2af9"),u={components:{ContentHeader:c["a"]},data:function(){return{isLoading:!1,authorize:void 0}},created:function(){var t=this;this.$nextTick((function(){t.getAuthorizeInfo()}))},methods:{getAuthorizeInfo:function(){var t=this;this.isLoading=!0,r().then((function(a){return t.authorize=a.data.authorize})).finally((function(){return t.isLoading=!1}))}}},l=u,d=(s("a1b9"),s("2877")),p=Object(d["a"])(l,e,i,!1,null,"36b20d24",null);a["default"]=p.exports}}]);