Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhupu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
zhupu
Commits
28003748
Commit
28003748
authored
Sep 27, 2023
by
sugar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://rungit.jxdsy.cn:10000/sugar/zhupu
into dev
parents
1bcd5fd4
c221503f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
application/api/controller/Friend.php
application/api/controller/Friend.php
+1
-1
application/api/controller/Users.php
application/api/controller/Users.php
+4
-2
application/api/model/UsersModel.php
application/api/model/UsersModel.php
+1
-1
No files found.
application/api/controller/Friend.php
View file @
28003748
...
...
@@ -408,7 +408,7 @@ class Friend extends Api{
$map
[
'user_id'
]
=
[
'in'
,
$ids
];
}
$list
=
Db
::
name
(
'fastim_user'
)
->
where
([
'user_id'
=>
[
'neq'
,
$this
->
auth
->
id
]])
->
where
(
$map
)
->
limit
(
30
)
->
select
();
$list
=
Db
::
name
(
'fastim_user'
)
->
where
([
'user_id'
=>
[
'neq'
,
$this
->
auth
->
id
]])
->
where
(
$map
)
->
limit
(
6
)
->
select
();
$this
->
success
(
'操作成功'
,[
'list'
=>
$list
]);
}
...
...
application/api/controller/Users.php
View file @
28003748
...
...
@@ -16,6 +16,7 @@ use \app\common\controller\Api;
use
app\common\library\Redis\RedisMaster
;
use
app\common\library\wechat\WxUser
;
use
app\common\model\Config
;
use
app\lib\model\SurnameModel
;
use
EasyWeChat\Factory
;
use
fast\Random
;
use
\addons\fastim\library\Common
as
ImCommon
;
...
...
@@ -142,6 +143,7 @@ class Users extends Api
if
(
$this
->
auth
->
village_id
>
0
)
{
$userinfo
[
'addr_name'
]
=
Db
::
name
(
"addr_village"
)
->
where
([
'village_code'
=>
$this
->
auth
->
village_id
])
->
field
(
'province,city,county,town,village'
)
->
find
();
}
$userinfo
[
'Surname'
]
=
SurnameModel
::
where
([
'ID'
=>
$userinfo
[
'surname_id'
]])
->
value
(
"Surname"
);
$this
->
success
(
'获取成功'
,
[
'userinfo'
=>
$userinfo
]);
}
...
...
@@ -153,10 +155,10 @@ class Users extends Api
$params
=
$this
->
request
->
param
();
if
(
!
empty
(
$params
[
'educational'
])){
$params
[
'educational'
]
=
htmlspecialchars_decode
(
$params
[
'educational'
]
);
$params
[
'educational'
]
=
json_encode
(
$params
[
'educational'
],
JSON_UNESCAPED_UNICODE
);
}
if
(
!
empty
(
$params
[
'work_experience'
])){
$params
[
'work_experience'
]
=
htmlspecialchars_decode
(
$params
[
'work_experience'
]
);
$params
[
'work_experience'
]
=
json_encode
(
$params
[
'work_experience'
],
JSON_UNESCAPED_UNICODE
);
}
UsersModel
::
where
([
'id'
=>
$this
->
auth
->
id
])
->
update
(
$params
);
...
...
application/api/model/UsersModel.php
View file @
28003748
...
...
@@ -74,7 +74,7 @@ class UsersModel extends BaseModel {
}
public
static
function
getUserinfo
(
$id
,
$field
=
[
'id'
,
'username'
,
'nickname'
,
'mobile'
,
'avatar'
,
'score'
,
'prevtime'
,
'wx_openid'
,
'app_openid'
,
'unionid'
,
'money'
,
'level'
,
'is_shaikh'
,
'commission'
,
'agent_money'
,
'province_id'
,
'city_id'
,
'area_id'
,
'town_id'
,
'village_id'
,
'educational'
,
'work_experience'
]){
public
static
function
getUserinfo
(
$id
,
$field
=
[
'id'
,
'username'
,
'nickname'
,
'surname_id'
,
'realname'
,
'mobile'
,
'avatar'
,
'score'
,
'prevtime'
,
'wx_openid'
,
'app_openid'
,
'unionid'
,
'money'
,
'level'
,
'is_shaikh'
,
'commission'
,
'agent_money'
,
'province_id'
,
'city_id'
,
'area_id'
,
'town_id'
,
'village_id'
,
'educational'
,
'work_experience'
]){
return
self
::
where
([
'id'
=>
$id
])
->
field
(
$field
)
->
find
();
}
...
...
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