Authored by hf

do test login and register

... ... @@ -10,6 +10,9 @@ class BoysController extends AbstractAction
public function indexAction()
{
// 显示侧边栏
$this->setNavSide();
// 频道数据
$channelData = Index::getUserChannelData(0, '1,3', '201504091403001');
... ...
... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData as Index;
/**
* 女生首页
*/
... ... @@ -10,6 +11,9 @@ class GirlsController extends AbstractAction
public function indexAction()
{
// 显示侧边栏
$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',
... ... @@ -72,11 +76,9 @@ class GirlsController extends AbstractAction
'url' => '',
'isSelect' => true
)
)
)
)
),
'content' => array(
'bannerTop' => array(
... ... @@ -373,12 +375,7 @@ class GirlsController extends AbstractAction
)
)
)
),
));
// 频道数据
$channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
... ... @@ -391,11 +388,10 @@ class GirlsController extends AbstractAction
// // 频道数据
// $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
// echo '<pre>';
// print_r($channelData);
// $this->_view->assign('title', 'YOHO!有货');
// $this->_view->display('girls', compact('channelData'));
}
}
... ...
<?php
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData;
... ... @@ -16,25 +17,21 @@ class IndexController extends AbstractAction
// 启动滚动图
$startBannerData = IndexData::getBannerStart();
$startBanner = array();
if($startBannerData['code'] == 200)
{
foreach ($startBannerData['data'] as $single)
{
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->setNavSide();
}
}
... ...
... ... @@ -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
... ...
... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData as Index;
/**
* 创意生活首页
*/
... ... @@ -10,7 +11,6 @@ class LifestyleController extends AbstractAction
public function indexAction()
{
// 频道数据
$channelData = Index::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425');
... ... @@ -19,5 +19,9 @@ class LifestyleController extends AbstractAction
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('lifestyle', compact('channelData'));
// 显示侧边栏
$this->setNavSide();
}
}
... ...
... ... @@ -109,6 +109,9 @@ class LoginController extends AbstractAction
/* 调用登录接口进行登录 */
$data = LoginData::signin($area, $profile, $password);
if ($data['code'] == 200) {
$data['data'] = '/'; // @todo
}
} while (false);
... ...
... ... @@ -22,6 +22,7 @@ class RegController extends AbstractAction
$data['headerText'] = '注册';
$data['isPassportPage'] = true;
$data['countrys'] = array();
$data['areaCode'] = '+86';
// 获取地区数据列表
$area = RegData::getAreasData();
... ... @@ -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;
... ... @@ -123,7 +124,7 @@ class RegController extends AbstractAction
*/
public function verifymobileAction()
{
$data = array('code' => 400, 'message' => '参数不正确!', 'data' => '');
$data = array('code' => 400, 'message' => '手机号已存在', 'data' => '');
do {
/* 判断是不是AJAX请求 */
... ... @@ -166,7 +167,7 @@ class RegController extends AbstractAction
*/
public function verifycodeAction()
{
$data = array('code' => 400, 'message' => '参数不正确!', 'data' => '');
$data = array('code' => 400, 'message' => '验证码不正确', 'data' => '');
do {
/* 判断是不是AJAX请求 */
... ... @@ -275,7 +276,7 @@ class RegController extends AbstractAction
/* 返回跳转到来源页面 */
if ($data['code'] == 200) {
$data['data'] = '/passport/reg/password?token='.$token.'&phoneNum='.$mobile.'&areaCode='.$area;
$data['data'] = '/';
}
} while (false);
... ...