123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\inter\controller;
- use think\Controller;
- use think\Db;
- use app\common\library\UUIDs;
- use think\Session;
- use app\common\library\ResultTools;
- use think\Log;
- use think\Cache;
- class Operating extends Base
- {
- public function index(){
- }
- public function doctor(){
- try{
- $sessionid = $_REQUEST['sessionid'];
- log::record('-------运营------------');
- log::record($sessionid);
- $doctor = Cache::get($sessionid);
- log::record($doctor);
- log::record('-------------------');
- $operate = DB::table('operating')->where('type',1)->where('role_id',$doctor['id'])->field('nums,month,exam_num,remote_num,danger_num')->order('month asc')->limit(6)->select();
- if($operate){
- return json_encode(['code'=>'0000','status'=>'ok','msg'=>'请求成功','info'=>$operate,'sessionid'=>$sessionid]);
- }
- }catch(\Exception $e){
- return json_encode(['status'=>'fail','code'=>'2000','msg'=>$e->getMessage()]);
- }
- }
- }
|