Authored by yangyang

频道选择页写了一半,等待继续

<?php
namespace LibModels\Wap\Index;
use Api\Sign;
use Api\Yohobuy;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of IndexChannel
*
* @author Administrator
*/
class IndexData {
public static function channelData()
{
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
print_r($param);
Yohobuy::post('http://service.api.yohobuy.com/operations/api/v5/entrance/getEntrance',$param);
}
}
... ...
... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use Plugin\Helpers;
use LibModels\Wap\Index\IndexData;
/**
* 频道选择
... ... @@ -14,16 +15,16 @@ class IndexController extends AbstractAction
*/
public function indexAction()
{
if (null !== $this->get('go')) {
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
Index\HomeModel::goSwitchChannel();
} else {
// 设置客户端浏览器1小时内不改变,
$this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
// 设置浏览器缓存5分钟
$this->setExpires(300);
}
// if (null !== $this->get('go')) {
// // 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
// Index\HomeModel::goSwitchChannel();
// } else {
// // 设置客户端浏览器1小时内不改变,
// $this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
// // 设置浏览器缓存5分钟
// $this->setExpires(300);
// }
var_dump(IndexData::channelData());
// 渲染模板
$this->_view->display('index', array(
'background' => Index\HomeModel::getBgImage(),
... ...