2023-01-29 10:26:52 +08:00

77 lines
2.4 KiB
PHP

<?php
use think\Route;
\think\Route::domain('quickadmin', [
//'/adminlogin' => 'admin/index/login',
'/' => 'admin/index/index'
]);
Route::domain(
'quickapp',
function () {
Route::group('user', function () {
Route::post('register', 'api/User/register');
Route::post('login', 'api/User/login');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
});
Route::group('home', function () {
Route::get('recommend', 'api/Home/recommend');
Route::get('chasing-drama', 'api/Home/chasingDrama');
Route::post('signin', 'api/Home/signin');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
}, ['before_behavior' => app\api\behavior\AuthToken::class]);
Route::group('search', function () {
Route::get('index', 'api/Search/index');
Route::get('search', 'api/Search/search');
Route::get('popular-rank', 'api/Search/popularRank');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
}, ['before_behavior' => app\api\behavior\AuthToken::class]);
Route::group('my', function () {
Route::get('userinfo', 'api/My/userInfo');
Route::put('userinfo', 'api/My/putUserInfo');
Route::post('login-out', 'api/My/loginOut');
Route::get('recharge-record', 'api/My/rechargeRecord');
Route::get('history', 'api/My/history');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
}, ['before_behavior' => app\api\behavior\AuthToken::class]);
Route::group('pay', function () {
Route::get('list', 'api/Pay/list');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
}, ['before_behavior' => app\api\behavior\AuthToken::class]);
Route::group('play', function () {
Route::get('list', 'api/Play/list');
Route::post('video-unlock', 'api/Play/videoUnlock');
Route::get('video-play', 'api/Play/videoPlay');
Route::post('binge-watching' , 'api/Play/bingeWatching');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
}, ['before_behavior' => app\api\behavior\AuthToken::class]);
Route::group('notify', function () {
Route::get('weichat-pay', 'api/CallBack/weichatPay');
Route::get('ali-pay', 'api/CallBack/aliPay');
Route::miss(function () {
return json(['code' => 404, 'msg' => '404 not found']);
});
});
}
);