insert('oauth_clients',[ 'client_id'=>$appid, 'client_secret'=>$apppwd, 'redirect_uri'=>$url, 'grant_types'=>$type, 'scope'=>$scope, 'user_id'=>$userid, 'name'=>$name, 'home'=>$home, 'present'=>$present, ]); } /** * 删除应用 * @param $id * @return false|int */ public function del($id){ global $authsql; return $authsql->delete('oauth_clients',[ 'id'=>$id ]); } public function edit($appid,$name,$home,$domain,$present){ global $authsql; return $authsql->update('oauth_clients',[ 'name'=>$name, 'home'=>$home, "redirect_uri"=>$domain, "present"=>$present ],[ "client_id"=>$appid ] ); } }