Authored by ccbikai

merge code

@@ -100,6 +100,18 @@ class AbstractAction extends Controller_Abstract @@ -100,6 +100,18 @@ class AbstractAction extends Controller_Abstract
100 { 100 {
101 return $this->_request->getParam($key, $default); 101 return $this->_request->getParam($key, $default);
102 } 102 }
  103 +
  104 + /**
  105 + * 封装一下获取服务器的参数
  106 + *
  107 + * @param String $key
  108 + * @param mixed $default
  109 + * @return mixed
  110 + */
  111 + protected function server($key, $default = null)
  112 + {
  113 + return $this->_request->getServer($key, $default);
  114 + }
103 115
104 /** 116 /**
105 * 关闭模板自动渲染 117 * 关闭模板自动渲染
1 <?php 1 <?php
  2 +
2 namespace LibModels\Wap\Category; 3 namespace LibModels\Wap\Category;
3 4
4 use Api\Yohobuy; 5 use Api\Yohobuy;
@@ -15,26 +16,28 @@ use Api\Sign; @@ -15,26 +16,28 @@ use Api\Sign;
15 */ 16 */
16 class FocusData 17 class FocusData
17 { 18 {
18 - /**  
19 - * 获取关注数据  
20 - *  
21 - * @param integ $uid 用户ID  
22 - * @param string $gender 性别  
23 - * @param integer $limit 读取数目限制,默认为10  
24 - * @param integer $page 读取分页限制,默认为1  
25 - * @return array 关注数据  
26 - */ 19 +
  20 + /**
  21 + * 获取关注数据
  22 + *
  23 + * @param integ $uid 用户ID
  24 + * @param string $gender 性别
  25 + * @param integer $limit 读取数目限制,默认为10
  26 + * @param integer $page 读取分页限制,默认为1
  27 + * @return array 关注数据
  28 + */
27 public static function getFocusData($uid, $gender, $limit = 10, $page = 1) 29 public static function getFocusData($uid, $gender, $limit = 10, $page = 1)
28 { 30 {
29 - // 构建必传参数  
30 - $param = Yohobuy::param();  
31 - $param['uid'] = $uid;  
32 - $param['gender'] = $gender;  
33 - $param['limit'] = $limit;  
34 - $param['page'] = $page; 31 + // 构建必传参数
  32 + $param = Yohobuy::param();
  33 + $param['uid'] = $uid;
  34 + $param['gender'] = $gender;
  35 + $param['limit'] = $limit;
  36 + $param['page'] = $page;
35 37
36 $param['client_secret'] = Sign::getSign($param); 38 $param['client_secret'] = Sign::getSign($param);
37 -  
38 - return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/api/v1/attention/getlist', $param); 39 +
  40 + return Yohobuy::get(Yohobuy::SERVICE_URL . 'guang/api/v1/attention/getlist', $param);
39 } 41 }
  42 +
40 } 43 }
@@ -58,7 +58,7 @@ class PlusstarData @@ -58,7 +58,7 @@ class PlusstarData
58 $build['client_secret'] = Sign::getSign($build); 58 $build['client_secret'] = Sign::getSign($build);
59 $urlList['all'] = Yohobuy::httpBuildQuery($url, $build); 59 $urlList['all'] = Yohobuy::httpBuildQuery($url, $build);
60 60
61 - return Yohobuy::getMulti($urlList); 61 + return Yohobuy::getMulti($urlList, array(), 1800); // 缓存30分钟
62 } 62 }
63 63
64 /** 64 /**
@@ -96,7 +96,7 @@ class PlusstarData @@ -96,7 +96,7 @@ class PlusstarData
96 $original['client_secret'] = Sign::getSign($original); 96 $original['client_secret'] = Sign::getSign($original);
97 $urlList['original'] = Yohobuy::httpBuildQuery($url, $original); 97 $urlList['original'] = Yohobuy::httpBuildQuery($url, $original);
98 98
99 - return Yohobuy::getMulti($urlList); 99 + return Yohobuy::getMulti($urlList, array(), 1800); // 缓存30分钟
100 } 100 }
101 101
102 /** 102 /**
@@ -33,7 +33,7 @@ class BrandData @@ -33,7 +33,7 @@ class BrandData
33 $param['type'] = 'brand'; 33 $param['type'] = 'brand';
34 $param['client_secret'] = Sign::getSign($param); 34 $param['client_secret'] = Sign::getSign($param);
35 35
36 - return Yohobuy::post(Yohobuy::API_URL, $param, true); 36 + return Yohobuy::post(Yohobuy::API_URL, $param);
37 } 37 }
38 38
39 /** 39 /**
@@ -52,7 +52,7 @@ class BrandData @@ -52,7 +52,7 @@ class BrandData
52 $param['type'] = 'brand'; 52 $param['type'] = 'brand';
53 $param['client_secret'] = Sign::getSign($param); 53 $param['client_secret'] = Sign::getSign($param);
54 54
55 - return Yohobuy::post(Yohobuy::API_URL, $param, true); 55 + return Yohobuy::post(Yohobuy::API_URL, $param);
56 } 56 }
57 57
58 } 58 }
@@ -33,7 +33,7 @@ class Helpers @@ -33,7 +33,7 @@ class Helpers
33 $url = 'http://search' . SUB_DOMAIN; 33 $url = 'http://search' . SUB_DOMAIN;
34 break; 34 break;
35 case 'index': // 默认 35 case 'index': // 默认
36 - $url = ''; 36 + $url = SITE_MAIN;
37 break; 37 break;
38 default: // 其它子域名 38 default: // 其它子域名
39 $url = 'http://' . $module . SUB_DOMAIN; 39 $url = 'http://' . $module . SUB_DOMAIN;
@@ -38,6 +38,7 @@ if ($('#float-layer-btn') && $('#float-layer-btn')[0]) { @@ -38,6 +38,7 @@ if ($('#float-layer-btn') && $('#float-layer-btn')[0]) {
38 floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]); 38 floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);
39 floatLayerBtnHammer.on('tap', function(e) { 39 floatLayerBtnHammer.on('tap', function(e) {
40 downLoadApp('bottom'); 40 downLoadApp('bottom');
  41 + e.srcEvent.stopPropagation();
41 }); 42 });
42 43
43 if (!window.cookie('_float-layer-app')) { 44 if (!window.cookie('_float-layer-app')) {
1 /** 1 /**
2 - * 产品打包入口 2 + * 商品详情
3 * @author: liangzhifeng<zhifeng.liang@yoho.cn> 3 * @author: liangzhifeng<zhifeng.liang@yoho.cn>
4 * @date: 2015/10/20 4 * @date: 2015/10/20
5 */ 5 */
@@ -18,4 +18,9 @@ goodsSwiper = new Swiper('.banner-swiper', { @@ -18,4 +18,9 @@ goodsSwiper = new Swiper('.banner-swiper', {
18 pagination: '.swiper-pagination', 18 pagination: '.swiper-pagination',
19 nextButton: '.swiper-button-next', 19 nextButton: '.swiper-button-next',
20 prevButton: '.swiper-button-prev' 20 prevButton: '.swiper-button-prev'
21 -});  
  21 +});
  22 +
  23 +// $('#iframe').load(function() {
  24 +// var mainheight = $(this).contents().find('body').height() + 30;
  25 +// $(this).height(mainheight);
  26 +// });
