Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
b86782b9348e725a89699a2b1688c3fdd0ed6cd6
1 parent
7f0161a0
修复未登录选择的商品同步到登陆账户
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
library/LibModels/Wap/Passport/LoginData.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
library/LibModels/Wap/Passport/LoginData.php
View file @
b86782b
...
...
@@ -24,15 +24,21 @@ class LoginData
* @param string $area 地区编号
* @param string $profile 邮箱或手机号
* @param string $password 密码
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
* @return array
*/
public
static
function
signin
(
$area
,
$profile
,
$password
)
public
static
function
signin
(
$area
,
$profile
,
$password
,
$shoppingKey
=
null
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.passport.signin'
;
$param
[
'area'
]
=
$area
;
$param
[
'profile'
]
=
$profile
;
$param
[
'password'
]
=
$password
;
if
(
!
empty
(
$shoppingKey
))
{
$param
[
'shopping_key'
]
=
$shoppingKey
;
}
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
post
(
Yohobuy
::
API_URL
,
$param
);
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
b86782b
...
...
@@ -124,7 +124,9 @@ class LoginController extends AbstractAction
}
/* 调用登录接口进行登录 */
$data
=
LoginData
::
signin
(
$area
,
$profile
,
$password
);
// 获取未登录时的唯一识别码
$shoppingKey
=
Helpers
::
getShoppingKeyByCookie
();
$data
=
LoginData
::
signin
(
$area
,
$profile
,
$password
,
$shoppingKey
);
if
(
!
isset
(
$data
[
'code'
])
||
$data
[
'code'
]
!=
200
||
!
isset
(
$data
[
'data'
][
'uid'
]))
{
break
;
}
...
...
Please
register
or
login
to post a comment