李忠征信平台后端管理系统
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.
 
 
 
 
 
 

54 lines
1.6 KiB

<?php
namespace app\api\controller;
use app\common\controller\Api;
use app\common\library\Ems;
use app\common\library\Sms;
use app\admin\model\system\Basic;
use fast\Random;
use think\Config;
use think\Validate;
/**
* 系统基础设置接口
*/
class Systembasic extends Api
{
protected $noNeedLogin = ['getinfo','getadvert','getadvertdetail','getlianxi','infoopen'];
public function getinfo(){
if($this->request->isPost()){
$code = $this->request->post('code');
$info = Basic::field('content')->where('code',$code)->find();
return $this->success('获取成功',$info);
}
return $this->error('非法请求');
}
public function getadvert(){
if($this->request->isPost()){
$type = $this->request->post('type');
$list = \app\admin\model\Advert::where('status',1)->select();
return $this->success('获取成功',$list);
}
}
public function getadvertdetail(){
if($this->request->isPost()){
$id = $this->request->post('id');
$detail = \app\admin\model\Advert::where('id',$id)->find();
return $this->success('获取成功',$detail);
}
}
public function getlianxi(){
for($i = 0;$i<4;$i++){
$data['title'] = '联系电话';
$data['number'] = '15987654321';
$return[] = $data;
}
return $this->success('获取成功',$return);
}
public function infoopen(){
$info['qq'] = true;
$info['wechat'] = true;
return $this->success('获取成功',$info);
}
}