From fae8a63a9223ff33ea986eaf68f29fffac805c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Thu, 30 Oct 2025 16:49:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=20=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=BD=93=E5=89=8DiOS=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/User.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 43da592..a0626f3 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -8,6 +8,7 @@ use app\common\library\Ems; use app\common\library\Sms; use fast\Random; use think\Config; +use think\Db; use think\Validate; /** @@ -222,7 +223,18 @@ class User extends BaseCom public function get_user_info() { $reslut = model('user')->get_me($this->uid); - return V($reslut['code'], $reslut['msg'], $reslut['data']); + //版本号 + $app_version = request()->header('App-Version'); + $system = request()->header('system'); + $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['oldversion'],$app_version); + if ($result < 0) { + $api_version = 1; + } + } + return V($reslut['code'], $reslut['msg'], $reslut['data'],$api_version); } //关注(回关)