苗总组局小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jol/application/api/controller/Systembasicinfo.php

33 lines
760 B

2 months ago
<?php
namespace app\api\controller;
use app\api\library\buiapi\Api;
class Systembasicinfo extends Api{
protected $model = null;
protected $noNeedRight = '*';
protected $noNeedLogin = ['index','add','edit','view'];
protected $_allow_func = ['index','add','edit','view'];
use \app\api\library\buiapi\traits\Api;
public function _initialize(){
parent::_initialize();
$this->model = new \app\api\model\SystemBasicinfo;
}
public function index(){
$post = $this->request->post();
$data = $this->model->field('type,title,content')->select();
$return = [];
foreach($data as $k=>$v){
$return[$v['type']] = $v;
}
if($post['type']) $return = $return[$post['type']];
$this->success('获取成功',$return);
}
}