app更新接口提交
This commit is contained in:
@@ -9,7 +9,7 @@ Route::group('v1/auth', function () {
|
||||
Route::post('login', 'app\common\controller\PasswordLoginController@index'); // 账号密码登录
|
||||
Route::post('mobile-login', 'app\common\controller\Auth@mobileLogin'); // 手机号验证码登录
|
||||
Route::post('code', 'app\common\controller\Auth@SendCodeController'); // 发送验证码
|
||||
|
||||
|
||||
// 需要JWT认证的接口
|
||||
Route::get('info', 'app\common\controller\Auth@info')->middleware(['jwt']); // 获取用户信息
|
||||
Route::post('refresh', 'app\common\controller\Auth@refresh')->middleware(['jwt']); // 刷新令牌
|
||||
@@ -19,4 +19,7 @@ Route::group('v1/auth', function () {
|
||||
Route::group('v1/', function () {
|
||||
Route::post('attachment/upload', 'app\common\controller\Attachment@upload'); // 上传附件
|
||||
Route::get('attachment/:id', 'app\common\controller\Attachment@info'); // 获取附件信息
|
||||
})->middleware(['jwt']);
|
||||
})->middleware(['jwt']);
|
||||
|
||||
|
||||
Route::get('app/update', 'app\common\controller\Api@uploadApp');
|
||||
@@ -125,4 +125,20 @@ class Api extends Controller
|
||||
$response->send();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
public function uploadApp()
|
||||
{
|
||||
$type = $this->request->param('type', '');
|
||||
if (empty($type)){
|
||||
return json_encode(['code' => 500,'msg' => '参数缺失']);
|
||||
}
|
||||
$data = [
|
||||
"version" => "1.1.0",
|
||||
"downloadUrl"=> "http://kr-phone.quwanzhi.com/ckb.apk",
|
||||
"updateContent"=> "1. 修复了已知问题\n2. 优化了用户体验\n3. 新增了某某功能"
|
||||
];
|
||||
return json_encode(['code' => 200,'msg' => '获取成功','data' => $data]);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user