@@ -45,6 +45,13 @@ a { @@ -45,6 +45,13 @@ a {
45 text-decoration: none; 45 text-decoration: none;
46 outline: none; 46 outline: none;
47 color: #000; 47 color: #000;
  48 +
  49 + &:link,
  50 + &:visted,
  51 + &:hover,
  52 + &:active {
  53 + color: #000;
  54 + }
48 } 55 }
49 56
50 *:focus { 57 *:focus {
@@ -41,10 +41,6 @@ @@ -41,10 +41,6 @@
41 .search-items { 41 .search-items {
42 padding: 20px 10px; 42 padding: 20px 10px;
43 43
44 - a {  
45 - color: #000;  
46 - }  
47 -  
48 h3 { 44 h3 {
49 font-size: 12px; 45 font-size: 12px;
50 margin-bottom: 10px; 46 margin-bottom: 10px;
@@ -48,14 +48,14 @@ @@ -48,14 +48,14 @@
48 } 48 }
49 } 49 }
50 50
51 - .detailName { 51 + .goodsName {
52 font-size: 28rem / $pxConvertRem; 52 font-size: 28rem / $pxConvertRem;
53 color: #222222; 53 color: #222222;
54 padding-bottom: 6px; 54 padding-bottom: 6px;
55 text-align: center; 55 text-align: center;
56 } 56 }
57 57
58 - .detailTitle { 58 + .goodsTitle {
59 font-size: 36rem / $pxConvertRem; 59 font-size: 36rem / $pxConvertRem;
60 text-align: center; 60 text-align: center;
61 padding-bottom: 2px; 61 padding-bottom: 2px;
@@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
68 padding-bottom: 15px; 68 padding-bottom: 15px;
69 } 69 }
70 70
71 - .detailToBuy { 71 + .goToBuy {
72 padding: 0 10px; 72 padding: 0 10px;
73 margin-bottom: 20px; 73 margin-bottom: 20px;
74 text-align: center; 74 text-align: center;
@@ -115,7 +115,7 @@ @@ -115,7 +115,7 @@
115 } 115 }
116 } 116 }
117 117
118 - .detailToShop { 118 + .goToShop {
119 margin: 0 10px 20px; 119 margin: 0 10px 20px;
120 padding: 10px; 120 padding: 10px;
121 height: 47px; 121 height: 47px;
@@ -4,119 +4,51 @@ @@ -4,119 +4,51 @@
4 {{> product/banner_swiper_arrow}} 4 {{> product/banner_swiper_arrow}}
5 {{/ bannerTop}} 5 {{/ bannerTop}}
6 6
7 - <h2 class="detailName">CHUMS 男式纯色logo休闲长袖T恤</h2> 7 + {{# goodsName}}
  8 + <h2 class="goodsName">{{.}}</h2>
  9 + {{/ goodsName}}
8 10
9 - <h1 class="detailTitle">¥298.00</h1>  
10 -  
11 - <div class="vipLevel"><span>银卡¥284.00</span>丨<span>金卡¥269.00</span>丨<span>白金¥263.00</span></div>  
12 -  
13 - <div class="detailToBuy">  
14 - <a href="javascript:void(0);" class="AddFavorite" id="favorite" fav="0" name="collect" product="269003"><em class="icon-uni31"></em></a>  
15 - <a href="http://m.yohobuy.com/product/buy_269003_348031.html" name="buy" class="toBuyNow">立即购买</a>  
16 - </div>  
17 -  
18 - <div class="discountNotice">  
19 - <p><span>打折</span>【深秋优品加持】折上满¥59975折</p>  
20 - <p><span>打折</span>【深秋优品加持】折上满¥39985折</p>  
21 - <p><span>加价购</span>【全场29元加价购】</p>  
22 - <p><span>加价购</span>【全场49元加价购】</p>  
23 - <p><span>加价购</span>【全场69元加价购】</p>  
24 - </div>  
25 -  
26 - <div class="detailToShop">  
27 - <a href="http://chums.m.yohobuy.com" title="CHUMS">  
28 - <span class="fn-right fz14">进入店铺 <em class="icon-uni3E"></em></span>  
29 - <img class="lazy" src="http://img12.static.yhbimg.com/brandLogo/2015/08/14/11/022c089923cc22b3b068f862dcd3b9d454.jpg?imageView/1/w/47/h/47" data-original="http://img12.static.yhbimg.com/brandLogo/2015/08/14/11/022c089923cc22b3b068f862dcd3b9d454.jpg?imageView/1/w/47/h/47" alt="" width="47" style="display: inline-block;">  
30 - CHUMS </a>  
31 - </div>  
32 -  
33 - <div class="detailSize detailGoodsInfo">  
34 - <h3>商品信息<span>product info</span></h3>  
35 - <table>  
36 - <tbody>  
37 - <tr>  
38 - <td>编号:51149815</td>  
39 - <td>颜色:白色</td>  
40 - </tr>  
41 - <tr> <td>领型:圆领</td>  
42 - <td>衣长:适中</td>  
43 - </tr><tr> <td>袖长:长袖</td>  
44 - <td>版型:正常</td>  
45 - </tr><tr> <td>厚度:中</td>  
46 - <td>经典款型:LOGOT恤</td>  
47 - </tr><tr> <td>袖型:正常</td>  
48 - <td>肩型:落肩</td>  
49 - </tr> <tr>  
50 - <td colspan="2">“CHUMS”这一品牌名称,是由Mike 先生好友的爱犬“Chumley”的名字演变而来,其中蕴含了Mike先生希望透过这一品牌,让顾客感受到生活的温馨与美好的心情。  
51 -中南美的渔夫们用西班牙语亲切地称这种鸟作蓝脚鲣鸟。由于其快乐、悠闲的风格与CHUMS品牌的理念完全一致,便采用它作为该品牌的吉祥物。  
52 -从当初的一根眼镜绳,经过30年的发展, CHUMS已经成为全球时尚市场上的主力军,并将产品线扩大到了包、帽子和服饰。  
53 -CHUMS的所有产品一直秉承 “舒适、乐趣、品质”的设计理念,并且融合都市时尚和户外技术装备的特点,所以在美国和欧洲收到了广大消费者的欢迎,特别是在日本更是家喻户晓。  
54 -</td>  
55 - </tr>  
56 - </tbody>  
57 - </table>  
58 - </div>  
59 -  
60 -  
61 - <div class="detailSize">  
62 - <h3>尺码信息<span>size info</span></h3>  
63 - <div id="size_info" class="overthrow">  
64 - <table>  
65 - <thead> <tr>  
66 - <th style="width:100px;">吊牌尺码</th><th style="width:100px;">后衣长</th><th style="width:100px;">前衣长</th><th style="width:100px;">袖长</th><th style="width:100px;">胸围</th><th style="width:100px;">肩宽</th> </tr>  
67 - </thead> <tbody> <tr>  
68 - <td>S</td><td>60</td><td>60</td><td>56</td><td>92</td><td>41</td> </tr>  
69 - <tr>  
70 - <td>M</td><td>63</td><td>63</td><td>57</td><td>96</td><td>43</td> </tr>  
71 - <tr>  
72 - <td>L</td><td>67</td><td>67</td><td>58</td><td>100</td><td>45</td> </tr>  
73 - <tr>  
74 - <td>XL</td><td>69</td><td>69</td><td>59</td><td>104</td><td>47</td> </tr>  
75 - </tbody>  
76 - </table>  
77 - </div><p class="scrollinfo">提示:左滑查看完整表格信息</p>  
78 - </div>  
79 -  
80 -  
81 -  
82 -  
83 -<div class="detail-img">  
84 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/028fa13126b19a838b9d642f96bf5976b2.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/028fa13126b19a838b9d642f96bf5976b2.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
85 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/0293b0e5966a9b190a349d0a5f13084c42.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/0293b0e5966a9b190a349d0a5f13084c42.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
86 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/31/11/014968ff8c6b6480edd9cbbd1e3a4c8a96.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/31/11/014968ff8c6b6480edd9cbbd1e3a4c8a96.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
87 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/31/11/019c0a096996a05125713f1cf2ff62b6f1.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/31/11/019c0a096996a05125713f1cf2ff62b6f1.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
88 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/31/11/0109068bd71afb7e40ac326803d145f93f.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/31/11/0109068bd71afb7e40ac326803d145f93f.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
89 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
90 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/0242daecfc6d31047b123da2a7861a0bb4.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/0242daecfc6d31047b123da2a7861a0bb4.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
91 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/0270b729a9aab25dfbcbabc9498a6e4bda.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/0270b729a9aab25dfbcbabc9498a6e4bda.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
92 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/026cff8c4e0a690afa9cb70e7ba11454c6.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/026cff8c4e0a690afa9cb70e7ba11454c6.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
93 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/023c68cbd9776ff83ba881f8314b366877.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/023c68cbd9776ff83ba881f8314b366877.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
94 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/02890fac8400e8d302c9d3caeca8634c18.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/02890fac8400e8d302c9d3caeca8634c18.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
95 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/0257faa55e04a9e44b8edff8f2e0a663b0.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/0257faa55e04a9e44b8edff8f2e0a663b0.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
96 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
97 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/02226e365addb260fb596ad2a552daac7e.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/02226e365addb260fb596ad2a552daac7e.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
98 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/02b7f43227b5ba4be339b85b47702260f0.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/02b7f43227b5ba4be339b85b47702260f0.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
99 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/025d5886aa4377677e044022145ab6ca3d.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/025d5886aa4377677e044022145ab6ca3d.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
100 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/06/11/029c6d31e9aaf104421e193ac7cdd64437.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/06/11/029c6d31e9aaf104421e193ac7cdd64437.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
101 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/02a8526a96a29f212711bf910054b40d6b.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/02a8526a96a29f212711bf910054b40d6b.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
102 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/02efd446f5735d19b4648beddf2a31fa60.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/02efd446f5735d19b4648beddf2a31fa60.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
103 - <img class="lazy" src="http://img02.static.yohobuy.com/product/2015/07/31/11/026eddbf3d6332ea641e91ce7515ebcc3a.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img02.static.yohobuy.com/product/2015/07/31/11/026eddbf3d6332ea641e91ce7515ebcc3a.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
104 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2014/01/28/17/01417067dcf7379d6a06768c62ee961c00.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
105 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/06/11/01cd92a99779901ce39b9e4c05e72caa35.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/06/11/01cd92a99779901ce39b9e4c05e72caa35.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
106 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/06/11/01cf2362d0233a0c00539e3ad6c8548afe.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/06/11/01cf2362d0233a0c00539e3ad6c8548afe.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
107 - <img class="lazy" src="http://img01.static.yohobuy.com/product/2015/07/06/11/01bacfb07355ff35a62ad1cfafb81eab75.jpg?imageMogr2/thumbnail/640x5000" data-original="http://img01.static.yohobuy.com/product/2015/07/06/11/01bacfb07355ff35a62ad1cfafb81eab75.jpg?imageMogr2/thumbnail/640x5000" alt="MACROPUS 绝对机能系列双肩包" style="display: block;">  
108 - </div>  
109 -  
110 -  
111 -  
112 -  
113 -  
114 -  
115 -  
116 -  
117 -  
118 -  
119 - 11 + {{# goodsTitle}}
  12 + <h1 class="goodsTitle">{{.}}</h1>
  13 + {{/ goodsTitle}}
  14 +
  15 + {{# vipLevel}}
  16 + <div class="vipLevel">
  17 + {{# list}}
  18 + {{#if @last}}
  19 + <span>{{text}}</span>
  20 + {{^}}
  21 + <span>{{text}}</span> |
  22 + {{/if}}
  23 + {{/ list}}
  24 + </div>
  25 + {{/ vipLevel}}
  26 +
  27 + {{# goToBuy}}
  28 + <div class="goToBuy">
  29 + <a href="javascript:void(0);" class="AddFavorite" id="favorite" fav="0" name="collect"><em class="icon-uni31"></em></a>
  30 + <a href="{{url}}" name="buy" class="toBuyNow">立即购买</a>
  31 + </div>
  32 + {{/ goToBuy}}
  33 +
  34 + {{# discountNotice}}
  35 + <div class="discountNotice">
  36 + {{# list}}
  37 + <p><span>{{title}}</span>{{desc}}</p>
  38 + {{/ list}}
  39 + </div>
  40 + {{/ discountNotice}}
  41 +
  42 + {{# goToShop}}
  43 + <div class="goToShop">
  44 + <a href="{{url}}">
  45 + <span class="fn-right fz14">进入店铺 <em class="icon-uni3E"></em></span>
  46 + <img class="lazy" data-original="{{img}}" alt="" style="display: inline-block;">
  47 + {{title}}</a>
  48 + </div>
  49 + {{/ goToShop}}
  50 +
  51 + <iframe src="http://www.baidu.com" id="main" width="320" height="300" frameborder="0" scrolling="auto"></iframe>
120 52
121 53
122 54
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="goods-category"> 2 <div class="goods-category">
3 {{# big_image}} 3 {{# big_image}}
4 <div class="category-swiper"> 4 <div class="category-swiper">
5 - <ul class="swiper-wrapper clearfix"> 5 + <ul class="swiper-wrapper">
6 {{# list}} 6 {{# list}}
7 <li class="swiper-slide"> 7 <li class="swiper-slide">
8 <a href="{{url}}"> 8 <a href="{{url}}">
@@ -144,7 +144,7 @@ @@ -144,7 +144,7 @@
144 {{/if}} 144 {{/if}}
145 145
146 {{!-- 商品详情 --}} 146 {{!-- 商品详情 --}}
147 -{{#if goodDetail}} 147 +{{#if goodsDetailPage}}
148 <script> 148 <script>
149 seajs.use('js/product/detail/detail'); 149 seajs.use('js/product/detail/detail');
150 </script> 150 </script>
@@ -160,7 +160,7 @@ class HomeModel @@ -160,7 +160,7 @@ class HomeModel
160 } 160 }
161 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 161 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
162 else { 162 else {
163 - Cache::set($cache, $result); 163 + Cache::set($cache, $result);
164 } 164 }
165 } 165 }
166 166
@@ -59,7 +59,7 @@ class SideModel @@ -59,7 +59,7 @@ class SideModel
59 } 59 }
60 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 60 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
61 else { 61 else {
62 - Cache::set(CacheConfig::KEY_COMMON_SIDE_NAV, $result, 3600); // 缓存1小时 62 + Cache::set(CacheConfig::KEY_COMMON_SIDE_NAV, $result);
63 } 63 }
64 } 64 }
65 65
@@ -57,7 +57,7 @@ class ListModel @@ -57,7 +57,7 @@ class ListModel
57 } 57 }
58 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 58 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
59 else { 59 else {
60 - Cache::set($key, $result, 600); // 缓存10分钟 60 + Cache::set($key, $result, 1800); // 缓存30分钟
61 } 61 }
62 } 62 }
63 63
@@ -140,7 +140,7 @@ class ListModel @@ -140,7 +140,7 @@ class ListModel
140 } 140 }
141 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 141 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
142 else { 142 else {
143 - Cache::set($key, $result, 600); // 缓存10分钟 143 + Cache::set($key, $result, 1800); // 缓存30分钟
144 } 144 }
145 } 145 }
146 146
@@ -186,7 +186,7 @@ class ListModel @@ -186,7 +186,7 @@ class ListModel
186 } 186 }
187 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 187 // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
188 else { 188 else {
189 - Cache::set($key, $result, 10800); // 缓存3小时 189 + Cache::set($key, $result); // 缓存1小时
190 } 190 }
191 } 191 }
192 192
@@ -14,7 +14,7 @@ class DetailController extends AbstractAction @@ -14,7 +14,7 @@ class DetailController extends AbstractAction
14 public function indexAction() 14 public function indexAction()
15 { 15 {
16 $data = array ( 16 $data = array (
17 - 'goodDetail' => true, 17 + 'goodsDetailPage' => true,
18 'pageHeader' => array ( 18 'pageHeader' => array (
19 'navBack' => 'sss ', 19 'navBack' => 'sss ',
20 'navHome' => 'sss ', 20 'navHome' => 'sss ',
@@ -35,7 +35,55 @@ class DetailController extends AbstractAction @@ -35,7 +35,55 @@ class DetailController extends AbstractAction
35 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' 35 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
36 ) 36 )
37 ) 37 )
  38 + ),
  39 + 'goodsName' => 'CHUMS 男式纯色logo休闲长袖T恤',
  40 + 'goodsTitle' => '¥298.00',
  41 + 'vipLevel' => array (
  42 + 'list' => array (
  43 + array (
  44 + 'text' => '银卡284.00'
  45 + ),
  46 + array (
  47 + 'text' => '金卡269.00'
  48 + ),
  49 + array (
  50 + 'text' => '白金263.00'
  51 + )
  52 + )
  53 + ),
  54 + 'goToBuy' => array (
  55 + 'url' => 'http://m.yohobuy.com/product/buy_269003_348031.html'
  56 + ),
  57 + 'discountNotice' => array (
  58 + 'list' => array (
  59 + array (
  60 + 'title' => '打折',
  61 + 'desc' => '【深秋优品加持】折上满¥599享75折'
  62 + ),
  63 + array (
  64 + 'title' => '打折',
  65 + 'desc' => '【深秋优品加持】折上满¥399享85折'
  66 + ),
  67 + array (
  68 + 'title' => '加价购',
  69 + 'desc' => '【全场29元加价购】'
  70 + ),
  71 + array (
  72 + 'title' => '加价购',
  73 + 'desc' => '【全场49元加价购】'
  74 + ),
  75 + array (
  76 + 'title' => '加价购',
  77 + 'desc' => '【全场69元加价购】'
  78 + )
  79 + )
  80 + ),
  81 + 'goToShop' => array (
  82 + 'url' => 'http://chums.m.yohobuy.com',
  83 + 'title' => 'CHUMS',
  84 + 'img' => 'http://img12.static.yhbimg.com/brandLogo/2015/08/14/11/022c089923cc22b3b068f862dcd3b9d454.jpg?imageView/1/w/47/h/47" data-original="http://img12.static.yhbimg.com/brandLogo/2015/08/14/11/022c089923cc22b3b068f862dcd3b9d454.jpg?imageView/1/w/47/h/47'
38 ) 85 )
  86 +
39 ); 87 );
40 88
41 $this->_view->assign('title', '商品详情'); 89 $this->_view->assign('title', '商品详情');
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Product\BrandData; 4 use LibModels\Wap\Product\BrandData;
  5 +use Plugin\Helpers;
5 6
6 /** 7 /**
7 * 商品操作相关的控制器 8 * 商品操作相关的控制器
@@ -56,6 +57,11 @@ class OptController extends AbstractAction @@ -56,6 +57,11 @@ class OptController extends AbstractAction
56 } 57 }
57 while (false); 58 while (false);
58 59
  60 + if (isset($result['code']) && $result['code'] == 412) {
  61 + $referer = $this->server('HTTP_REFERER', SITE_MAIN);
  62 + $result['data'] = Helpers::url('/signin.html', array('refer' => $referer));
  63 + }
  64 +
59 $this->echoJson($result); 65 $this->echoJson($result);
60 } 66 }
61 67