Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
866ca273
Commit
866ca273
authored
Aug 22, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加快查与学院用户信息同步更新API
parent
da8dd6b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
0 deletions
+68
-0
xue_user.php
example/xue_user.php
+23
-0
User.php
src/code/User.php
+33
-0
User.php
src/xue/User.php
+12
-0
No files found.
example/xue_user.php
0 → 100644
View file @
866ca273
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/22
* Time: 13:49
*/
use
internalApi\xue\User
;
require
__DIR__
.
'/_init.php'
;
User
::
setDebug
(
true
);
\internalApi\code\User
::
setDebug
();
$uid
=
138
;
$data
=
[
'nickname'
=>
'有名人士'
,
'avatar'
=>
'http://u.yunya.com/avatar?n='
.
urlencode
(
'世界'
)
.
'&s=m'
];
User
::
updateSync
(
$uid
,
$data
);
\internalApi\code\User
::
updateSync
(
$uid
,
$data
);
src/code/User.php
0 → 100644
View file @
866ca273
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/22
* Time: 14:12
*/
namespace
internalApi\code
;
use
internalApi\base\Client
;
/**
* 快查用户服务
*
* @package internalApi\code
*/
class
User
extends
Client
{
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public
static
function
updateSync
(
$uid
,
$data
)
{
return
self
::
call
(
'user.updateSync'
,
compact
(
'uid'
,
'data'
));
}
}
\ No newline at end of file
src/xue/User.php
View file @
866ca273
...
@@ -29,4 +29,16 @@ class User extends Client
...
@@ -29,4 +29,16 @@ class User extends Client
return
self
::
call
(
'user.hasAdminPermission'
,
compact
(
'uid'
));
return
self
::
call
(
'user.hasAdminPermission'
,
compact
(
'uid'
));
}
}
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public
static
function
updateSync
(
$uid
,
$data
)
{
return
self
::
call
(
'user.updateSync'
,
compact
(
'uid'
,
'data'
));
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment