field('theme_color,file_url,auxiliary_color') // ->where(['delete_time' => 0 ,'is_active' => 1,'begin_time' => ['<',time()],'end_time' => ['>',time()]])->order('id desc')->find(); // // if($reslut){ // $url = $reslut['file_url']; // $reslut['btn_text_color'] = $reslut['auxiliary_color']; // $reslut['app_bg'] = get_system_config_value('web_site').'/static/theme/'.$url.'/app_bg.png'; // $reslut['home_sel'] = get_system_config_value('web_site').'/static/theme/'.$url.'/home_sel.png'; // $reslut['home_nor'] = get_system_config_value('web_site').'/static/theme/'.$url.'/home_nor.png'; // $reslut['find_sel'] = get_system_config_value('web_site').'/static/theme/'.$url.'/find_sel.png'; // $reslut['find_nor'] = get_system_config_value('web_site').'/static/theme/'.$url.'/find_nor.png'; // $reslut['msg_sel'] = get_system_config_value('web_site').'/static/theme/'.$url.'/msg_sel.png'; // $reslut['msg_nor'] = get_system_config_value('web_site').'/static/theme/'.$url.'/msg_nor.png'; // $reslut['mine_sel'] = get_system_config_value('web_site').'/static/theme/'.$url.'/mine_sel.png'; // $reslut['mine_nor'] = get_system_config_value('web_site').'/static/theme/'.$url.'/mine_nor.png'; // } //版本号 $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(); //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; } } $reslut = []; return V(1,'操作成功', $reslut,$api_version); } // 节日主题 public function get_festival_theme() { $theme = DB::name('vs_theme')->field('theme_name,theme_color,file_url,auxiliary_color') ->where(['delete_time' => 0 ,'is_active' => 1,'begin_time' => ['<=',time()],'end_time' => ['>=',time()]])->order('id desc')->find(); $reslut['is_open'] = 0; if($theme){ $reslut['theme_name'] = $theme['theme_name']; $reslut['is_open'] = 1; } return V(1,'操作成功', $reslut); } }