mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
检查接口版本
This commit is contained in:
parent
cc1d535311
commit
ba95f33592
@ -102,7 +102,15 @@ export default {
|
|||||||
axios.get($A.apiUrl('../version')).then(({status, data}) => {
|
axios.get($A.apiUrl('../version')).then(({status, data}) => {
|
||||||
if (status === 200) {
|
if (status === 200) {
|
||||||
this.apiVersion = data.version || ''
|
this.apiVersion = data.version || ''
|
||||||
if (this.$Electron) {
|
if (this.$isEEUiApp) {
|
||||||
|
// App 检查接口版本
|
||||||
|
if (this.compareVersion(this.apiVersion, '0.14.94') === -1) {
|
||||||
|
$A.eeuiAppAlert({
|
||||||
|
title: '温馨提示',
|
||||||
|
message: '服务器接口版本过低,有可能无法正常使用系统功能。',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (this.$Electron) {
|
||||||
// 客户端提示更新
|
// 客户端提示更新
|
||||||
this.$Electron.sendMessage('updateCheckAndDownload', {
|
this.$Electron.sendMessage('updateCheckAndDownload', {
|
||||||
apiVersion: this.apiVersion
|
apiVersion: this.apiVersion
|
||||||
|
|||||||
6
resources/assets/js/functions/eeui.js
vendored
6
resources/assets/js/functions/eeui.js
vendored
@ -10,6 +10,12 @@
|
|||||||
* =============================================================================
|
* =============================================================================
|
||||||
*/
|
*/
|
||||||
$.extend({
|
$.extend({
|
||||||
|
eeuiAppAlert(object, callback) {
|
||||||
|
if (!$A.isEEUiApp) return;
|
||||||
|
if (typeof callback !== "function") callback = _ => {};
|
||||||
|
requireModuleJs("eeui").alert(object, callback);
|
||||||
|
},
|
||||||
|
|
||||||
eeuiAppOpenPage(object, callback) {
|
eeuiAppOpenPage(object, callback) {
|
||||||
if (!$A.isEEUiApp) return;
|
if (!$A.isEEUiApp) return;
|
||||||
if (typeof callback !== "function") callback = _ => {};
|
if (typeof callback !== "function") callback = _ => {};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user