mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
fix: 修复版本比较bug
This commit is contained in:
@@ -177,6 +177,8 @@ function isNewVersion(version: string, latestVersion: string) {
|
|||||||
for (let i = 0; i < current.length; i++) {
|
for (let i = 0; i < current.length; i++) {
|
||||||
if (parseInt(latest[i]) > parseInt(current[i])) {
|
if (parseInt(latest[i]) > parseInt(current[i])) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if (parseInt(latest[i]) < parseInt(current[i])) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -191,7 +193,7 @@ async function loadLatestVersion() {
|
|||||||
|
|
||||||
const minVersion = settingsStore.productInfo?.app?.minVersion;
|
const minVersion = settingsStore.productInfo?.app?.minVersion;
|
||||||
if (minVersion) {
|
if (minVersion) {
|
||||||
//
|
debugger;
|
||||||
if (isNewVersion(version.value, minVersion)) {
|
if (isNewVersion(version.value, minVersion)) {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: settingsStore.productInfo?.app?.minVersionTip ?? "版本过低,为了您的数据安全,请尽快升级",
|
message: settingsStore.productInfo?.app?.minVersionTip ?? "版本过低,为了您的数据安全,请尽快升级",
|
||||||
|
|||||||
Reference in New Issue
Block a user