From f804be8da5b61fa2acf04d3b40974eea7bd9a3b1 Mon Sep 17 00:00:00 2001 From: vapao Date: Sat, 10 Jul 2021 18:34:39 +0800 Subject: [PATCH] fix issue --- spug_web/src/pages/system/setting/About.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spug_web/src/pages/system/setting/About.js b/spug_web/src/pages/system/setting/About.js index d4d370c..a2707b2 100644 --- a/spug_web/src/pages/system/setting/About.js +++ b/spug_web/src/pages/system/setting/About.js @@ -24,18 +24,17 @@ class About extends React.Component { http.get('/api/setting/about/') .then(res => this.setState({info: res})) .finally(() => this.setState({fetching: false})) - http.get('https://gitee.com/api/v5/repos/openspug/spug/releases/latest') + http.get(`https://api.spug.cc/apis/release/latest/?version=${VERSION}`) .then(res => { - if (res.tag_name && res.tag_name !== VERSION) { - const logs = res.body.replace(/- */g, ''); + if (res.has_new) { notification.open({ key: 'new_version', duration: 0, top: 88, - message: `发现新版本 ${res.tag_name}`, + message: `发现新版本 ${res.version}`, icon: , btn: 如何升级?, - description:
{logs}
+ description:
{res.content}
}) } })