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
17c4f1de
Commit
17c4f1de
authored
Jun 19, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9db153d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
WxCallbackUntils.php
application/api/untils/WxCallbackUntils.php
+7
-7
Index.php
application/app_broker/controller/Index.php
+9
-7
No files found.
application/api/untils/WxCallbackUntils.php
View file @
17c4f1de
...
...
@@ -75,13 +75,13 @@ class WxCallbackUntils
$user_info
=
$this
->
curl
(
$user_info_url
,
$params
);
$user_info
=
json_decode
(
$user_info
);
$data
=
array
(
'wx_open_id'
=>
$open_id
,
'buyer_nick'
=>
$user_info
->
nickname
,
'sex'
=>
$user_info
->
sex
,
'province'
=>
$user_info
->
province
,
'city'
=>
$user_info
->
city
,
'buyer_img'
=>
$user_info
->
headimgurl
,
'wx_union_id'
=>
$user_info
->
unionid
,
'wx_open_id'
=>
$open_id
,
'buyer_nick'
=>
$user_info
->
nickname
,
'sex'
=>
$user_info
->
sex
,
'province'
=>
$user_info
->
province
,
'city'
=>
$user_info
->
city
,
'buyer_img'
=>
$user_info
->
headimgurl
,
'wx_union_id'
=>
$user_info
->
unionid
,
);
session
(
"userInfo"
,
$data
);
return
$data
;
...
...
application/app_broker/controller/Index.php
View file @
17c4f1de
...
...
@@ -41,30 +41,32 @@ class Index
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
}
else
{
$userInfo
[
"source"
]
=
0
;
$wx_union_id
=
$userInfo
[
"wx_union_id"
];
$wx_union_id
=
$userInfo
[
"wx_union_id"
];
// 验证open_id是否已经存在,存在则更新
$wxInfoObj
=
$this
->
wxInfoModel
->
getWxInfoByOpenId
(
$wx_union_id
);
try
{
if
(
$wxInfoObj
&&
count
(
$wxInfoObj
)
>
0
)
{
$userInfo
[
"id"
]
=
$wxInfoObj
[
0
][
"id"
];
$id
=
$this
->
wxInfoModel
->
updateWxInfo
(
$userInfo
);
$id
=
$this
->
wxInfoModel
->
updateWxInfo
(
$userInfo
);
}
else
{
$id
=
$this
->
wxInfoModel
->
addWxInfo
(
$userInfo
);
}
}
catch
(
Exception
$exception
)
{
Log
::
record
(
"wx authorization error,msg:"
.
$exception
);
Log
::
record
(
"wx authorization error,msg:"
.
$exception
);
}
$conditions
[
"buyer_id"
]
=
$id
;
$fields
=
"id,user_nick,user_phone,user_pic,other_pic"
;
$user_info
=
$this
->
userModel
->
getUserByWhere
(
$conditions
,
$fields
);
if
(
count
(
$user_info
)
>
0
)
{
if
(
count
(
$user_info
)
>
0
)
{
//下载页
header
(
CURRENT_URL
.
"app/download_c"
);
echo
111111
;
header
(
"Location:"
.
CURRENT_URL
.
"app/download_c"
);
die
();
}
else
{
}
else
{
//绑定页
header
(
CURRENT_URL
.
"app/dist/index.html#/inviteRegister?referrer_id=160&referrer_source=10"
);
header
(
"Location:"
.
CURRENT_URL
.
"app/dist/index.html#/inviteRegister?referrer_id=160&referrer_source=10"
);
die
();
}
}
...
...
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