forked from mirror/MCSManager
增加 - 版本显示组件
This commit is contained in:
parent
92ca242067
commit
adb43453e9
@ -80,6 +80,7 @@
|
||||
|
||||
MI.routeListener('index/update', function (data) {
|
||||
MI.routeCopy('SystemUp', data.obj);
|
||||
MI.routeCopy('VersionShow', data.obj);
|
||||
});
|
||||
|
||||
MI.routeListener('center/show', function (data) {
|
||||
|
@ -17,17 +17,22 @@
|
||||
<div class="Panel PanelGreen">
|
||||
<div class="PanelTitle">版本</div>
|
||||
<div class="PanelBody">
|
||||
<p>程序版本:
|
||||
<span class="color-gray">8.2</span>
|
||||
</p>
|
||||
<p>后端发行版:
|
||||
<span class="color-gray">Release_8.2.6</span>
|
||||
</p>
|
||||
<p>前端发行版:
|
||||
<span class="color-gray">Release_8.2.5</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<div id="VersionShow">
|
||||
<p>程序版本:
|
||||
<span class="color-gray">8.2</span>
|
||||
</p>
|
||||
<p>前端发行版:
|
||||
<span class="color-gray">
|
||||
<span class="color-gray" v-text="oneversion"></span>
|
||||
</span>
|
||||
</p>
|
||||
<p>后端发行版:
|
||||
<span class="color-gray">
|
||||
<span class="color-gray" v-text="twoversion"></span>
|
||||
</span>
|
||||
</p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Panel PanelGreen">
|
||||
@ -60,6 +65,10 @@
|
||||
</div>
|
||||
<script>
|
||||
MI.rListener('onload', function () {
|
||||
//版本显示组件
|
||||
VIEW_MODEL.newVue('VersionShow', {
|
||||
el: '#VersionShow'
|
||||
});
|
||||
//请求早已缓存的 最新动态
|
||||
RES.ajax({
|
||||
type: 'GET',
|
||||
@ -73,6 +82,7 @@
|
||||
VIEW_MODEL.newVue('SystemUp', {
|
||||
el: '#SystemUp'
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@ -5,12 +5,19 @@ const response = require('../../helper/Response');
|
||||
const permssion = require('../../helper/Permission');
|
||||
const os = require("os");
|
||||
|
||||
//前端显示版本
|
||||
//每次更新之后,修改此处,表明修改
|
||||
//这样, 用户截图时, 可以知道具体的版本
|
||||
const oversion = "Release_8.2.6.1"; //前端
|
||||
const tversion = "Release_8.2.6.2"; //后端
|
||||
|
||||
//首页
|
||||
WebSocketObserver().listener('index/update', (data) => {
|
||||
if (!permssion.isMaster(data.WsSession)) return;
|
||||
response.wsSend(data.ws, 'index/update', {
|
||||
system: os.type() + " " + os.arch(),
|
||||
root: process.cwd()
|
||||
root: process.cwd(),
|
||||
oneversion: oversion,
|
||||
twoversion: tversion
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user