修改频道页侧边栏数据获取接口地址以及返回的数据格式
Code Review By Rock Zhang
Showing
2 changed files
with
9 additions
and
3 deletions
@@ -18,7 +18,7 @@ class SideData | @@ -18,7 +18,7 @@ class SideData | ||
18 | { | 18 | { |
19 | 19 | ||
20 | const URI_LEFTNAV_ENTRANCE = 'operations/api/v5/entrance/getEntrance'; | 20 | const URI_LEFTNAV_ENTRANCE = 'operations/api/v5/entrance/getEntrance'; |
21 | - const URI_LEFTNAV_CATEGORY = 'operations/api/v5/category/getCategory'; | 21 | + const URI_LEFTNAV_CATEGORY = 'operations/api/v6/category/getCategory'; |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * 左侧边栏的分类和图标数据 | 24 | * 左侧边栏的分类和图标数据 |
@@ -40,6 +40,7 @@ class SideData | @@ -40,6 +40,7 @@ class SideData | ||
40 | 40 | ||
41 | $param = Yohobuy::param(); | 41 | $param = Yohobuy::param(); |
42 | $param['client_type'] = 'h5'; // 调用H5手机网站的 | 42 | $param['client_type'] = 'h5'; // 调用H5手机网站的 |
43 | + $param['private_key'] = 'fd4ad5fcfa0de589ef238c0e7331b585'; // 调用Android的private_key不然会有参数验证错误的bug | ||
43 | $param['client_secret'] = Sign::getSign($param); | 44 | $param['client_secret'] = Sign::getSign($param); |
44 | 45 | ||
45 | return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param); | 46 | return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param); |
@@ -64,7 +64,8 @@ class SideModel | @@ -64,7 +64,8 @@ class SideModel | ||
64 | $subs[] = self::formatSideItem($oneSub); | 64 | $subs[] = self::formatSideItem($oneSub); |
65 | } | 65 | } |
66 | 66 | ||
67 | - $group[$groupKey]['subNav'] = $subs; | 67 | + $group[$groupKey]['styleClass'] = 'guang'; |
68 | + $group[$groupKey]['subNav']['list'] = $subs; | ||
68 | } | 69 | } |
69 | $groupKey++; | 70 | $groupKey++; |
70 | 71 | ||
@@ -87,6 +88,7 @@ class SideModel | @@ -87,6 +88,7 @@ class SideModel | ||
87 | 88 | ||
88 | // 追加逛的子分类数据 | 89 | // 追加逛的子分类数据 |
89 | $result[] = self::genLeftNavGuang($guangChoosed); | 90 | $result[] = self::genLeftNavGuang($guangChoosed); |
91 | + print_r($result); | ||
90 | 92 | ||
91 | return $result; | 93 | return $result; |
92 | } | 94 | } |
@@ -109,7 +111,9 @@ class SideModel | @@ -109,7 +111,9 @@ class SideModel | ||
109 | $color = '#4f4138'; | 111 | $color = '#4f4138'; |
110 | } | 112 | } |
111 | 113 | ||
112 | - return array( | 114 | + return |
115 | + array( | ||
116 | + array( | ||
113 | 'textCn' => '逛', | 117 | 'textCn' => '逛', |
114 | 'textEn' => 'TRENDFINDER', | 118 | 'textEn' => 'TRENDFINDER', |
115 | 'styleClass' => 'guang', | 119 | 'styleClass' => 'guang', |
@@ -145,6 +149,7 @@ class SideModel | @@ -145,6 +149,7 @@ class SideModel | ||
145 | ), | 149 | ), |
146 | ) | 150 | ) |
147 | ) | 151 | ) |
152 | + ) | ||
148 | ); | 153 | ); |
149 | } | 154 | } |
150 | 155 |
-
Please register or login to post a comment