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
abb5b1f3
Commit
abb5b1f3
authored
Nov 16, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
ff762813
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
WxCallbackUntils.php
application/api/untils/WxCallbackUntils.php
+5
-0
Broker.php
application/api_broker/controller/Broker.php
+1
-1
ShareShop.php
application/index/controller/ShareShop.php
+5
-16
No files found.
application/api/untils/WxCallbackUntils.php
View file @
abb5b1f3
<?php
namespace
app\api\untils
;
use
think\Log
;
/**
* 微信接口api
...
...
@@ -43,6 +44,7 @@ class WxCallbackUntils
*/
public
function
getWxCode
(
$redirect_url
)
{
Log
::
record
(
$redirect_url
,
'rizhiheiheihei'
);
//记录日志
$redirect_url
=
urlencode
(
$redirect_url
);
$url
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
.
$this
->
appId
.
"&redirect_uri="
.
$redirect_url
.
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
;
...
...
@@ -101,6 +103,8 @@ class WxCallbackUntils
}
/**
* 静默授权,用户无感知
* @param $redirect_url
...
...
@@ -126,6 +130,7 @@ class WxCallbackUntils
return
$open_id
;
}
public
function
curl
(
$url
,
$data
=
[])
{
$ch
=
curl_init
();
...
...
application/api_broker/controller/Broker.php
View file @
abb5b1f3
...
...
@@ -426,7 +426,7 @@ class Broker extends Basic
/**
* 客户动态展示加搜索加客户详情
*
*
APP客户详情
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
...
...
application/index/controller/ShareShop.php
View file @
abb5b1f3
...
...
@@ -28,7 +28,7 @@ class ShareShop extends Basic
parent
::
__construct
();
$this
->
_wxApi
=
new
WxCallbackUntils
();
$this
->
wxInfoModel
=
new
UWxInfo
();
$this
->
url
=
CURRENT_URL
.
"
/
index/shareShop"
;
$this
->
url
=
CURRENT_URL
.
"index/shareShop"
;
}
public
function
shareShop
()
...
...
@@ -45,8 +45,7 @@ class ShareShop extends Basic
//dump($userInfo);exit;
if
(
!
$userInfo
[
'wx_open_id'
])
{
$this
->
_wxApi
->
getWxCode
(
$this
->
url
.
'?'
.
http_build_query
(
$params
));
}
}
else
{
$wx_union_id
=
$userInfo
[
'wx_union_id'
]
?
$userInfo
[
'wx_union_id'
]
:
$userInfo
[
'wx_open_id'
];
if
(
!
$userInfo
[
'wx_union_id'
]){
$userInfo
[
'wx_union_id'
]
=
$userInfo
[
'wx_open_id'
];
...
...
@@ -69,20 +68,10 @@ class ShareShop extends Basic
$params
[
'wx_union_id'
]
=
$wx_union_id
;
$params
[
'device_id'
]
=
$this
->
createOrderNumber
();
}
}
/* $data = [
'id' => '1',
'housename' => '怡华苑路304号',
'user_tel' => '13918937741',
'user_name' => '于盼盼',
'share' => '1',
'client' => 'b',
'is_user' => true
];*/
dump
(
$params
);
}
}
dump
(
$wx_union_id
);
$this
->
assign
(
'data'
,
json_encode
(
$params
));
return
view
(
"share_detail"
);
...
...
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