20201112
This commit is contained in:
220
application/master/controller/Admin.php
Normal file
220
application/master/controller/Admin.php
Normal file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
namespace app\master\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* @title 管理员接口
|
||||
* @description 管理员相关操作
|
||||
* @group 管理员相关
|
||||
*/
|
||||
class Admin extends Controller
|
||||
{
|
||||
protected $admin_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
$this->admin_obj = Db::name('admin');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 测试demo接口
|
||||
* @description 接口说明
|
||||
* @author 开发者
|
||||
* @url /index/demo
|
||||
* @method GET
|
||||
*
|
||||
* @header name:device require:1 default: desc:设备号
|
||||
*
|
||||
* @param name:id type:int require:1 default:1 other: desc:唯一ID
|
||||
*
|
||||
* @return name:名称
|
||||
* @return mobile:手机号
|
||||
* @return list_messages:消息列表@
|
||||
* @list_messages message_id:消息ID content:消息内容
|
||||
* @return object:对象信息@!
|
||||
* @object attribute1:对象属性1 attribute2:对象属性2
|
||||
* @return array:数组值#
|
||||
* @return list_user:用户列表@
|
||||
* @list_user name:名称 mobile:手机号 list_follow:关注列表@
|
||||
* @list_follow user_id:用户id name:名称
|
||||
*/
|
||||
public function demo()
|
||||
{
|
||||
//接口代码
|
||||
$device = $this->request->header('device');
|
||||
echo json_encode(["code"=>200, "message"=>"success", "data"=>['device'=>$device]]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title 管理员登陆
|
||||
* @description 管理员登陆
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/login
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:account type:string require:1
|
||||
* @param name:password type:string require:1
|
||||
*
|
||||
* @return account:名称
|
||||
* @return phone:手机号
|
||||
* @return realname:真是姓名
|
||||
* @return role:角色(0管理员1编辑)
|
||||
*/
|
||||
public function login(){
|
||||
$data = $this->request->post();
|
||||
$where['account'] = $data['account'];
|
||||
$where['password'] = md5($data['password']);
|
||||
$res = $this->admin_obj->where($where)->find();
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'','data'=>$res]);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'account or password error!']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 更改密码
|
||||
* @description 更改密码
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/changepasswd
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:account type:string require:1
|
||||
* @param name:password type:string require:1
|
||||
* @param name:new_password type:string require:1
|
||||
* @param name:re_password type:string require:1
|
||||
*
|
||||
*/
|
||||
public function changepasswd(){
|
||||
$data = $this->request->post();
|
||||
//验证密码是否一致
|
||||
if($data['new_password']!=$data['re_password']){
|
||||
return json(['code'=>1,'msg'=>'The two passwords do not match']);
|
||||
}
|
||||
//验证用户名密码是否正确
|
||||
$check_res = $this->admin_obj->where('account',$data['account'])->where('password', md5($data['password']))->find();
|
||||
if($check_res==null){
|
||||
return json(['code'=>1,'msg'=>'account or password is error!']);
|
||||
}
|
||||
//修改逻辑
|
||||
$this->admin_obj->where('account',$data['account'])->update(['password'=> md5($data['new_password'])]);
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取管理员信息
|
||||
* @description 获取管理员信息
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/getAdminBase
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:account type:string require:1
|
||||
*
|
||||
* @return account:名称
|
||||
* @return phone:手机号
|
||||
* @return realname:真实姓名
|
||||
* @return role:角色(0管理员1编辑)
|
||||
*/
|
||||
public function getAdminBase(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->admin_obj->where('account',$data['account'])->find();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>$res]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 管理员信息修改
|
||||
* @description 管理员信息修改
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/editAdminBase
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:account type:string require:1
|
||||
* @param name:password type:string require:1 desc:密码
|
||||
* @param name:realname type:string require:1
|
||||
* @param name:phone type:string require:1
|
||||
*
|
||||
*/
|
||||
public function editAdminBase(){
|
||||
$data = $this->request->post();
|
||||
$this->admin_obj->where('account',$data['account'])->update(['realname'=>$data['realname'],'password'=> md5($data['password']),'phone'=>$data['phone']]);
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加管理员
|
||||
* @description 添加管理员
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/addAdmin
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:account type:string require:1
|
||||
* @param name:password type:string require:1 desc:密码
|
||||
* @param name:realname type:string require:1
|
||||
* @param name:phone type:string require:1
|
||||
* @param name:role type:int require:1 default:1 desc:角色(0admin1editor)
|
||||
*
|
||||
*/
|
||||
public function addAdmin(){
|
||||
$data = $this->request->post();
|
||||
$add_data['account'] = trim($data['account']);
|
||||
$add_data['password'] = md5($data['password']);
|
||||
$add_data['realname'] = $data['realname'];
|
||||
$add_data['phone'] = $data['phone'];
|
||||
$add_data['role'] = $data['role'];
|
||||
$res = $this->admin_obj->insert($add_data);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取管理员列表
|
||||
* @description 获取管理员列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/getAdminList
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @return adminlist:管理员列表@
|
||||
* @adminlist account:账号 realname:真实姓名 role:角色 phone:电话
|
||||
*
|
||||
*/
|
||||
public function getAdminList(){
|
||||
$list = $this->admin_obj->where('state',0)->select();
|
||||
return json(['code'=>0,'msg'=>'success','adminlist'=>$list]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除管理员
|
||||
* @description 删除管理员
|
||||
* @author wangjinlei
|
||||
* @url /master/Admin/delAdmin
|
||||
* @method POST
|
||||
*
|
||||
* @param name:admin_id type:int require:1 desc:管理员主键
|
||||
*
|
||||
*/
|
||||
public function delAdmin(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->admin_obj->where('admin_id',$data['admin_id'])->update(['state'=>1]);
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
11
application/master/controller/Index.php
Normal file
11
application/master/controller/Index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace app\master\controller;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
echo THINK_VERSION;
|
||||
// return '<style type="text/css">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> ThinkPHP V5<br/><span style="font-size:30px">十年磨一剑 - 为API开发设计的高性能框架</span></p><span style="font-size:22px;">[ V5.0 版本由 <a href="http://www.qiniu.com" target="qiniu">七牛云</a> 独家赞助发布 ]</span></div><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_bd568ce7058a1091"></thinkad>';
|
||||
}
|
||||
}
|
||||
212
application/master/controller/Journal.php
Normal file
212
application/master/controller/Journal.php
Normal file
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
namespace app\master\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* @title 期刊接口
|
||||
* @description 期刊相关操作
|
||||
* @group 期刊相关
|
||||
*/
|
||||
class Journal extends Controller {
|
||||
//put your code here
|
||||
protected $admin_obj = '';
|
||||
protected $journal_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
$this->admin_obj = Db::name('admin');
|
||||
$this->journal_obj = Db::name('journal');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊列表
|
||||
* @description 获取期刊列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getJournalList
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @return journalList:期刊列表@
|
||||
* @journalList title:标题 issn:issn editorinchief:editorinchief acceptance:acceptance finaldecision:finaldecision apc:apc
|
||||
*
|
||||
*/
|
||||
public function getJournalList(){
|
||||
$res = $this->journal_obj->field('j_journal.*,j_admin.realname realname')->join('j_admin','j_admin.admin_id = j_journal.editor_id','LEFT')->where('j_journal.state',0)->order('j_journal.sort desc')->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['journalList'=>$res]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 添加期刊
|
||||
* @description 添加期刊
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/addJournal
|
||||
* @method POST
|
||||
*
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:issn type:string require:1
|
||||
* @param name:editorinchief type:string require:1
|
||||
* @param name:acceptance type:string require:1 desc:受理度
|
||||
* @param name:finaldecision type:string require:1 desc:最终受理
|
||||
* @param name:sort type:int require:1 detault:0 desc:权重值
|
||||
* @param name:apc type:string require:1
|
||||
* @param name:icon type:string require:1
|
||||
* @param name:editor_id type:int require:1 desc:编辑id
|
||||
* @param name:system_color type:string require:1
|
||||
* @param name:submission_url type:string require:1
|
||||
*
|
||||
*/
|
||||
public function addJournal(){
|
||||
$data = $this->request->post();
|
||||
$insert_data['title'] = $data['title'];
|
||||
$insert_data['issn'] = $data['issn'];
|
||||
$insert_data['editorinchief'] = $data['editorinchief'];
|
||||
$insert_data['acceptance'] = $data['acceptance'];
|
||||
$insert_data['finaldecision'] = $data['finaldecision'];
|
||||
$insert_data['sort'] = $data['sort'];
|
||||
$insert_data['apc'] = $data['apc'];
|
||||
$insert_data['icon'] = $data['icon'];
|
||||
$insert_data['editor_id'] = $data['editor_id'];
|
||||
$insert_data['system_color'] = $data['system_color'];
|
||||
$insert_data['submission_url'] = $data['submission_url'];
|
||||
$res = $this->journal_obj->insert($insert_data);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊详情
|
||||
* @description 获取期刊详情
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getJournalDetail
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id require:1 desc:主键
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public function getJournalDetail(){
|
||||
// $data = $this->request->post();
|
||||
// $journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 删除期刊
|
||||
* @description 删除期刊
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/delJournal
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id require:1 desc:主键
|
||||
*
|
||||
*/
|
||||
public function delJournal(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->journal_obj->where('journal_id',$data['journal_id'])->update(['state'=>1]);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 修改期刊详情
|
||||
* @description 修改期刊详情
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/editJournalDetail
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id require:1 desc:主键
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:issn type:string require:1
|
||||
* @param name:editorinchief type:string require:1
|
||||
* @param name:acceptance type:string require:1 desc:受理度
|
||||
* @param name:finaldecision type:string require:1 desc:最终受理
|
||||
* @param name:sort type:int require:1 detault:0 desc:权重值
|
||||
* @param name:apc type:string require:1
|
||||
* @param name:icon type:string require:1
|
||||
* @param name:editor_id type:int require:1 desc:编辑id
|
||||
* @param name:system_color type:string require:1
|
||||
* @param name:submission_url type:string require:1
|
||||
*
|
||||
*/
|
||||
public function editJournalDetail(){
|
||||
$data = $this->request->post();
|
||||
$insert_data['title'] = $data['title'];
|
||||
$insert_data['issn'] = $data['issn'];
|
||||
$insert_data['editorinchief'] = $data['editorinchief'];
|
||||
$insert_data['acceptance'] = $data['acceptance'];
|
||||
$insert_data['finaldecision'] = $data['finaldecision'];
|
||||
$insert_data['sort'] = $data['sort'];
|
||||
$insert_data['apc'] = $data['apc'];
|
||||
$insert_data['icon'] = $data['icon'];
|
||||
$insert_data['editor_id'] = $data['editor_id'];
|
||||
$insert_data['system_color'] = $data['system_color'];
|
||||
$insert_data['submission_url'] = $data['submission_url'];
|
||||
$res = $this->journal_obj->where('journal_id',$data['journal_id'])->update($insert_data);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'Please confirm you have changed the journal information.']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取编辑列表
|
||||
* @description 获取编辑列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/getEditorList
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @return editorList:编辑列表@
|
||||
* @editorList account:账号 realname:真实姓名 role:角色代号(0admin1editor)
|
||||
*
|
||||
*/
|
||||
public function getEditorList(){
|
||||
$editor_list = $this->admin_obj->where('role',1)->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['editorList'=>$editor_list]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 图片上传
|
||||
* @description 图片上传
|
||||
* @author wangjinlei
|
||||
* @url /master/Journal/up_file
|
||||
* @method POST
|
||||
*
|
||||
* @param name:name type:string require:1 default:journalicon desc:文件域名称
|
||||
*
|
||||
*
|
||||
* @return upurl:图片地址
|
||||
*
|
||||
*/
|
||||
public function up_file() {
|
||||
$file = request()->file('journalicon');
|
||||
if ($file) {
|
||||
$info = $file->move(ROOT_PATH . 'public' . DS . 'journalicon');
|
||||
if ($info) {
|
||||
return json(['code'=>0 , 'msg'=>'success', 'upurl' => str_replace("\\", "/", $info->getSaveName())]);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => $file->getError()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
184
application/master/controller/Mysystem.php
Normal file
184
application/master/controller/Mysystem.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
namespace app\master\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* @title 系统接口
|
||||
* @description 系统相关操作
|
||||
* @group 系统相关
|
||||
*/
|
||||
class Mysystem extends Controller {
|
||||
//put your code here
|
||||
protected $admin_obj = '';
|
||||
protected $sys_obj = '';
|
||||
protected $sys_abs_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
$this->admin_obj = Db::name('admin');
|
||||
$this->sys_obj = Db::name('system');
|
||||
$this->sys_abs_obj = Db::name('system_abstracting');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取系统基本信息
|
||||
* @description 获取系统基本信息
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/getSysBase
|
||||
* @method POST
|
||||
*
|
||||
* @return account:copyright
|
||||
* @return phone:email
|
||||
* @return realname:website
|
||||
*/
|
||||
public function getSysBase(){
|
||||
$res = $this->sys_obj->where('system_id = 1')->find();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>$res]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑系统基本信息
|
||||
* @description 编辑系统基本信息
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/editSysBase
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:copyright type:string require:1
|
||||
* @param name:email type:string require:1
|
||||
* @param name:website type:string require:1
|
||||
*
|
||||
*/
|
||||
public function editSysBase(){
|
||||
$data = $this->request->post();
|
||||
$this->sys_obj->where('system_id = 1')->update(['copyright'=>$data['copyright'],'email'=>$data['email'],'website'=>$data['website']]);
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取abs列表
|
||||
* @description 获取abs列表
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/getAbsList
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:pageIndex type:int require:1 desc:当前页码数
|
||||
* @param name:pageSize type:int require:1 desc:单页数据条数
|
||||
*
|
||||
* @return count:总数据数
|
||||
* @return abslist:数据@
|
||||
* @abslist title:标题 url:地址 sort:权重 is_show:是否显示(1显示0不显示)
|
||||
*
|
||||
*/
|
||||
public function getAbsList(){
|
||||
$data = $this->request->post();
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
$res = $this->sys_abs_obj
|
||||
->order('sort desc')
|
||||
->limit($limit_start,$data['pageSize'])
|
||||
->select();
|
||||
$count = $this->sys_abs_obj->count();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['count'=>$count,'abslist'=>$res]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加abs
|
||||
* @description 增加abs
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/addAbs
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:title type:int require:1 desc:标题
|
||||
* @param name:url type:string require:1 desc:地址
|
||||
* @param name:sort type:int require:1 default:0 desc:权重
|
||||
* @param name:is_show type:int require:1 default:1 desc:是否显示(1yes0no)
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function addAbs(){
|
||||
$data = $this->request->post();
|
||||
$add_data['title'] = $data['title'];
|
||||
$add_data['url'] = $data['url'];
|
||||
$add_data['sort'] = $data['sort']?$data['sort']:0;
|
||||
$add_data['is_show'] = $data['is_show'];
|
||||
$res = $this->sys_abs_obj->insert($add_data);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error!']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取abs详情
|
||||
* @description 获取abs详情
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/getAbsDetail
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:system_abstracting_id type:int require:1 desc:id主键
|
||||
*
|
||||
* @return system_abstracting_id:主键
|
||||
* @return title:标题
|
||||
* @return url:地址
|
||||
* @return sort:权重
|
||||
* @return is_show:是否显示(1显示2不显示)
|
||||
*
|
||||
*/
|
||||
public function getAbsDetail(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->sys_abs_obj->where('system_abstracting_id',$data['system_abstracting_id'])->find();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>$res]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 更改abs详情
|
||||
* @description 更改abs详情
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/editAbs
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:system_abstracting_id type:int require:1 desc:id主键
|
||||
* @param name:title type:int require:1 desc:标题
|
||||
* @param name:url type:string require:1 desc:地址
|
||||
* @param name:sort type:int require:1 default:0 desc:权重
|
||||
*/
|
||||
public function editAbs(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->sys_abs_obj->update($data);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error!']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 更改abs显示状态
|
||||
* @description 更改abs显示状态
|
||||
* @author wangjinlei
|
||||
* @url /master/Mysystem/changeShow
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @param name:system_abstracting_id type:int require:1 desc:id主键
|
||||
* @param name:is_show type:int require:1 desc:id主键
|
||||
*/
|
||||
public function changeShow(){
|
||||
$data = $this->request->post();
|
||||
$res = $this->sys_abs_obj->where('system_abstracting_id',$data['system_abstracting_id'])->update(['is_show'=>$data['is_show']]);
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
return json(['code'=>1,'msg'=>'system error!']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user