Showing
1 changed file
with
20 additions
and
0 deletions
| @@ -170,6 +170,26 @@ class Api{ | @@ -170,6 +170,26 @@ class Api{ | ||
| 170 | } | 170 | } |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | + //获取最新版本 | ||
| 174 | + public function getAndroidVersion() { | ||
| 175 | + $hash_str = db('android')->where(array('make'=>3,'flag'=>5))->order('id desc')->limit(1)->select(); | ||
| 176 | + //echo db::table('patch')->getLastSql();die; | ||
| 177 | + if($hash_str){ | ||
| 178 | + $str = "http://xt03.colorcun.com".$hash_str[0]['file_url']; | ||
| 179 | + $result['ret'] = 200; | ||
| 180 | + $result['data']['name'] = $hash_str[0]['name']; | ||
| 181 | + $result['data']['hash_str'] = $hash_str[0]['hash_str']; | ||
| 182 | + $result['data']['file_url'] = $str; | ||
| 183 | + $result['msg'] = 'success'; | ||
| 184 | + return json_encode($result); | ||
| 185 | + }else{ | ||
| 186 | + $result['ret'] = 0; | ||
| 187 | + $result['data'] = ''; | ||
| 188 | + $result['msg'] = 'fail'; | ||
| 189 | + return json_encode($result); | ||
| 190 | + } | ||
| 191 | + } | ||
| 192 | + | ||
| 173 | //获取灰度更新时间 | 193 | //获取灰度更新时间 |
| 174 | public function getdotime() { | 194 | public function getdotime() { |
| 175 | $result = array(); | 195 | $result = array(); |
-
Please register or login to post a comment