From 933f7101e40a8b011ee46dbfcd8baf21344a9c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Thu, 24 Feb 2022 17:10:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=9B=B4=E4=BD=8E=E7=89=88=E6=9C=AC=E7=9A=84NPM=E5=92=8CNodeJs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/installapi/controller/Index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/installapi/controller/Index.php b/app/installapi/controller/Index.php index 419384d3..f89479d0 100644 --- a/app/installapi/controller/Index.php +++ b/app/installapi/controller/Index.php @@ -22,11 +22,11 @@ class Index extends Api // 需要的PHP版本 static $needPHPVersion = '7.1.0'; // 需要的Npm版本 - static $needNpmVersion = '8.3.0'; + static $needNpmVersion = '7.0.0'; // 需要的Cnpm版本 static $needCnpmVersion = '7.1.0'; // 需要的NodeJs版本 - static $needNodejsVersion = '16.13.0'; + static $needNodejsVersion = '14.13.1'; public function __construct(App $app) @@ -278,15 +278,15 @@ class Index extends Api 'state' => $npmVersionCompare ? self::$ok : self::$warn, 'link' => $npmVersionLink ?? [], ], - 'cnpm_version' => [ - 'describe' => $cnpmVersion ? $cnpmVersion : __('Acquisition failed'), - 'state' => $cnpmVersionCompare ? self::$ok : self::$warn, - 'link' => $cnpmVersionLink ?? [] - ], 'nodejs_version' => [ 'describe' => $nodejsVersion ? $nodejsVersion : __('Acquisition failed'), 'state' => $nodejsVersionCompare ? self::$ok : self::$warn, 'link' => $nodejsVersionLink ?? [] + ], + 'cnpm_version' => [ + 'describe' => $cnpmVersion ? $cnpmVersion : __('Acquisition failed'), + 'state' => $cnpmVersionCompare ? self::$ok : self::$warn, + 'link' => $cnpmVersionLink ?? [] ] ]); }