Merge branch 'master' of http://git.yoho.cn/fe/YOHOBUYWAP
Showing
16 changed files
with
31 additions
and
30 deletions
compile/m.yohobuy.com/1.3.27/readme.md
0 → 100644
static/dist/myohobuy/1.3.27/index-debug.js
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.27/index.css
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.27/index.js
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.27/lib.js
0 → 100644
This diff could not be displayed because it is too large.
@@ -191,7 +191,7 @@ function reMarginFooter(fixedElement) { | @@ -191,7 +191,7 @@ function reMarginFooter(fixedElement) { | ||
191 | a.async = 1; | 191 | a.async = 1; |
192 | a.src = j; | 192 | a.src = j; |
193 | m.parentNode.insertBefore(a, m); | 193 | m.parentNode.insertBefore(a, m); |
194 | -})(window, document, 'script', ('https:' == document.location.protocol ? 'https' : 'http') + '://' + 'cdn.yoho.cn/yas-jssdk/1.0.15/yas.js', '_yas'); | 194 | +}(window, document, 'script', ('https:' === document.location.protocol ? 'https' : 'http') + '://' + 'cdn.yoho.cn/yas-jssdk/1.0.16/yas.js', '_yas')); |
195 | 195 | ||
196 | (function() { | 196 | (function() { |
197 | var uid = getUid(); | 197 | var uid = getUid(); |
@@ -201,7 +201,7 @@ function reMarginFooter(fixedElement) { | @@ -201,7 +201,7 @@ function reMarginFooter(fixedElement) { | ||
201 | window._ozuid = uid;//暴露ozuid | 201 | window._ozuid = uid;//暴露ozuid |
202 | 202 | ||
203 | if (window._yas) { | 203 | if (window._yas) { |
204 | - window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', uid, '', ''); | 204 | + window._yas(1 * new Date(), '1.0.16', 'yohobuy_m', uid, '', ''); |
205 | } | 205 | } |
206 | }()); | 206 | }()); |
207 | 207 | ||
@@ -308,6 +308,3 @@ window.getShoppingKey = getShoppingKey; | @@ -308,6 +308,3 @@ window.getShoppingKey = getShoppingKey; | ||
308 | window.rePosFooter = rePosFooter; | 308 | window.rePosFooter = rePosFooter; |
309 | 309 | ||
310 | window.reMarginFooter = reMarginFooter; | 310 | window.reMarginFooter = reMarginFooter; |
311 | - | ||
312 | - | ||
313 | - |
@@ -275,15 +275,15 @@ function search(opt) { | @@ -275,15 +275,15 @@ function search(opt) { | ||
275 | if (window._yas) { | 275 | if (window._yas) { |
276 | switch (navType) { | 276 | switch (navType) { |
277 | case 'newest': | 277 | case 'newest': |
278 | - window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', window._ozuid, | 278 | + window._yas(1 * new Date(), '1.0.16', 'yohobuy_m', window._ozuid, |
279 | '', $('.new-goods .good-info .good-detail-img .good-thumb')); | 279 | '', $('.new-goods .good-info .good-detail-img .good-thumb')); |
280 | break; | 280 | break; |
281 | case 'price': | 281 | case 'price': |
282 | - window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', window._ozuid, | 282 | + window._yas(1 * new Date(), '1.0.16', 'yohobuy_m', window._ozuid, |
283 | '', $('.price-goods .good-info .good-detail-img .good-thumb')); | 283 | '', $('.price-goods .good-info .good-detail-img .good-thumb')); |
284 | break; | 284 | break; |
285 | case 'discount': | 285 | case 'discount': |
286 | - window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', window._ozuid, | 286 | + window._yas(1 * new Date(), '1.0.16', 'yohobuy_m', window._ozuid, |
287 | '', $('.discount-goods .good-info .good-detail-img .good-thumb')); | 287 | '', $('.discount-goods .good-info .good-detail-img .good-thumb')); |
288 | break; | 288 | break; |
289 | } | 289 | } |
@@ -14,7 +14,7 @@ class InfoController extends AbstractAction | @@ -14,7 +14,7 @@ class InfoController extends AbstractAction | ||
14 | 14 | ||
15 | /** | 15 | /** |
16 | * 详情页 | 16 | * 详情页 |
17 | - * | 17 | + * |
18 | * @param int id 内容ID | 18 | * @param int id 内容ID |
19 | */ | 19 | */ |
20 | public function indexAction() | 20 | public function indexAction() |
@@ -46,7 +46,7 @@ class InfoController extends AbstractAction | @@ -46,7 +46,7 @@ class InfoController extends AbstractAction | ||
46 | if (isset($detail['code']) && $detail['code'] === 400) { | 46 | if (isset($detail['code']) && $detail['code'] === 400) { |
47 | $this->error(); | 47 | $this->error(); |
48 | } | 48 | } |
49 | - | 49 | + |
50 | if (empty($detail['getArticle'])) { | 50 | if (empty($detail['getArticle'])) { |
51 | $this->_view->display('index', $data); | 51 | $this->_view->display('index', $data); |
52 | return; | 52 | return; |
@@ -180,9 +180,11 @@ class InfoController extends AbstractAction | @@ -180,9 +180,11 @@ class InfoController extends AbstractAction | ||
180 | // 相关品牌 | 180 | // 相关品牌 |
181 | if (!empty($detail['getBrand'])) { | 181 | if (!empty($detail['getBrand'])) { |
182 | $data['relatedBrand'] = $detail['getBrand']; | 182 | $data['relatedBrand'] = $detail['getBrand']; |
183 | - foreach ($data['relatedBrand'] as &$value) { | ||
184 | - $value['thumb'] = strtr($value['thumb'], array('http://' => '//')); | 183 | + |
184 | + foreach ($data['relatedBrand'] as $key => $value) { | ||
185 | + $data['relatedBrand'][$key]['thumb'] = strtr($value['thumb'], array('http://' => '//')); | ||
185 | } | 186 | } |
187 | + | ||
186 | } | 188 | } |
187 | 189 | ||
188 | // 相关标签 | 190 | // 相关标签 |
@@ -223,6 +225,7 @@ class InfoController extends AbstractAction | @@ -223,6 +225,7 @@ class InfoController extends AbstractAction | ||
223 | // 标识有微信分享 | 225 | // 标识有微信分享 |
224 | $data['hasWxShare'] = true; | 226 | $data['hasWxShare'] = true; |
225 | 227 | ||
228 | + | ||
226 | $this->_view->display('index', $data); | 229 | $this->_view->display('index', $data); |
227 | 230 | ||
228 | $detail = array(); | 231 | $detail = array(); |
@@ -231,7 +234,7 @@ class InfoController extends AbstractAction | @@ -231,7 +234,7 @@ class InfoController extends AbstractAction | ||
231 | 234 | ||
232 | /** | 235 | /** |
233 | * APP里使用的收藏内容的接口 | 236 | * APP里使用的收藏内容的接口 |
234 | - * | 237 | + * |
235 | * @param id 资讯ID | 238 | * @param id 资讯ID |
236 | * @param type "fav"表示收藏 或者 "cancel"表示取消收藏 | 239 | * @param type "fav"表示收藏 或者 "cancel"表示取消收藏 |
237 | * @return json | 240 | * @return json |
@@ -277,7 +280,7 @@ class InfoController extends AbstractAction | @@ -277,7 +280,7 @@ class InfoController extends AbstractAction | ||
277 | // 单张图 | 280 | // 单张图 |
278 | elseif (isset($value['singleImage'])) { | 281 | elseif (isset($value['singleImage'])) { |
279 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); | 282 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); |
280 | - } | 283 | + } |
281 | elseif (isset($value['smallPic']['data'])) { | 284 | elseif (isset($value['smallPic']['data'])) { |
282 | $imgs = $value['smallPic']['data']; | 285 | $imgs = $value['smallPic']['data']; |
283 | $build['smallImage'] = array( | 286 | $build['smallImage'] = array( |
@@ -356,6 +359,7 @@ class InfoController extends AbstractAction | @@ -356,6 +359,7 @@ class InfoController extends AbstractAction | ||
356 | $data['relatedBrand'] = $detail['getBrand']; | 359 | $data['relatedBrand'] = $detail['getBrand']; |
357 | } | 360 | } |
358 | 361 | ||
362 | + | ||
359 | // 分享参数 | 363 | // 分享参数 |
360 | if (isset($detail['getArticle']['cover_image'])) { | 364 | if (isset($detail['getArticle']['cover_image'])) { |
361 | $data['shareLink'] = Helpers::url('/info/index', array('id' => $id), 'guang'); | 365 | $data['shareLink'] = Helpers::url('/info/index', array('id' => $id), 'guang'); |
@@ -376,36 +380,36 @@ class InfoController extends AbstractAction | @@ -376,36 +380,36 @@ class InfoController extends AbstractAction | ||
376 | $detail = array(); | 380 | $detail = array(); |
377 | $data = array(); | 381 | $data = array(); |
378 | } | 382 | } |
379 | - | 383 | + |
380 | /** | 384 | /** |
381 | * 提供给YOHO资讯站调用的接口 | 385 | * 提供给YOHO资讯站调用的接口 |
382 | - * | 386 | + * |
383 | * @param int id 逛内容ID | 387 | * @param int id 逛内容ID |
384 | * @return json | 388 | * @return json |
385 | */ | 389 | */ |
386 | public function foryohoAction() | 390 | public function foryohoAction() |
387 | { | 391 | { |
388 | $result = array(); | 392 | $result = array(); |
389 | - | 393 | + |
390 | do { | 394 | do { |
391 | /* 判断参数是否有效 */ | 395 | /* 判断参数是否有效 */ |
392 | $id = $this->get('id'); | 396 | $id = $this->get('id'); |
393 | if (!is_numeric($id)) { | 397 | if (!is_numeric($id)) { |
394 | break; | 398 | break; |
395 | } | 399 | } |
396 | - | 400 | + |
397 | $app = $this->get('app'); | 401 | $app = $this->get('app'); |
398 | $isApp = empty($app) ? false : true; | 402 | $isApp = empty($app) ? false : true; |
399 | - | 403 | + |
400 | /* 判断是否有内容 */ | 404 | /* 判断是否有内容 */ |
401 | $detail = DetailData::package($id, $isApp); | 405 | $detail = DetailData::package($id, $isApp); |
402 | if (empty($detail['getArticleContent'])) { | 406 | if (empty($detail['getArticleContent'])) { |
403 | break; | 407 | break; |
404 | } | 408 | } |
405 | - | 409 | + |
406 | /* 品牌信息 */ | 410 | /* 品牌信息 */ |
407 | $result['brand'] = $detail['getBrand']; | 411 | $result['brand'] = $detail['getBrand']; |
408 | - | 412 | + |
409 | $build = array(); | 413 | $build = array(); |
410 | $good = array(); | 414 | $good = array(); |
411 | $skns = array(); | 415 | $skns = array(); |
@@ -421,7 +425,7 @@ class InfoController extends AbstractAction | @@ -421,7 +425,7 @@ class InfoController extends AbstractAction | ||
421 | // 单张图 | 425 | // 单张图 |
422 | elseif (isset($value['singleImage'])) { | 426 | elseif (isset($value['singleImage'])) { |
423 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); | 427 | $build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640); |
424 | - } | 428 | + } |
425 | elseif (isset($value['smallPic']['data'])) { | 429 | elseif (isset($value['smallPic']['data'])) { |
426 | $imgs = $value['smallPic']['data']; | 430 | $imgs = $value['smallPic']['data']; |
427 | $build['smallImage'] = array( | 431 | $build['smallImage'] = array( |
@@ -482,15 +486,15 @@ class InfoController extends AbstractAction | @@ -482,15 +486,15 @@ class InfoController extends AbstractAction | ||
482 | elseif (isset($value['link'])) { | 486 | elseif (isset($value['link'])) { |
483 | $build['moreLink'] = $value['link']['data'][0]['url']; | 487 | $build['moreLink'] = $value['link']['data'][0]['url']; |
484 | } | 488 | } |
485 | - | 489 | + |
486 | // 内容详情 | 490 | // 内容详情 |
487 | if (array() !== $build) { | 491 | if (array() !== $build) { |
488 | $result['content'][] = $build; | 492 | $result['content'][] = $build; |
489 | } | 493 | } |
490 | } | 494 | } |
491 | - } | 495 | + } |
492 | while (false); | 496 | while (false); |
493 | - | 497 | + |
494 | $this->echoJson($result); | 498 | $this->echoJson($result); |
495 | } | 499 | } |
496 | 500 |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.26" | 53 | +application.version = "1.3.27" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.26" | 53 | +application.version = "1.3.27" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.26" | 53 | +application.version = "1.3.27" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets" | 50 | application.assets.path = ROOT_PATH "/assets" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "1.3.26" | 53 | +application.version = "1.3.27" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" | 56 | application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停" |
-
Please register or login to post a comment