Authored by Rock Zhang

修改频道页侧边栏数据获取接口地址以及返回的数据格式

Code Review By Rock Zhang
... ... @@ -18,7 +18,7 @@ class SideData
{
const URI_LEFTNAV_ENTRANCE = 'operations/api/v5/entrance/getEntrance';
const URI_LEFTNAV_CATEGORY = 'operations/api/v5/category/getCategory';
const URI_LEFTNAV_CATEGORY = 'operations/api/v6/category/getCategory';
/**
* 左侧边栏的分类和图标数据
... ... @@ -40,6 +40,7 @@ class SideData
$param = Yohobuy::param();
$param['client_type'] = 'h5'; // 调用H5手机网站的
$param['private_key'] = 'fd4ad5fcfa0de589ef238c0e7331b585'; // 调用Android的private_key不然会有参数验证错误的bug
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param);
... ...
... ... @@ -64,7 +64,8 @@ class SideModel
$subs[] = self::formatSideItem($oneSub);
}
$group[$groupKey]['subNav'] = $subs;
$group[$groupKey]['styleClass'] = 'guang';
$group[$groupKey]['subNav']['list'] = $subs;
}
$groupKey++;
... ... @@ -87,6 +88,7 @@ class SideModel
// 追加逛的子分类数据
$result[] = self::genLeftNavGuang($guangChoosed);
print_r($result);
return $result;
}
... ... @@ -109,40 +111,43 @@ class SideModel
$color = '#4f4138';
}
return array(
'textCn' => '逛',
'textEn' => 'TRENDFINDER',
'styleClass' => 'guang',
'subNav' => array(
'list' => array(
0 => array(
'textCn' => '逛',
'textEn' => 'TrendFinder',
'back' => true,
'isSelect' => false,
'bgColor' => $color,
),
1 => array(
'textCn' => '查看全部',
'textEn' => '',
'back' => false,
'isSelect' => ($guangChoosed === 'lifestyle' || $guangChoosed === 'kids') ? true : false,
'url' => Helpers::url('', array('gender' => '1,2,3'), 'guang')
),
2 => array(
'textCn' => '只看男生',
'textEn' => 'Boys',
'back' => false,
'isSelect' => ($guangChoosed === 'boys') ? true : false,
'url' => Helpers::url('', array('gender' => '1,3'), 'guang')
),
3 => array(
'textCn' => '只看女生',
'textEn' => 'Girls',
'back' => false,
'isSelect' => ($guangChoosed === 'girls') ? true : false,
'url' => Helpers::url('', array('gender' => '2,3'), 'guang')
),
return
array(
array(
'textCn' => '逛',
'textEn' => 'TRENDFINDER',
'styleClass' => 'guang',
'subNav' => array(
'list' => array(
0 => array(
'textCn' => '逛',
'textEn' => 'TrendFinder',
'back' => true,
'isSelect' => false,
'bgColor' => $color,
),
1 => array(
'textCn' => '查看全部',
'textEn' => '',
'back' => false,
'isSelect' => ($guangChoosed === 'lifestyle' || $guangChoosed === 'kids') ? true : false,
'url' => Helpers::url('', array('gender' => '1,2,3'), 'guang')
),
2 => array(
'textCn' => '只看男生',
'textEn' => 'Boys',
'back' => false,
'isSelect' => ($guangChoosed === 'boys') ? true : false,
'url' => Helpers::url('', array('gender' => '1,3'), 'guang')
),
3 => array(
'textCn' => '只看女生',
'textEn' => 'Girls',
'back' => false,
'isSelect' => ($guangChoosed === 'girls') ? true : false,
'url' => Helpers::url('', array('gender' => '2,3'), 'guang')
),
)
)
)
);
... ...