first commit
This commit is contained in:
34
app/Http/Controllers/Api/System/Area.php
Normal file
34
app/Http/Controllers/Api/System/Area.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace App\Http\Controllers\Api\System;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\BaseController;
|
||||
use App\Services\System\AreaService;
|
||||
|
||||
class Area extends BaseController {
|
||||
|
||||
/**
|
||||
* @title 获取地区数据
|
||||
*
|
||||
* @param Request $request
|
||||
* @return void
|
||||
*/
|
||||
public function index(Request $request, AreaService $service){
|
||||
try {
|
||||
$this->data['data'] = $service->getDataList($request);
|
||||
} catch (\Exception $e) {
|
||||
$this->data['code'] = 0;
|
||||
$this->data['message'] = $e->getMessage();
|
||||
}
|
||||
|
||||
return response()->json($this->data);
|
||||
}
|
||||
|
||||
}
|
||||
34
app/Http/Controllers/Api/System/Index.php
Normal file
34
app/Http/Controllers/Api/System/Index.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace App\Http\Controllers\Api\System;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\BaseController;
|
||||
use App\Services\System\QrcodeService;
|
||||
|
||||
class Index extends BaseController {
|
||||
|
||||
/**
|
||||
* @title 生成二维码
|
||||
*
|
||||
* @param Request $request
|
||||
* @return void
|
||||
*/
|
||||
public function qrcode(Request $request, QrcodeService $service){
|
||||
try {
|
||||
$this->data['data'] = $service->getQrcode($request);
|
||||
} catch (\Exception $e) {
|
||||
$this->data['code'] = 0;
|
||||
$this->data['message'] = $e->getMessage();
|
||||
}
|
||||
|
||||
return response()->json($this->data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user