SideData.php
1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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);
}
}