Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
b0d054eb
Commit
b0d054eb
authored
Jun 27, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
6dced9df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
9 deletions
+35
-9
Member.php
application/api/controller/Member.php
+18
-9
Users.php
application/model/Users.php
+17
-0
No files found.
application/api/controller/Member.php
View file @
b0d054eb
...
@@ -483,16 +483,25 @@ class Member extends Basic
...
@@ -483,16 +483,25 @@ class Member extends Basic
*/
*/
public
function
getUserInfo
()
{
public
function
getUserInfo
()
{
$data
[
'status'
]
=
200
;
$params
=
$this
->
params
;
$data
[
'data'
]
=
''
;
/* $params = array(
if
(
$this
->
params
[
'AuthToken'
])
{
"user_id" => 1
$fields
=
'id,user_pswd,user_nick,user_phone,user_pic,referrer_id,referrer_source,integral,create_time,update_time,last_login_time,last_login_ip'
;
);*/
$data
[
'data'
]
=
$this
->
user
->
selectUser
(
$this
->
userId
,
$fields
);
$fields
=
"a.id,a.buyer_id,b.buyer_nick,a.user_nick,a.user_phone,a.user_pic,a.other_pic"
;
$data
[
'data'
][
'AuthToken'
]
=
$this
->
params
[
'AuthToken'
];
$result
=
$this
->
user
->
getUserInfoById
(
$params
,
$fields
);
$data
=
[];
if
(
count
(
$result
)
>
0
){
$data
[
"id"
]
=
$result
[
0
][
"id"
];
$data
[
"buyer_id"
]
=
$result
[
0
][
"buyer_id"
];
$data
[
"buyer_nick"
]
=
$result
[
0
][
"buyer_nick"
];
$data
[
"user_nick"
]
=
$result
[
0
][
"user_nick"
];
$data
[
"user_phone"
]
=
$result
[
0
][
"user_phone"
];
$data
[
"user_pic"
]
=
!
empty
(
$result
[
0
][
"user_pic"
])
?
HEADERIMGURL
.
$result
[
0
][
"user_pic"
]
:
$result
[
0
][
"other_pic"
];
}
else
{
return
$this
->
response
(
"101"
,
"数据查询失败"
);
}
}
return
$this
->
response
(
"200"
,
"请求成功"
,
$data
);
$data
[
'msg'
]
=
''
;
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
/**
...
...
application/model/Users.php
View file @
b0d054eb
...
@@ -664,4 +664,21 @@ class Users extends Model
...
@@ -664,4 +664,21 @@ class Users extends Model
return
$this
->
where
(
$where_
)
->
setField
(
"buyer_id"
,
0
);
return
$this
->
where
(
$where_
)
->
setField
(
"buyer_id"
,
0
);
}
}
public
function
getUserInfoById
(
$param
,
$fields
)
{
$where_
=
[];
if
(
isset
(
$param
[
"user_id"
]))
{
$where_
[
"a.id"
]
=
$param
[
"user_id"
];
}
$data
=
$this
->
field
(
$fields
)
->
alias
(
"a"
)
->
join
(
"u_wx_info b"
,
"a.buyer_id=b.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
return
$data
;
}
}
}
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