Notice.php 1.6 KB
<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 公告接口
 */
class Notice extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 获得公告
     *
     * @ApiTitle    (获得公告)
     * @ApiSummary  (获得公告)
     * @ApiMethod   (POST)
     * @ApiReturnParams   (name="code", type="integer", required=true, sample="0")
     * @ApiReturnParams   (name="msg", type="string", required=true, sample="返回成功")
     * @ApiReturnParams   (name="data", type="object", sample="{'prepay_id':'123','options':{},'order':{}}", description="扩展数据返回")
     * @ApiReturn   ({'code':'1','msg':'返回成功'})
     */
    public function get_notice()
    {
        $notice = new \app\admin\model\Notice();
        $notice = $notice->where([])->select();

        $this->success('请求成功',$notice);
    }

    /**
     * 关于我们
     *
     * @ApiTitle    (关于我们)
     * @ApiSummary  (关于我们)
     * @ApiMethod   (POST)
     * @ApiReturnParams   (name="code", type="integer", required=true, sample="0")
     * @ApiReturnParams   (name="msg", type="string", required=true, sample="返回成功")
     * @ApiReturnParams   (name="data", type="object", sample="{'prepay_id':'123','options':{},'order':{}}", description="扩展数据返回")
     * @ApiReturn   ({'code':'1','msg':'返回成功'})
     */
    public function get_about()
    {
        $about = new \app\admin\model\About();
        $about = $about->where([])->select();

        $this->success('请求成功',$about);
    }
}