Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
f8b01faf8e398c2155b3c1a7804e1c759aad409f
2 parents
3a8bc8e6
bca9775a
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
538 additions
and
407 deletions
library/Action/AbstractAction.php
library/LibModels/Wap/Home/SideData.php
yohobuy/m.yohobuy.com/application/controllers/Boys.php
yohobuy/m.yohobuy.com/application/controllers/Girls.php
yohobuy/m.yohobuy.com/application/controllers/Index.php
yohobuy/m.yohobuy.com/application/controllers/Kids.php
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php
library/Action/AbstractAction.php
View file @
f8b01fa
...
...
@@ -15,6 +15,7 @@ namespace Action;
use
Yaf\Controller_Abstract
;
use
Yaf\Dispatcher
;
use
Hood\Cache
;
use
LibModels\Wap\Home\SideData
;
class
AbstractAction
extends
Controller_Abstract
{
...
...
@@ -261,5 +262,78 @@ class AbstractAction extends Controller_Abstract
$this
->
_view
->
assign
(
'footer'
,
$footer
);
}
/**
* 设置侧边栏信息
*
* @param string $guangChoosed 逛默认选中项 "all"表示全部,"boys":只看男生,"girls":只看女生
* @return void
*/
protected
function
setNavSide
(
$guangChoosed
=
'all'
)
{
$this
->
_view
->
assign
(
'subNav'
,
array
(
0
=>
array
(
'textCn'
=>
'男生'
,
'textEn'
=>
'BOYS'
,
'styleClass'
=>
'boys'
,
'url'
=>
'/boys.html'
,
),
1
=>
array
(
'textCn'
=>
'女生'
,
'textEn'
=>
'GIRLS'
,
'styleClass'
=>
'girls'
,
'url'
=>
'/girls.html'
,
),
2
=>
array
(
'textCn'
=>
'潮童'
,
'textEn'
=>
'KIDS'
,
'styleClass'
=>
'kids'
,
'url'
=>
'/kids.html'
,
),
3
=>
array
(
'textCn'
=>
'创意生活'
,
'textEn'
=>
'LIFE STYLE'
,
'styleClass'
=>
'life'
,
'url'
=>
'/life.html'
,
),
4
=>
array
(
'textCn'
=>
'逛'
,
'textEn'
=>
'TRENDFINDER'
,
'styleClass'
=>
'guang'
,
'url'
=>
'/guang.html'
,
'subNav'
=>
array
(
'list'
=>
array
(
0
=>
array
(
'textCn'
=>
'逛'
,
'textEn'
=>
'TrendFinder'
,
'back'
=>
true
,
'isSelect'
=>
false
,
),
1
=>
array
(
'textCn'
=>
'查看全部'
,
'textEn'
=>
''
,
'back'
=>
false
,
'isSelect'
=>
(
$guangChoosed
===
'all'
)
?
true
:
false
,
'url'
=>
'/guang/list/index?gender=1,2,3'
),
2
=>
array
(
'textCn'
=>
'只看男生'
,
'textEn'
=>
'Boys'
,
'back'
=>
false
,
'isSelect'
=>
(
$guangChoosed
===
'boys'
)
?
true
:
false
,
'url'
=>
'/guang/list/index?gender=1,3'
),
3
=>
array
(
'textCn'
=>
'只看女生'
,
'textEn'
=>
'Girls'
,
'back'
=>
false
,
'isSelect'
=>
(
$guangChoosed
===
'girls'
)
?
true
:
false
,
'url'
=>
'/guang/list/index?gender=2,3'
,
),
)
)
),
));
}
}
...
...
library/LibModels/Wap/Home/SideData.php
0 → 100644
View file @
f8b01fa
<?php
namespace
LibModels\Wap\Home
;
use
Api\Sign
;
use
Api\Yohobuy
;
/**
* 侧边栏的数据模型
*
* @name SideData
* @package LibModels/Wap/Home
* @copyright yoho.inc
* @version 1.0 (2015-10-13 17:42:27)
* @author fei.hong <fei.hong@yoho.cn>
*/
class
SideData
{
const
URI_LEFTNAV_ENTRANCE
=
'operations/api/v5/entrance/getEntrance'
;
const
URI_LEFTNAV_CATEGORY
=
'operations/api/v5/category/getCategory'
;
/**
* 左侧边栏的分类和图标数据
*
* 备注:暂不使用,因很少变,获取后还需要再封装
*
* @return array
*/
public
static
function
leftNav
()
{
$param
=
Yohobuy
::
param
();
$param
[
'client_type'
]
=
'iphone'
;
// 因安卓不返回icon的地址
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
$query
=
Yohobuy
::
httpBuildQuery
(
''
,
$param
);
$urlList
=
array
();
$urlList
[
'getEntrance'
]
=
Yohobuy
::
SERVICE_URL
.
self
::
URI_LEFTNAV_ENTRANCE
.
$query
;
$urlList
[
'getCategory'
]
=
Yohobuy
::
SERVICE_URL
.
self
::
URI_LEFTNAV_CATEGORY
.
$query
;
return
Yohobuy
::
getMulti
(
$urlList
);
// $param = Yohobuy::param();
// $param['client_secret'] = Sign::getSign($param);
//
// return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param);
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Boys.php
View file @
f8b01fa
...
...
@@ -10,6 +10,9 @@ class BoysController extends AbstractAction
public
function
indexAction
()
{
// 显示侧边栏
$this
->
setNavSide
();
// 频道数据
$channelData
=
Index
::
getUserChannelData
(
0
,
'1,3'
,
'201504091403001'
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
f8b01fa
...
...
@@ -2,6 +2,7 @@
use
Action\AbstractAction
;
use
LibModels\Wap\Home\IndexData
as
Index
;
/**
* 女生首页
*/
...
...
@@ -10,14 +11,17 @@ class GirlsController extends AbstractAction
public
function
indexAction
()
{
$data
=
array
(
// 显示侧边栏
$this
->
setNavSide
();
$data
=
array
(
'headerDownload'
=>
array
(
'img'
=>
'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480'
,
'url'
=>
'http://www.baidu.com'
'url'
=>
'http://www.baidu.com'
),
'homeHeader'
=>
array
(
'bgColor'
=>
'#FF88AE'
,
'searchUrl'
=>
''
'searchUrl'
=>
''
),
'searchUrl'
=>
''
,
'sideNav'
=>
array
(
...
...
@@ -50,352 +54,344 @@ class GirlsController extends AbstractAction
'textEn'
=>
'TRENDFINDER'
,
'icon'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'subNav'
=>
array
(
'list'
=>
array
(
array
(
'textCn'
=>
'逛'
,
'textEn'
=>
'TrendFinder'
,
'back'
=>
true
,
'bgColor'
=>
'#fd307f'
),
array
(
'textCn'
=>
'查看全部'
,
'url'
=>
''
),
array
(
'textCn'
=>
'只看男生'
,
'textEn'
=>
'Boys'
,
'url'
=>
''
),
array
(
'textCn'
=>
'只看女生'
,
'textEn'
=>
'Girls'
,
'url'
=>
''
,
'isSelect'
=>
true
)
)
)
)
),
'content'
=>
array
(
'bannerTop'
=>
array
(
'list'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
)
)
),
'iconsEnter'
=>
array
(
'list'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'新品到着'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'全球优选'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'明星潮牌'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'全部品类'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'逛'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'搭配指南'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'潮品推荐'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'折扣精选'
)
)
),
'hotCategory'
=>
array
(
'img'
=>
'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480'
,
'url'
=>
'http://www.baidu.com'
,
'list'
=>
array
(
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
'list'
=>
array
(
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
'textCn'
=>
'逛'
,
'textEn'
=>
'TrendFinder'
,
'back'
=>
true
,
'bgColor'
=>
'#fd307f'
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
'textCn'
=>
'查看全部'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
'textCn'
=>
'只看男生'
,
'textEn'
=>
'Boys'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'hotBrandsScroll'
=>
array
(
'name'
=>
'热门品牌'
,
'list'
=>
array
(
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'hotBrands'
=>
array
(
'name'
=>
'热门品牌'
,
'more'
=>
'www.baidu.com'
,
'brands'
=>
array
(
array
(
'name'
=>
'Front Row Shop'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'dress lab'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'DEVIL NUT'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'casselini'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'haso'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
'textCn'
=>
'只看女生'
,
'textEn'
=>
'Girls'
,
'url'
=>
''
,
'isSelect'
=>
true
)
)
)
)
),
'content'
=>
array
(
'bannerTop'
=>
array
(
'list'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
)
)
),
'iconsEnter'
=>
array
(
'list'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'新品到着'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'全球优选'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'明星潮牌'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'全部品类'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'逛'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'搭配指南'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'潮品推荐'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
,
'text'
=>
'折扣精选'
)
)
),
'hotCategory'
=>
array
(
'img'
=>
'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480'
,
'url'
=>
'http://www.baidu.com'
,
'list'
=>
array
(
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'打底衫'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'hotBrandsScroll'
=>
array
(
'name'
=>
'热门品牌'
,
'list'
=>
array
(
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'textCn'
=>
'Moussy'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'hotBrands'
=>
array
(
'name'
=>
'热门品牌'
,
'more'
=>
'www.baidu.com'
,
'brands'
=>
array
(
array
(
'name'
=>
'Front Row Shop'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'dress lab'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'DEVIL NUT'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'casselini'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'haso'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'name'
=>
'EVISU'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'trendColloaction'
=>
array
(
'name'
=>
'潮人 ▪ 搭配'
,
'more'
=>
''
,
'leftspan'
=>
array
(
'url'
=>
''
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
),
'rightspan'
=>
array
(
'url'
=>
''
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
),
'recommendlist'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'trendTopics'
=>
array
(
'name'
=>
'潮品 ▪ 话题'
,
'more'
=>
''
,
'list'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
)
)
),
'goodsCategory'
=>
array
(
'name'
=>
'经典裤装'
,
'more'
=>
''
,
'banner'
=>
array
(
'list'
=>
array
(
array
(
'name'
=>
'EVISU'
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'trendColloaction'
=>
array
(
'name'
=>
'潮人 ▪ 搭配'
,
'more'
=>
''
,
'leftspan'
=>
array
(
'url'
=>
''
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
),
'rightspan'
=>
array
(
'url'
=>
''
,
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
),
'recommendlist'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'trendTopics'
=>
array
(
'name'
=>
'潮品 ▪ 话题'
,
'more'
=>
''
,
'list'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'title'
=>
'现代裁剪'
,
'time'
=>
'2月13日 12:34'
)
)
),
'goodsCategory'
=>
array
(
'name'
=>
'经典裤装'
,
'more'
=>
''
,
'banner'
=>
array
(
'list'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
)
)
),
'list'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'手表'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'烛台'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'围巾'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'盘子'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'耳机'
)
)
)
),
'url'
=>
''
)
)
),
'list'
=>
array
(
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'手表'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'烛台'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'围巾'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'盘子'
),
array
(
'img'
=>
'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
,
'url'
=>
''
,
'textCn'
=>
'耳机'
)
)
)
));
// 频道数据
$channelData
=
Index
::
getUserChannelData
(
0
,
'2,3'
,
'201504091403002'
);
// 频道数据
$channelData
=
Index
::
getUserChannelData
(
0
,
'2,3'
,
'201504091403002'
);
echo
'<pre>'
;
print_r
(
$channelData
);
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'index'
,
$data
);
echo
'<pre>'
;
print_r
(
$channelData
);
// // 频道数据
// $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'index'
,
$data
);
// echo '<pre>';
// print_r($channelData);
// $this->_view->assign('title', 'YOHO!有货');
// $this->_view->display('girls', compact('channelData'));
// // 频道数据
// $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
// echo '<pre>';
// print_r($channelData);
// $this->_view->assign('title', 'YOHO!有货');
// $this->_view->display('girls', compact('channelData'));
}
}
\ No newline at end of file
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Index.php
View file @
f8b01fa
<?php
use
Action\AbstractAction
;
use
LibModels\Wap\Home\IndexData
;
...
...
@@ -8,31 +9,29 @@ use LibModels\Wap\Home\IndexData;
class
IndexController
extends
AbstractAction
{
/**
* 启动首页频道选择
*/
/**
* 启动首页频道选择
*/
public
function
indexAction
()
{
// 启动滚动图
$startBannerData
=
IndexData
::
getBannerStart
();
$startBanner
=
array
();
if
(
$startBannerData
[
'code'
]
==
200
)
{
foreach
(
$startBannerData
[
'data'
]
as
$single
)
{
$startBanner
=
$single
[
'data'
];
}
}
// 启动频道数据
$homeChannels
=
IndexData
::
getHomeChannels
();
// 用户个人信息
$userProfile
=
IndexData
::
getUserProfile
(
0
);
// 启动滚动图
$startBannerData
=
IndexData
::
getBannerStart
();
$startBanner
=
array
();
if
(
$startBannerData
[
'code'
]
==
200
)
{
foreach
(
$startBannerData
[
'data'
]
as
$single
)
{
$startBanner
=
$single
[
'data'
];
}
}
// 启动频道数据
$homeChannels
=
IndexData
::
getHomeChannels
();
// 用户个人信息
$userProfile
=
IndexData
::
getUserProfile
(
0
);
/*echo '<pre>';
var_dump($homeChannels);exit;*/
/* echo '<pre>';
var_dump($homeChannels);exit; */
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'index'
,
compact
(
'startBanner'
,
'homeChannels'
,
'userProfile'
));
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'index'
,
compact
(
'startBanner'
,
'homeChannels'
,
'userProfile'
));
}
}
\ No newline at end of file
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Kids.php
View file @
f8b01fa
...
...
@@ -18,5 +18,8 @@ class KidsController extends AbstractAction
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'kids'
,
compact
(
'channelData'
));
// 显示侧边栏
$this
->
setNavSide
();
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
View file @
f8b01fa
...
...
@@ -2,6 +2,7 @@
use
Action\AbstractAction
;
use
LibModels\Wap\Home\IndexData
as
Index
;
/**
* 创意生活首页
*/
...
...
@@ -10,14 +11,17 @@ class LifestyleController extends AbstractAction
public
function
indexAction
()
{
// 频道数据
$channelData
=
Index
::
getUserChannelData
(
0
,
'1,3'
,
'9aa25f5133f011ec96c2045eb15ae425'
);
// 频道数据
$channelData
=
Index
::
getUserChannelData
(
0
,
'1,3'
,
'9aa25f5133f011ec96c2045eb15ae425'
);
echo
'<pre>'
;
print_r
(
$channelData
);
echo
'<pre>'
;
print_r
(
$channelData
);
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'lifestyle'
,
compact
(
'channelData'
));
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
$this
->
_view
->
display
(
'lifestyle'
,
compact
(
'channelData'
));
// 显示侧边栏
$this
->
setNavSide
();
}
}
\ No newline at end of file
}
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
View file @
f8b01fa
...
...
@@ -51,7 +51,7 @@ class PlusstarController extends AbstractAction
// 情况2: 单张图
elseif
(
isset
(
$star
[
'data'
][
0
]))
{
$build
[
'url'
]
=
$star
[
'data'
][
0
][
'url'
];
$build
[
'img'
]
=
$star
[
'data'
][
0
][
'src'
]
;
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$star
[
'data'
][
0
][
'src'
],
640
,
310
)
;
$data
[
'ps'
][
'star'
][]
=
$build
;
}
}
...
...
@@ -82,7 +82,7 @@ class PlusstarController extends AbstractAction
}
}
}
$this
->
_view
->
display
(
'list'
,
$data
);
$brandList
=
array
();
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
f8b01fa
...
...
@@ -76,8 +76,8 @@ class LoginController extends AbstractAction
/**
* 登录操作
*
* @param string area 地区编号, 不需要+号
* @param string profile 账号(邮箱或手机号)
* @param string areaCode 地区编号, 不需要+号
* @param string account 账号(邮箱或手机号)
* @param string password 密码
* @return json
*/
...
...
@@ -92,8 +92,8 @@ class LoginController extends AbstractAction
}
/* 判断参数是否传递 */
$area
=
$this
->
post
(
'area'
,
'86'
);
$profile
=
$this
->
post
(
'profile'
);
$area
=
$this
->
post
(
'areaCode'
,
'86'
);
$profile
=
$this
->
post
(
'account'
);
$password
=
$this
->
post
(
'password'
);
if
(
!
is_numeric
(
$area
)
||
empty
(
$profile
)
||
empty
(
$password
))
{
break
;
...
...
@@ -109,6 +109,9 @@ class LoginController extends AbstractAction
/* 调用登录接口进行登录 */
$data
=
LoginData
::
signin
(
$area
,
$profile
,
$password
);
if
(
$data
[
'code'
]
==
200
)
{
$data
[
'data'
]
=
'/'
;
// @todo
}
}
while
(
false
);
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php
View file @
f8b01fa
...
...
@@ -22,6 +22,7 @@ class RegController extends AbstractAction
$data
[
'headerText'
]
=
'注册'
;
$data
[
'isPassportPage'
]
=
true
;
$data
[
'countrys'
]
=
array
();
$data
[
'areaCode'
]
=
'+86'
;
// 获取地区数据列表
$area
=
RegData
::
getAreasData
();
...
...
@@ -52,15 +53,15 @@ class RegController extends AbstractAction
/**
* 验证码
*
* @param string area 地区编号
* @param string mobile 手机号
* @param string areaCode 地区编号
* @param string phoneNum 手机号
* @param string token 访问TOKEN凭证
*/
public
function
codeAction
()
{
$token
=
$this
->
get
(
'token'
);
$mobile
=
$this
->
get
(
'mobile'
);
$area
=
$this
->
get
(
'area'
,
'86'
);
$mobile
=
$this
->
get
(
'phoneNum'
);
$area
=
$this
->
get
(
'areaCode'
,
'86'
);
// 判断是否允许访问, 不允许则跳转到错误页面
if
(
!
is_string
(
$token
)
||
!
is_numeric
(
$mobile
)
||
!
Helpers
::
verifyToken
(
$mobile
,
$token
))
{
...
...
@@ -74,7 +75,7 @@ class RegController extends AbstractAction
$data
[
'backUrl'
]
=
'/'
;
$data
[
'headerText'
]
=
'注册'
;
$data
[
'isPassportPage'
]
=
true
;
$data
[
'areaCode'
]
=
$area
;
$data
[
'areaCode'
]
=
'+'
.
$area
;
$data
[
'phoneNum'
]
=
$mobile
;
$data
[
'token'
]
=
$token
;
...
...
@@ -84,15 +85,15 @@ class RegController extends AbstractAction
/**
* 填写密码页面
*
* @param string area 地区编号
* @param string mobile 手机号
* @param string areaCode 地区编号
* @param string phoneNum 手机号
* @param string token 访问TOKEN凭证
*/
public
function
passwordAction
()
{
$token
=
$this
->
get
(
'token'
);
$mobile
=
$this
->
get
(
'mobile'
);
$area
=
$this
->
get
(
'area'
,
'86'
);
$mobile
=
$this
->
get
(
'phoneNum'
);
$area
=
$this
->
get
(
'areaCode'
,
'86'
);
// 判断是否允许访问, 不允许则跳转到错误页面
if
(
!
is_string
(
$token
)
||
!
is_numeric
(
$mobile
)
||
!
is_numeric
(
$area
)
...
...
@@ -117,13 +118,13 @@ class RegController extends AbstractAction
/**
* 验证注册的手机号
*
* @param string area 地区编号,注意不需要+号
* @param string mobile 手机号
* @param string areaCode 地区编号,注意不需要+号
* @param string phoneNum 手机号
* @return json
*/
public
function
verifymobileAction
()
{
$data
=
array
(
'code'
=>
400
,
'message'
=>
'
参数不正确!
'
,
'data'
=>
''
);
$data
=
array
(
'code'
=>
400
,
'message'
=>
'
手机号已存在
'
,
'data'
=>
''
);
do
{
/* 判断是不是AJAX请求 */
...
...
@@ -131,8 +132,8 @@ class RegController extends AbstractAction
break
;
}
$mobile
=
$this
->
post
(
'mobile'
);
$area
=
$this
->
post
(
'area'
,
'86'
);
$mobile
=
$this
->
post
(
'phoneNum'
);
$area
=
$this
->
post
(
'areaCode'
,
'86'
);
/* 判断参数是否合法 */
if
(
!
is_numeric
(
$mobile
)
||
!
is_numeric
(
$area
))
{
break
;
...
...
@@ -147,7 +148,7 @@ class RegController extends AbstractAction
/* 返回跳转到验证页面的链接*/
if
(
$data
[
'code'
]
==
200
)
{
$token
=
Helpers
::
makeToken
(
$mobile
);
$data
[
'data'
]
=
'/passport/reg/code?token='
.
$token
.
'&
mobile='
.
$mobile
.
'&area
='
.
$area
;
$data
[
'data'
]
=
'/passport/reg/code?token='
.
$token
.
'&
phoneNum='
.
$mobile
.
'&areaCode
='
.
$area
;
}
}
while
(
false
);
...
...
@@ -158,15 +159,15 @@ class RegController extends AbstractAction
/**
* 验证注册的识别码
*
* @param string area 地区编号,注意不需要+号
* @param string mobile 手机号
* @param string areaCode 地区编号,注意不需要+号
* @param string phoneNum 手机号
* @param string token 访问TOKEN凭证
* @param int code 验证码, 手机上收到的
* @return json
*/
public
function
verifycodeAction
()
{
$data
=
array
(
'code'
=>
400
,
'message'
=>
'
参数不正确!
'
,
'data'
=>
''
);
$data
=
array
(
'code'
=>
400
,
'message'
=>
'
验证码不正确
'
,
'data'
=>
''
);
do
{
/* 判断是不是AJAX请求 */
...
...
@@ -174,8 +175,8 @@ class RegController extends AbstractAction
break
;
}
$mobile
=
$this
->
post
(
'mobile'
);
$area
=
$this
->
post
(
'area'
);
$mobile
=
$this
->
post
(
'phoneNum'
);
$area
=
$this
->
post
(
'areaCode'
);
$code
=
$this
->
post
(
'code'
);
/* 判断参数是否合法 */
if
(
!
is_numeric
(
$mobile
)
||
!
is_numeric
(
$area
)
||
!
isset
(
$code
))
{
...
...
@@ -191,7 +192,7 @@ class RegController extends AbstractAction
/* 返回跳转到设置密码的链接*/
if
(
$data
[
'code'
]
==
200
)
{
$token
=
Helpers
::
makeToken
(
$mobile
);
$data
[
'data'
]
=
'/passport/reg/password?token='
.
$token
.
'&
mobile='
.
$mobile
.
'&area
='
.
$area
;
$data
[
'data'
]
=
'/passport/reg/password?token='
.
$token
.
'&
phoneNum='
.
$mobile
.
'&areaCode
='
.
$area
;
}
}
while
(
false
);
...
...
@@ -202,8 +203,8 @@ class RegController extends AbstractAction
/**
* 发送验证码
*
* @param string area 地区编号,注意不需要+号
* @param string mobile 手机号
* @param string areaCode 地区编号,注意不需要+号
* @param string phoneNum 手机号
* @return json
*/
public
function
sendcodeAction
()
...
...
@@ -216,8 +217,8 @@ class RegController extends AbstractAction
break
;
}
$mobile
=
$this
->
post
(
'mobile'
);
$area
=
$this
->
post
(
'area'
,
'86'
);
$mobile
=
$this
->
post
(
'phoneNum'
);
$area
=
$this
->
post
(
'areaCode'
,
'86'
);
/* 判断参数是否合法 */
if
(
!
is_numeric
(
$mobile
)
||
!
is_numeric
(
$area
))
{
break
;
...
...
@@ -237,8 +238,8 @@ class RegController extends AbstractAction
/**
* 设置密码
*
* @param string area 地区编号,注意不需要+号
* @param string mobile 手机号
* @param string areaCode 地区编号,注意不需要+号
* @param string phoneNum 手机号
* @param string token 访问TOKEN凭证
* @param string password 用户设置的密码
* @return json
...
...
@@ -254,8 +255,8 @@ class RegController extends AbstractAction
}
$token
=
$this
->
post
(
'token'
);
$mobile
=
$this
->
post
(
'mobile'
);
$area
=
$this
->
post
(
'area'
);
$mobile
=
$this
->
post
(
'phoneNum'
);
$area
=
$this
->
post
(
'areaCode'
);
$password
=
$this
->
post
(
'password'
);
/* 判断参数是否合法 */
if
(
!
is_string
(
$token
)
||
!
is_numeric
(
$mobile
)
||
!
is_numeric
(
$area
)
||
!
isset
(
$password
))
{
...
...
@@ -275,7 +276,7 @@ class RegController extends AbstractAction
/* 返回跳转到来源页面 */
if
(
$data
[
'code'
]
==
200
)
{
$data
[
'data'
]
=
'/
passport/reg/password?token='
.
$token
.
'&mobile='
.
$mobile
.
'&area='
.
$area
;
$data
[
'data'
]
=
'/
'
;
}
}
while
(
false
);
...
...
Please
register
or
login
to post a comment