first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
<?php
/**
* Created by PhpStorm && wx_lql
* Welfares.php in Project yifu => 文件描述
* 2019/8/7 11:05
*
*  ┏┓  ┏┓+ +
* ┏┛┻━━━┛┻┓ + +
* ┃       ┃  
* ┃   ━   ┃ ++ + + +
*
* ████━████ ┃+
* ┃       ┃ +
* ┃   ┻   ┃
* ┃       ┃ + +
* ┗━┓   ┏━┛
*   ┃   ┃           
*   ┃   ┃ + + + +
*   ┃   ┃
*   ┃   ┃ + 神兽保佑
*   ┃   ┃ 代码无bug  
*   ┃   ┃  +         
*   ┃    ┗━━━┓ + +
*   ┃      ┣┓
*   ┃      ┏┛
*   ┗┓┓┏━┳┓┏┛ + + + +
*    ┃┫┫ ┃┫┫
*   ┗┻┛ ┗┻┛+ + + +
*/
namespace app\api\controller;
use app\common\model\AreaModel;
use think\Exception;
class AreaController extends ApiController
{
/**
* 不需要鉴权方法
* index、save不需要鉴权
* ['index','save']
* 所有方法都不需要鉴权
* [*]
*/
protected $noAuth = ['index'];
/**
* @apiVersion 1.0.0
* @api {get} /area/index 地址列表(朱晓伟)
* @apiName index
* @apiGroup Version
* @apiSuccessExample Success-Response:
* {
* "code": 200,
* "message": "成功",
* "data": {
* "version": 1.0.1,
* "url": "http://www.baidu.com",
* "describe": "有重大更新啦!!",
* "update_method": 0,// 更新方式0:普通更新1、强制更新
* }
* }
* @apiErrorExample Error-Response:
* {
* "code": 200,
* "message": "无更新",
* "data": {}
* }
*/
public function index()
{
$field = 'id, area_name, parent_area_id';
$areaTree = AreaModel::with(['childs','childs.childs'])
->field($field)->where('parent_area_id',0)->all()->toArray();
return self::returnMsg(self::SUCCESS, '无更新',$areaTree);
}
}