-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab03f98
commit d753f0e
Showing
13 changed files
with
505 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
// +---------------------------------------------------------------------- | ||
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ] | ||
// +---------------------------------------------------------------------- | ||
// | Copyright (c) 2013-present http://www.thinkcmf.com All rights reserved. | ||
// +---------------------------------------------------------------------- | ||
// | Author: Dean <[email protected]> | ||
// +---------------------------------------------------------------------- | ||
namespace api\admin\controller; | ||
|
||
use cmf\controller\RestAdminBaseController; | ||
use cmf\controller\RestBaseController; | ||
use OpenApi\Annotations as OA; | ||
use think\facade\Db; | ||
use think\facade\Validate; | ||
|
||
class SettingController extends RestAdminBaseController | ||
{ | ||
/** | ||
* 清理缓存 | ||
* @throws \think\exception\DbException | ||
* @OA\Post( | ||
* tags={"admin"}, | ||
* path="/admin/setting/clearCache", | ||
* summary="清理缓存", | ||
* description="清理缓存", | ||
* @OA\Response( | ||
* response="1", | ||
* @OA\JsonContent(example={"code": 1,"msg": "清除成功!","data": ""}) | ||
* ), | ||
* @OA\Response( | ||
* response="0", | ||
* @OA\JsonContent(example={"code": 0,"msg": "清除失败!","data": ""}) | ||
* ), | ||
* ) | ||
*/ | ||
public function clearCache() | ||
{ | ||
cmf_clear_cache(); | ||
$this->success('清除成功!'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace api\admin\swagger\response; | ||
|
||
use OpenApi\Annotations as OA; | ||
|
||
|
||
/** | ||
* @OA\Schema() | ||
*/ | ||
class AdminPublicLoginResponse | ||
{ | ||
/** | ||
* @OA\Property(format="int64",example="1") | ||
* @var int | ||
*/ | ||
public $code; | ||
|
||
/** | ||
* @OA\Property(example="登录成功!") | ||
* @var string | ||
*/ | ||
public $msg; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="object", | ||
* ref="#/components/schemas/AdminPublicLoginResponseData" | ||
* ) | ||
* @var object | ||
*/ | ||
public $data; | ||
|
||
} | ||
|
||
/** | ||
* @OA\Schema() | ||
*/ | ||
class AdminPublicLoginResponseData | ||
{ | ||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="01227ac27d40f95491c47847bf91b558d7640d81a1578bb72cb2ff8b14fd9cb4" | ||
* ) | ||
* @var array | ||
*/ | ||
public $token; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
<?php | ||
|
||
namespace api\home\swagger\response; | ||
|
||
use OpenApi\Annotations as OA; | ||
|
||
|
||
/** | ||
* @OA\Schema() | ||
*/ | ||
class HomeSlidesReadResponse | ||
{ | ||
/** | ||
* @OA\Property(format="int64",example="1") | ||
* @var int | ||
*/ | ||
public $code; | ||
|
||
/** | ||
* @OA\Property(example="该组幻灯片获取成功!") | ||
* @var string | ||
*/ | ||
public $msg; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="object", | ||
* ref="#/components/schemas/HomeSlidesReadResponseData" | ||
* ) | ||
* @var object | ||
*/ | ||
public $data; | ||
|
||
} | ||
|
||
/** | ||
* @OA\Schema() | ||
*/ | ||
class HomeSlidesReadResponseData | ||
{ | ||
// "id": 1, | ||
// "status": 1, | ||
// "delete_time": 0, | ||
// "name": "幻灯片一", | ||
// "remark": "苦", | ||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="1" | ||
* ) | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="1" | ||
* ) | ||
*/ | ||
public $status; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="0" | ||
* ) | ||
*/ | ||
public $delete_time; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="幻灯片名称" | ||
* ) | ||
*/ | ||
public $name; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="备注" | ||
* ) | ||
*/ | ||
public $remark; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="array", | ||
* @OA\Items(ref="#/components/schemas/HomeSlidesReadResponseDataItem") | ||
* ) | ||
*/ | ||
public $items; | ||
} | ||
|
||
|
||
|
||
/** | ||
* @OA\Schema() | ||
*/ | ||
class HomeSlidesReadResponseDataItem | ||
{ | ||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="1" | ||
* ) | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="1" | ||
* ) | ||
*/ | ||
public $slide_id; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="int64", | ||
* example="1" | ||
* ) | ||
*/ | ||
public $status; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="number", | ||
* example="1.0" | ||
* ) | ||
*/ | ||
public $list_order; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="页面一" | ||
* ) | ||
*/ | ||
public $title; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="http://cmf6.im/upload/portal/20170810/a721883e7f17fb054be63ddb7331ddb5.jpg" | ||
* ) | ||
*/ | ||
public $image; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="http://www.baidu.com" | ||
* ) | ||
*/ | ||
public $url; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="_blank" | ||
* ) | ||
*/ | ||
public $target; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="描述" | ||
* ) | ||
*/ | ||
public $description; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="string", | ||
* example="内容" | ||
* ) | ||
*/ | ||
public $content; | ||
|
||
/** | ||
* @OA\Property( | ||
* type="object", | ||
* example={"xxxx":"xxxx"} | ||
* ) | ||
*/ | ||
public $more; | ||
|
||
} | ||
|
Oops, something went wrong.