This commit is contained in:
root 2019-12-23 16:12:35 +08:00
parent 3154084482
commit e7b9213510
19 changed files with 29 additions and 29 deletions

View File

@ -23,7 +23,7 @@ class InviteController extends Controller
]);
}
public function getDetails (Request $request) {
public function details (Request $request) {
return response([
'data' => Order::where('invite_user_id', $request->session()->get('id'))
->where('status', 3)
@ -38,7 +38,7 @@ class InviteController extends Controller
]);
}
public function getInvites (Request $request) {
public function fetch (Request $request) {
$codes = InviteCode::where('user_id', $request->session()->get('id'))
->where('status', 0)
->get();

View File

@ -9,7 +9,7 @@ use App\Utils\Helper;
class NoticeController extends Controller
{
public function getNotice (Request $request) {
public function fetch (Request $request) {
return response([
'data' => Notice::orderBy('created_at', 'DESC')->first()
]);

View File

@ -16,7 +16,7 @@ use Stripe\Source;
class OrderController extends Controller
{
public function getOrders (Request $request) {
public function fetch (Request $request) {
$order = Order::where('user_id', $request->session()->get('id'))
->orderBy('created_at', 'DESC')
->get();

View File

@ -8,7 +8,7 @@ use App\Models\Plan;
class PlanController extends Controller
{
public function getInfo (Request $request) {
public function fetch (Request $request) {
if (empty($request->input('plan_id'))) {
abort(500, '参数错误');
}

View File

@ -12,7 +12,7 @@ use App\Models\User;
use App\Utils\Helper;
class ServerController extends Controller {
public function getServers (Request $request) {
public function fetch (Request $request) {
$user = User::find($request->session()->get('id'));
$server = [];
if ($user->expired_at > time()) {
@ -35,7 +35,7 @@ class ServerController extends Controller {
]);
}
public function getTrafficLog (Request $request) {
public function logFetch (Request $request) {
$type = $request->input('type') ? $request->input('type') : 0;
$current = $request->input('current') ? $request->input('current') : 1;
$pageSize = $request->input('pageSize') >= 10 ? $request->input('pageSize') : 10;

View File

@ -12,7 +12,7 @@ use Illuminate\Support\Facades\DB;
class TicketController extends Controller
{
public function getTickets (Request $request) {
public function fetch (Request $request) {
if ($request->input('id')) {
$ticket = Ticket::where('id', $request->input('id'))
->where('user_id', $request->session()->get('id'))

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -74,27 +74,27 @@ Route::prefix('v1')
Route::post('order/checkout', 'OrderController@checkout');
Route::get ('order/check', 'OrderController@check');
Route::get ('order/details', 'OrderController@details');
Route::get ('order/getOrders', 'OrderController@getOrders');
Route::get ('order/fetch', 'OrderController@fetch');
Route::get ('order/getPaymentMethod', 'OrderController@getPaymentMethod');
// Plan
Route::post('plan/getInfo', 'PlanController@getInfo');
Route::post('plan/fetch', 'PlanController@fetch');
// Invite
Route::get ('invite/save', 'InviteController@save');
Route::get ('invite/getInvites', 'InviteController@getInvites');
Route::get ('invite/getDetails', 'InviteController@getDetails');
Route::get ('invite/fetch', 'InviteController@fetch');
Route::get ('invite/details', 'InviteController@details');
// Tutorial
Route::get ('tutorial/getSubscribeUrl', 'TutorialController@getSubscribeUrl');
Route::get ('tutorial/getAppleID', 'TutorialController@getAppleID');
// Notice
Route::get ('notice/getNotice', 'NoticeController@getNotice');
Route::get ('notice/fetch', 'NoticeController@fetch');
// Ticket
Route::post('ticket/reply', 'TicketController@reply');
Route::post('ticket/close', 'TicketController@close');
Route::post('ticket/save', 'TicketController@save');
Route::get ('ticket/getTickets', 'TicketController@getTickets');
Route::get ('ticket/fetch', 'TicketController@fetch');
// Server
Route::get ('server/getServers', 'ServerController@getServers');
Route::get ('server/getTrafficLog', 'ServerController@getTrafficLog');
Route::get ('server/fetch', 'ServerController@fetch');
Route::get ('server/log/fetch', 'ServerController@logFetch');
});
// Passport
@ -114,7 +114,7 @@ Route::prefix('v1')
Route::prefix('guest')
->group(function () {
// Plan
Route::get ('plan/getPlans', 'Guest\\PlanController@getPlans');
Route::get ('plan/fetch', 'Guest\\PlanController@fetch');
// Order
Route::post('order/alipayNotify', 'Guest\\OrderController@alipayNotify');
Route::post('order/stripeNotify', 'Guest\\OrderController@stripeNotify');