From ea876dba282f525c5146d54481e33dcbb9dffb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Dec 2025 14:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=9E=B6=E5=AE=A1=E6=A0=B8=E7=89=88?= =?UTF-8?q?=E6=9C=AC=20=E5=92=8C=E7=94=A8=E6=88=B7=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=AF=94=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Theme.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/api/controller/Theme.php b/application/api/controller/Theme.php index 0efb2120..1ab0a02c 100644 --- a/application/api/controller/Theme.php +++ b/application/api/controller/Theme.php @@ -52,8 +52,12 @@ class Theme extends controller $api_version = 0; if ($system == 'iOS') { $api_versions = db::name('version')->where(['type' => 2, 'status' => 1])->order('id', 'desc')->find(); - $result = version_compare($api_versions['apiversion'],$app_version); - if ($result < 0) { + //app的版本和用户使用的当前版本比对 + //$api_versions['newversion'] 是数据库当前的版本 也是用户使用的版本 + //$app_version 有可能是appstore里面的审核版本 + //审核版本给前端返回1 + $result = version_compare($api_versions['newversion'],$app_version); + if ($result < 0) {//-1:前面版本小于后面版本,0:相等,1:前面版本大于后面版本 $api_version = 1; } }