|
...
|
...
|
@@ -170,6 +170,26 @@ class Api{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取最新版本
|
|
|
|
public function getAndroidVersion() {
|
|
|
|
$hash_str = db('android')->where(array('make'=>3,'flag'=>5))->order('id desc')->limit(1)->select();
|
|
|
|
//echo db::table('patch')->getLastSql();die;
|
|
|
|
if($hash_str){
|
|
|
|
$str = "http://xt03.colorcun.com".$hash_str[0]['file_url'];
|
|
|
|
$result['ret'] = 200;
|
|
|
|
$result['data']['name'] = $hash_str[0]['name'];
|
|
|
|
$result['data']['hash_str'] = $hash_str[0]['hash_str'];
|
|
|
|
$result['data']['file_url'] = $str;
|
|
|
|
$result['msg'] = 'success';
|
|
|
|
return json_encode($result);
|
|
|
|
}else{
|
|
|
|
$result['ret'] = 0;
|
|
|
|
$result['data'] = '';
|
|
|
|
$result['msg'] = 'fail';
|
|
|
|
return json_encode($result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取灰度更新时间
|
|
|
|
public function getdotime() {
|
|
|
|
$result = array();
|
...
|
...
|
|