diff --git a/application/api/controller/Theme.php b/application/api/controller/Theme.php index de023fd..8cc8aba 100644 --- a/application/api/controller/Theme.php +++ b/application/api/controller/Theme.php @@ -46,6 +46,18 @@ class Theme extends controller $reslut['mine_nor'] = get_system_config_value('web_site').'/static/theme/'.$url.'/mine_nor.png'; } - return V(1,'操作成功', $reslut); + //版本号 + $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(1,'操作成功', $reslut,$api_version); } }