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
91d56a2e
Commit
91d56a2e
authored
Nov 13, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通讯录修改
parent
986e8741
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Agent.php
application/api_broker/controller/Agent.php
+8
-4
WxAuthorization.php
application/index/controller/WxAuthorization.php
+1
-1
No files found.
application/api_broker/controller/Agent.php
View file @
91d56a2e
...
...
@@ -41,16 +41,20 @@ class Agent extends Basic
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
!
empty
(
$params
[
'
site_i
d'
]))
{
$where
[
'Agents.
site_id'
]
=
$params
[
'site_id'
]
;
if
(
!
empty
(
$params
[
'
keywor
d'
]))
{
$where
[
'Agents.
name|Agents.phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'keyword'
]
.
'%'
]
;
}
$field
=
'Agents.id as agent_id,'
;
$field
.=
'Agents.name,'
;
$field
.=
'Agents.img,'
;
$field
.=
'Agents.phone'
;
$res
=
$this
->
aAgents
->
getPhoneBookList
(
$field
,
$where
,
$pageSize
,
$pageNo
);
$res_total
=
$this
->
aAgents
->
getPhoneBookListTotal
(
$params
);
$res
=
$this
->
aAgents
->
getPhoneBookList
(
$field
,
$where
,
$pageSize
,
$pageNo
);
foreach
(
$res
as
$key
=>
$val
)
{
$res
[
$key
][
'head_portrait'
]
=
AGENTHEADERIMGURL
.
$val
[
'img'
];
}
$res_total
=
$this
->
aAgents
->
getPhoneBookListTotal
(
$where
);
return
$this
->
response
(
"200"
,
"成功"
,[
'data'
=>
$res
,
'total'
=>
$res_total
]);
...
...
application/index/controller/WxAuthorization.php
View file @
91d56a2e
...
...
@@ -52,7 +52,7 @@ class WxAuthorization extends Basic
{
$code
=
empty
(
$_GET
[
'code'
])
?
null
:
$_GET
[
'code'
];
if
(
!
$code
)
{
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
$this
->
_wxApi
->
getWxCode
(
CURRENT_URL
.
"/index/getWxInfoV2"
);
}
else
{
$userInfo
=
$this
->
_wxApi
->
getUserInfoByAccessToken
(
$code
);
dump
(
$userInfo
);
...
...
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