Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
4dcf9581
Commit
4dcf9581
authored
Sep 27, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消微信绑定时取消小程序绑定关系
parent
4b78cbc9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
Member.php
application/controllers/Member.php
+6
-3
User.php
application/controllers/User.php
+1
-8
Abstract.php
application/library/Our/Controller/Abstract.php
+10
-0
No files found.
application/controllers/Member.php
View file @
4dcf9581
...
...
@@ -58,11 +58,14 @@ class MemberController extends \Our\Controller_AbstractApi {
* 取消第三方绑定
*/
public
function
cancelBindingAction
(){
$data
=
$this
->
req
[
\Our\NameConst
::
data
];
$this
->
memberService
->
cancelBinding
(
$data
,
$this
->
memberId
);
if
(
$data
[
'userType'
]
==
\Our\ApiConst
::
userFromWx
){
$userToken
=
$this
->
memberService
->
getWxUserToken
(
$this
->
memberId
);
if
(
!
empty
(
$userToken
)){
$this
->
updateOldLoginKey
(
$userToken
);
}
}
$this
->
success
(
new
stdClass
(),
\Our\DescribeConst
::
cancelBindingSuccess
,
\Our\DescribeConst
::
cancelBindingSuccess
);
}
...
...
application/controllers/User.php
View file @
4dcf9581
...
...
@@ -18,14 +18,7 @@ class UserController extends \Our\Controller_AbstractIndex {
$login
=
LoginV2Model
::
getInstance
();
echo
$login
->
login
();
}
private
function
updateOldLoginKey
(
$token
){
$params
[
'authSign'
]
=
md5
(
$token
.
\Our\SecretKeys
::
authKey
);
$params
[
'key'
]
=
$token
;
$paramsStr
=
http_build_query
(
$params
);
$domain
=
Bootstrap
::
getUrlIniConfig
(
'resourcesHost'
);
$getUrl
=
$domain
.
\Our\PathConst
::
authInfoOtherLogin
.
'?'
.
$paramsStr
;
file_get_contents
(
$getUrl
);
}
/**
* 用户登录
*
...
...
application/library/Our/Controller/Abstract.php
100755 → 100644
View file @
4dcf9581
...
...
@@ -96,4 +96,14 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract {
[
NameConst
::
pageSize
]
:
(
$pageSize
>
0
?
$pageSize
:
ApiConst
::
pageSize
);
}
protected
function
updateOldLoginKey
(
$token
){
$params
[
'authSign'
]
=
md5
(
$token
.
\Our\SecretKeys
::
authKey
);
$params
[
'key'
]
=
$token
;
$paramsStr
=
http_build_query
(
$params
);
$domain
=
\Bootstrap
::
getUrlIniConfig
(
'resourcesHost'
);
$getUrl
=
$domain
.
\Our\PathConst
::
authInfoOtherLogin
.
'?'
.
$paramsStr
;
file_get_contents
(
$getUrl
);
}
}
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