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
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
004ac423b68b9106eeee0c7e1ff2d0518c3375a8
2 parents
f3ad7ced
ad7668f8
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
22 deletions
library/Api/Yohobuy.php
library/LibModels/Wap/Home/HelpData.php
library/Plugin/Helpers.php
template/m.yohobuy.com/actions/index/home/helpDetail.phtml → template/m.yohobuy.com/actions/index/home/help-detail.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
library/Api/Yohobuy.php
View file @
004ac42
...
...
@@ -23,15 +23,17 @@ class Yohobuy
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const
API_URL
=
'http://apih5.yoho.cn/'
;
const
API_URL2
=
'http://apih5.yoho.cn/'
;
const
SERVICE_URL
=
'http://serviceh5.yoho.cn/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
/* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const
API_URL
=
'http://testapi.yoho.cn:28078/'
;
const
SERVICE_URL
=
'http://testservice.yoho.cn:28077/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
const
API_OLD
=
'http://test2.open.yohobuy.com/'
;
/**
...
...
library/LibModels/Wap/Home/HelpData.php
View file @
004ac42
...
...
@@ -38,7 +38,7 @@ class HelpData
$param
[
'code'
]
=
$code
;
$param
[
'return_type'
]
=
'html'
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
post
(
Yohobuy
::
API_
URL
,
$param
,
true
);
return
Yohobuy
::
post
(
Yohobuy
::
API_
OLD
,
$param
,
true
);
}
...
...
library/Plugin/Helpers.php
View file @
004ac42
...
...
@@ -129,7 +129,7 @@ class Helpers
*/
public
static
function
getShoppingKeyByCookie
()
{
$cookie
=
isset
(
$_COOKIE
[
'_S
pk'
])
?
$_COOKIE
[
'_Spk
'
]
:
''
;
$cookie
=
isset
(
$_COOKIE
[
'_S
PK'
])
?
$_COOKIE
[
'_SPK
'
]
:
''
;
return
$cookie
;
}
...
...
template/m.yohobuy.com/actions/index/home/help
D
etail.phtml → template/m.yohobuy.com/actions/index/home/help
-d
etail.phtml
View file @
004ac42
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
004ac42
...
...
@@ -640,16 +640,13 @@ class HomeController extends AbstractAction
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
*
*/
public
function
ordersAction
()
{
// 审判跳转登录页
$this
->
auditJumpLogin
();
$backUrl
=
Helpers
::
url
(
'/home'
);
$this
->
setTitle
(
'我的订单'
);
$this
->
setNavHeader
(
'我的订单'
,
$backUrl
);
$this
->
setNavHeader
(
'我的订单'
,
Helpers
::
url
(
'/home'
)
);
$order
=
array
();
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
...
...
@@ -887,7 +884,7 @@ class HomeController extends AbstractAction
$this
->
setTitle
(
$caption
);
$this
->
setNavHeader
(
$caption
);
$this
->
_view
->
display
(
'help
D
etail'
,
array
(
$this
->
_view
->
display
(
'help
-d
etail'
,
array
(
'iHelp'
=>
Home\HelpModel
::
serviceDetail
(
$code
),
));
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
004ac42
...
...
@@ -71,7 +71,7 @@ class HomeModel
/**
* 设置选择的频道保存到浏览器COOKIE
* (已废弃,改成
JS
设置)
* (已废弃,改成
JS
设置)
*
* @param string $cookie
* @return void
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
004ac42
...
...
@@ -289,7 +289,6 @@ class IndexController extends AbstractAction
$this
->
go
(
Helpers
::
url
(
'/cart/index/index'
));
}
$cookieData
=
$this
->
getCookie
(
'order-info'
,
null
);
$uid
=
$this
->
getUid
(
true
);
$data
=
array
(
...
...
@@ -457,8 +456,8 @@ class IndexController extends AbstractAction
$result
=
CartModel
::
addToCart
(
$productSku
,
$buyNumber
,
$goodsType
,
$isEdit
,
$promotionId
,
$uid
,
$shoppingKey
);
// 设置加入购物车凭证到客户端浏览器
if
(
!
$shoppingKey
&&
isset
(
$result
[
'data'
][
'shopping_key'
]))
{
$this
->
setCookie
(
'_Spk'
,
$result
[
'data'
][
'shopping_key'
]);
if
(
empty
(
$shoppingKey
)
&&
isset
(
$result
[
'data'
][
'shopping_key'
]))
{
$this
->
setCookie
(
'_SPK'
,
$result
[
'data'
][
'shopping_key'
],
time
()
+
86400
*
360
);
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
004ac42
...
...
@@ -17,6 +17,10 @@ class LoginController extends AbstractAction
*/
public
function
indexAction
()
{
// 清除客户端
$this
->
setCookie
(
'_UID'
,
''
);
$this
->
setCookie
(
'_TOKEN'
,
''
);
$refer
=
$this
->
get
(
'refer'
);
if
(
!
empty
(
$refer
))
{
$this
->
setCookie
(
'refer'
,
$refer
);
...
...
@@ -61,7 +65,6 @@ class LoginController extends AbstractAction
$data
[
'isPassportPage'
]
=
true
;
// 模板中模块标识
$data
[
'areaCode'
]
=
'+86'
;
// 默认区号
$data
[
'countrys'
]
=
RegData
::
getAreasData
();
// 地区信息列表
// 渲染模板
$this
->
_view
->
display
(
'international'
,
$data
);
}
...
...
@@ -74,6 +77,7 @@ class LoginController extends AbstractAction
// 清除客户端
$this
->
setCookie
(
'_UID'
,
''
);
$this
->
setCookie
(
'_TOKEN'
,
''
);
$this
->
setCookie
(
'_SPK'
,
''
);
// 清除服务端会话
$this
->
setSession
(
'_TOKEN'
,
''
);
...
...
@@ -148,7 +152,7 @@ class LoginController extends AbstractAction
public
function
alipayAction
()
{
$this
->
setSession
(
'_TOKEN'
,
''
);
Factory
::
create
(
'alipay'
)
->
getAuthorizeUrl
();
exit
();
...
...
@@ -160,7 +164,7 @@ class LoginController extends AbstractAction
public
function
qqAction
()
{
$this
->
setSession
(
'_TOKEN'
,
''
);
Factory
::
create
(
'qqconnect'
)
->
getAuthorizeUrl
();
exit
();
...
...
@@ -172,7 +176,7 @@ class LoginController extends AbstractAction
public
function
sinaAction
()
{
$this
->
setSession
(
'_TOKEN'
,
''
);
$this
->
go
(
Factory
::
create
(
'sinaweibo'
)
->
getAuthorizeUrl
());
}
...
...
Please
register
or
login
to post a comment