Commit 84dcbc37 authored by huanle's avatar huanle

0526 ddapi

parent 4da9e981
......@@ -26,11 +26,12 @@ class Index extends Controller
$jsapi_ticket= $Ding->config('jsapi_ticket',$ticket);
$config=$Ding->ddconfig();
if($config){
$data['config']=$config;
$data['status']=200;
}
return json($data);
// if($config){
// $data['config']=$config;
// $data['status']=200;
// }
return json(code([$config], 0, 'ok'));
//return json($data);
}
public function getSsoToken(){
......@@ -41,15 +42,15 @@ class Index extends Controller
$User =new Dingtalk\User();
$userid =$User->code($code);
if($userid===false){
$data['status']=100000;
$data['status']=-10001;
$data['errmsg']='登录失败';
}else{
$data['status']=0;
$data['errmsg']='登录成功';
$data['userid']=$userid;
}
return json($data);
// var_dump($_SESSION);
// return json($data);
return json(code([$data], 0, 'ok'));
// var_dump($_SESSION);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment