merge APP4.3
Showing
25 changed files
with
133 additions
and
88 deletions
@@ -54,17 +54,24 @@ class IndexData | @@ -54,17 +54,24 @@ class IndexData | ||
54 | * @param string $contentCode 内容位置码 | 54 | * @param string $contentCode 内容位置码 |
55 | * @param integer $limit 查询返回的最大限字数,默认为20 | 55 | * @param integer $limit 查询返回的最大限字数,默认为20 |
56 | * @param integer $page 分页第几页,默认为第1页 | 56 | * @param integer $page 分页第几页,默认为第1页 |
57 | + * @param integer $uid 用户id | ||
58 | + * @modify sefon 2016-4-19 13:33:49 | ||
57 | * @return array 首页频道数据 | 59 | * @return array 首页频道数据 |
58 | */ | 60 | */ |
59 | - public static function getResourceData($gender, $contentCode, $limit = 20, $page = 1) | 61 | + public static function getResourceData($gender, $contentCode, $limit = 20, $page = 1, $uid = 0) |
60 | { | 62 | { |
61 | $param = Yohobuy::param(); | 63 | $param = Yohobuy::param(); |
64 | + if ($uid) { | ||
65 | + $param['uid'] = $uid; | ||
66 | + } else { | ||
67 | + //新设备(用户未登录状态,默认新设备):Y/N | ||
68 | + $param['new_device'] = 'Y'; | ||
69 | + } | ||
62 | $param['gender'] = $gender; | 70 | $param['gender'] = $gender; |
63 | $param['content_code'] = $contentCode; | 71 | $param['content_code'] = $contentCode; |
64 | $param['page'] = $page; | 72 | $param['page'] = $page; |
65 | $param['limit'] = $limit; | 73 | $param['limit'] = $limit; |
66 | $param['client_secret'] = Sign::getSign($param); | 74 | $param['client_secret'] = Sign::getSign($param); |
67 | - | ||
68 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/home', $param, false, false, 2); | 75 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/home', $param, false, false, 2); |
69 | } | 76 | } |
70 | 77 |
@@ -451,4 +451,34 @@ class FloorProcess | @@ -451,4 +451,34 @@ class FloorProcess | ||
451 | return $result; | 451 | return $result; |
452 | } | 452 | } |
453 | 453 | ||
454 | + /** | ||
455 | + * 新人专享 | ||
456 | + * @param $data | ||
457 | + * @param $type | ||
458 | + * @author sefon 2016-4-19 11:43:56 | ||
459 | + * @return array | ||
460 | + */ | ||
461 | + private static function new_user_floor($data, $type) | ||
462 | + { | ||
463 | + $result = array(); | ||
464 | + $result['title']['title'] = $data['title']['title']; | ||
465 | + if ($data['title']['more_url']) { | ||
466 | + $result['title']['more_url'] = $data['title']['more_url']; | ||
467 | + } | ||
468 | + $result['big_image']['url'] = $data['banner_image'][0]['url']; | ||
469 | + $result['big_image']['title'] = $data['banner_image'][0]['title']; | ||
470 | + $result['big_image']['img'] = Helpers::getImageUrl($data['banner_image'][0]['src'], 640, 200); | ||
471 | + if (empty($data['list'])) { | ||
472 | + return $result; | ||
473 | + } | ||
474 | + foreach ($data['list'] as $key => $val) { | ||
475 | + $result['list'][$key]['url'] = Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['goods_id'], $val['cn_alphabet']); | ||
476 | + $result['list'][$key]['img'] = helpers::getImageUrl($val['default_images'], 235, 314); | ||
477 | + $result['list'][$key]['title'] = $val['product_name']; | ||
478 | + $result['list'][$key]['salePrice'] = number_format($val['sales_price'], 2); | ||
479 | + $result['list'][$key]['price'] = number_format($val['market_price'], 2); | ||
480 | + } | ||
481 | + return array('freshOnly'=>$result); | ||
482 | + } | ||
483 | + | ||
454 | } | 484 | } |
@@ -695,7 +695,7 @@ class Helpers | @@ -695,7 +695,7 @@ class Helpers | ||
695 | * @param int $count 计商品件数 | 695 | * @param int $count 计商品件数 |
696 | * @return array $arr 处理之后的加价购商品数据 | 696 | * @return array $arr 处理之后的加价购商品数据 |
697 | */ | 697 | */ |
698 | - public static function formatAdvanceGoods($advanceGoods, &$count = 0) | 698 | + public static function formatAdvanceGoods($advanceGoods, &$count = 0, $isGift = false) |
699 | { | 699 | { |
700 | $arr = array(); | 700 | $arr = array(); |
701 | 701 | ||
@@ -714,7 +714,7 @@ class Helpers | @@ -714,7 +714,7 @@ class Helpers | ||
714 | $oneGoods['name'] = $single['product_name']; | 714 | $oneGoods['name'] = $single['product_name']; |
715 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; | 715 | $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; |
716 | $oneGoods['price'] = self::transPrice($single['last_price']); | 716 | $oneGoods['price'] = self::transPrice($single['last_price']); |
717 | - $oneGoods['marketPrice'] = self::transPrice($single['market_price']); | 717 | + $oneGoods['marketPrice'] = $isGift ? '0.00' : self::transPrice($single['market_price']); |
718 | $oneGoods['count'] = $single['storage_number']; | 718 | $oneGoods['count'] = $single['storage_number']; |
719 | 719 | ||
720 | $gift['goods'][] = $oneGoods; | 720 | $gift['goods'][] = $oneGoods; |
static/dist/myohobuy/1.3.16/index-debug.js
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.16/index.css
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.16/index.css.map
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.16/index.js
0 → 100644
This diff could not be displayed because it is too large.
static/dist/myohobuy/1.3.16/lib.js
0 → 100644
This diff could not be displayed because it is too large.
static/js/home/fresh-list.js
deleted
100644 → 0
1 | .fresh-swiper { | 1 | .fresh-swiper { |
2 | position: relative; | 2 | position: relative; |
3 | - height: 200px; | ||
4 | overflow: hidden; | 3 | overflow: hidden; |
5 | - ul { | 4 | + |
5 | + ul { | ||
6 | li { | 6 | li { |
7 | float: left; | 7 | float: left; |
8 | width: 100%; | 8 | width: 100%; |
@@ -17,17 +17,17 @@ | @@ -17,17 +17,17 @@ | ||
17 | position: absolute; | 17 | position: absolute; |
18 | left: 0; | 18 | left: 0; |
19 | right: 0; | 19 | right: 0; |
20 | - bottom: 20px; | 20 | + bottom: 20rem / $pxConvertRem; |
21 | text-align: center; | 21 | text-align: center; |
22 | .pagination-inner { | 22 | .pagination-inner { |
23 | display: inline-block; | 23 | display: inline-block; |
24 | span { | 24 | span { |
25 | display: inline-block; | 25 | display: inline-block; |
26 | - width: 14px; | ||
27 | - height: 14px; | 26 | + width: 14rem / $pxConvertRem; |
27 | + height: 14rem / $pxConvertRem; | ||
28 | background: #fff; | 28 | background: #fff; |
29 | opacity: 0.5; | 29 | opacity: 0.5; |
30 | - margin: 0 9px; | 30 | + margin: 0 (9rem / $pxConvertRem); |
31 | border-radius: 50%; | 31 | border-radius: 50%; |
32 | } | 32 | } |
33 | span.swiper-active-switch { | 33 | span.swiper-active-switch { |
@@ -39,8 +39,9 @@ | @@ -39,8 +39,9 @@ | ||
39 | 39 | ||
40 | .fresh-list-swiper { | 40 | .fresh-list-swiper { |
41 | overflow: hidden; | 41 | overflow: hidden; |
42 | - padding-bottom: 15px; | 42 | + padding-bottom: 15rem / $pxConvertRem; |
43 | background-color: #fff; | 43 | background-color: #fff; |
44 | + height: 470rem / $pxConvertRem; | ||
44 | 45 | ||
45 | ul { | 46 | ul { |
46 | box-sizing: border-box; | 47 | box-sizing: border-box; |
@@ -48,26 +49,31 @@ | @@ -48,26 +49,31 @@ | ||
48 | 49 | ||
49 | li { | 50 | li { |
50 | float:left; | 51 | float:left; |
51 | - width:240px; | ||
52 | - margin: 20px 10px 0 10px; | 52 | + width:240rem / $pxConvertRem; |
53 | + margin: (20rem / $pxConvertRem) (10rem / $pxConvertRem) 0 (10rem / $pxConvertRem); | ||
54 | + border: none; | ||
53 | 55 | ||
54 | &:first-child { | 56 | &:first-child { |
55 | - margin-left: 20px; | 57 | + margin-left: 20rem / $pxConvertRem; |
56 | } | 58 | } |
57 | 59 | ||
58 | &:last-child { | 60 | &:last-child { |
59 | - margin-right: 20px; | 61 | + margin-right: 20rem / $pxConvertRem; |
60 | } | 62 | } |
61 | 63 | ||
62 | .img-box { | 64 | .img-box { |
63 | - height: 100%; | ||
64 | - height:320px; | 65 | + width: 100%; |
66 | + height:320rem / $pxConvertRem; | ||
67 | + overflow: hidden; | ||
65 | text-align: center; | 68 | text-align: center; |
66 | position: relative; | 69 | position: relative; |
70 | + | ||
67 | img { | 71 | img { |
68 | width: 100%; | 72 | width: 100%; |
69 | - height: 100%; | 73 | + height: 320rem / $pxConvertRem; |
70 | vertical-align: middle; | 74 | vertical-align: middle; |
75 | + border: none; | ||
76 | + outline: none; | ||
71 | } | 77 | } |
72 | } | 78 | } |
73 | 79 | ||
@@ -79,34 +85,33 @@ | @@ -79,34 +85,33 @@ | ||
79 | width: 100%; | 85 | width: 100%; |
80 | white-space: nowrap; | 86 | white-space: nowrap; |
81 | color: #444; | 87 | color: #444; |
82 | - line-height: 48px; | ||
83 | - font-size: 22px; | 88 | + line-height: 48rem / $pxConvertRem; |
89 | + font-size: 22rem / $pxConvertRem; | ||
84 | 90 | ||
85 | } | 91 | } |
86 | 92 | ||
87 | .cur-price { | 93 | .cur-price { |
88 | color: #d62927; | 94 | color: #d62927; |
89 | - font-size: 22px; | 95 | + font-size: 22rem / $pxConvertRem; |
90 | } | 96 | } |
91 | 97 | ||
92 | .old-price { | 98 | .old-price { |
93 | - margin: 0 0 0 10px; | 99 | + margin: 0 0 0 (10rem / $pxConvertRem); |
94 | color: #b0b0b0; | 100 | color: #b0b0b0; |
95 | text-decoration: line-through; | 101 | text-decoration: line-through; |
96 | - font-size: 22px; | 102 | + font-size: 22rem / $pxConvertRem; |
97 | } | 103 | } |
98 | 104 | ||
99 | .fresh-icon { | 105 | .fresh-icon { |
100 | background: #d62927; | 106 | background: #d62927; |
101 | - width: 100px; | ||
102 | - height: 33px; | 107 | + width: 100rem / $pxConvertRem; |
108 | + height: 20px; | ||
103 | display: block; | 109 | display: block; |
104 | - margin: 8px auto 0 auto; | 110 | + margin: (8rem / $pxConvertRem) auto 0 auto; |
105 | color: #fff; | 111 | color: #fff; |
106 | text-align: center; | 112 | text-align: center; |
107 | - border-radius: 40px; | ||
108 | - line-height: 37px; | ||
109 | - font-size:12px; | 113 | + border-radius: 40rem / $pxConvertRem; |
114 | + line-height: 20px; | ||
110 | } | 115 | } |
111 | } | 116 | } |
112 | } | 117 | } |
@@ -114,5 +119,5 @@ | @@ -114,5 +119,5 @@ | ||
114 | 119 | ||
115 | .fresh-list{ | 120 | .fresh-list{ |
116 | position: relative; | 121 | position: relative; |
117 | - padding:15px 0 0 15px; | 122 | + padding:(15rem / $pxConvertRem) 0 0 (15rem / $pxConvertRem); |
118 | } | 123 | } |
1 | @import "header-download", "banner-top","banner-center","banner-bottom", "side-nav", "floor-header", "hot-brands", "fine-brands", "creative-life", "plus-star", "maybe-like", | 1 | @import "header-download", "banner-top","banner-center","banner-bottom", "side-nav", "floor-header", "hot-brands", "fine-brands", "creative-life", "plus-star", "maybe-like", |
2 | "icons-enter","trendsetter-collocation", | 2 | "icons-enter","trendsetter-collocation", |
3 | -"trend-topics","goods-category","hot-brands", "hot-category", "home-header", "thumb-row"; | 3 | +"trend-topics","goods-category","hot-brands", "hot-category", "home-header", "thumb-row", "fresh-only"; |
4 | 4 | ||
5 | .mobile-container{ | 5 | .mobile-container{ |
6 | width: 100%; | 6 | width: 100%; |
@@ -31,16 +31,6 @@ | @@ -31,16 +31,6 @@ | ||
31 | <span class="iconfont icon-yoho-enter"></span> | 31 | <span class="iconfont icon-yoho-enter"></span> |
32 | </a> | 32 | </a> |
33 | </div> | 33 | </div> |
34 | - <div class="connect-item connect-tel"> | ||
35 | - <a href="tel:400-889-9646" title="电话客服"> | ||
36 | - <span class="icon iconfont icon-tel"></span> | ||
37 | - 电话客服 | ||
38 | - <p> | ||
39 | - 400-889-9646 09:00 - 22:30 (周一至周日) | ||
40 | - </p> | ||
41 | - </a> | ||
42 | - | ||
43 | - </div> | ||
44 | </div> | 34 | </div> |
45 | </div> | 35 | </div> |
46 | {{> layout/footer}} | 36 | {{> layout/footer}} |
@@ -51,6 +51,10 @@ | @@ -51,6 +51,10 @@ | ||
51 | {{# plusStar}} | 51 | {{# plusStar}} |
52 | {{> home/plus_star}} | 52 | {{> home/plus_star}} |
53 | {{/ plusStar}} | 53 | {{/ plusStar}} |
54 | + {{! 新人专享}} | ||
55 | + {{# freshOnly}} | ||
56 | + {{> home/fresh_only}} | ||
57 | + {{/ freshOnly}} | ||
54 | {{/ content}} | 58 | {{/ content}} |
55 | 59 | ||
56 | {{! 可能喜欢}} | 60 | {{! 可能喜欢}} |
@@ -47,6 +47,10 @@ | @@ -47,6 +47,10 @@ | ||
47 | {{# plusStar}} | 47 | {{# plusStar}} |
48 | {{> home/plus_star}} | 48 | {{> home/plus_star}} |
49 | {{/ plusStar}} | 49 | {{/ plusStar}} |
50 | + {{! 新人专享}} | ||
51 | + {{# freshOnly}} | ||
52 | + {{> home/fresh_only}} | ||
53 | + {{/ freshOnly}} | ||
50 | {{/ content}} | 54 | {{/ content}} |
51 | 55 | ||
52 | {{! 可能喜欢}} | 56 | {{! 可能喜欢}} |
1 | {{# title}} | 1 | {{# title}} |
2 | <div class="floor-header-more"> | 2 | <div class="floor-header-more"> |
3 | <h2>{{title}}</h2> | 3 | <h2>{{title}}</h2> |
4 | - <a class="more-btn iconfont" href="{{more_url}}"></a> | 4 | + {{#if more_url}} |
5 | + <a class="more-btn iconfont" href="{{more_url}}"></a> | ||
6 | + {{/if}} | ||
5 | </div> | 7 | </div> |
6 | {{/ title}} | 8 | {{/ title}} |
@@ -22,11 +22,11 @@ | @@ -22,11 +22,11 @@ | ||
22 | <p class="price"> | 22 | <p class="price"> |
23 | <span class="cur-price">¥{{salePrice}}</span> | 23 | <span class="cur-price">¥{{salePrice}}</span> |
24 | {{# price}} | 24 | {{# price}} |
25 | - <span class="old-price">¥{{.}}<span> | 25 | + <span class="old-price">¥{{.}}</span> |
26 | {{/price}} | 26 | {{/price}} |
27 | </p> | 27 | </p> |
28 | <span class="fresh-icon">新人价</span> | 28 | <span class="fresh-icon">新人价</span> |
29 | - </div> | 29 | + </div> |
30 | </li> | 30 | </li> |
31 | {{/ list}} | 31 | {{/ list}} |
32 | </ul> | 32 | </ul> |
@@ -12,9 +12,9 @@ | @@ -12,9 +12,9 @@ | ||
12 | {{#currencyDetailPage}} | 12 | {{#currencyDetailPage}} |
13 | <a href="/home/helpDetail?code=20111130-152530&caption=如何使用YOHO币支付" class="iconfont nav-home"></a> | 13 | <a href="/home/helpDetail?code=20111130-152530&caption=如何使用YOHO币支付" class="iconfont nav-home"></a> |
14 | {{/currencyDetailPage}} | 14 | {{/currencyDetailPage}} |
15 | - {{#navPhone}} | ||
16 | - <a href="{{.}}" class="iconfont nav-home"></a> | ||
17 | - {{/navPhone}} | 15 | + {{#serviceUrl}} |
16 | + <a href="{{serviceUrl}}" target="_blank" class="iconfont nav-home"></a> | ||
17 | + {{/serviceUrl}} | ||
18 | {{#navTitle}} | 18 | {{#navTitle}} |
19 | <p class="nav-title">{{.}}</p> | 19 | <p class="nav-title">{{.}}</p> |
20 | {{/navTitle}} | 20 | {{/navTitle}} |
@@ -22,15 +22,14 @@ class BoysController extends AbstractAction | @@ -22,15 +22,14 @@ class BoysController extends AbstractAction | ||
22 | // 设置浏览器缓存5分钟 | 22 | // 设置浏览器缓存5分钟 |
23 | $this->setExpires(300); // 缓存5分钟 | 23 | $this->setExpires(300); // 缓存5分钟 |
24 | } | 24 | } |
25 | - | ||
26 | // 设置网站标题 | 25 | // 设置网站标题 |
27 | $this->setTitle('男生首页'); | 26 | $this->setTitle('男生首页'); |
28 | // 显示侧边栏 | 27 | // 显示侧边栏 |
29 | $this->setNavSide('boys'); | 28 | $this->setNavSide('boys'); |
30 | // 显示底部TAB | 29 | // 显示底部TAB |
31 | $this->setNavFooterTab(); | 30 | $this->setNavFooterTab(); |
32 | - | ||
33 | - $content = Index\HomeModel::getBoysFloor(); | 31 | + $uid = $this->getUid(true); |
32 | + $content = Index\HomeModel::getBoysFloor($uid); | ||
34 | // $content[] = array( | 33 | // $content[] = array( |
35 | // 'notice' => array( | 34 | // 'notice' => array( |
36 | // 'open' => true, | 35 | // 'open' => true, |
@@ -23,13 +23,13 @@ class GirlsController extends AbstractAction | @@ -23,13 +23,13 @@ class GirlsController extends AbstractAction | ||
23 | $this->setNavSide('girls'); | 23 | $this->setNavSide('girls'); |
24 | // 显示底部TAB | 24 | // 显示底部TAB |
25 | $this->setNavFooterTab(); | 25 | $this->setNavFooterTab(); |
26 | - | 26 | + $uid = $this->getUid(true); |
27 | // 渲染模板并输出 | 27 | // 渲染模板并输出 |
28 | $this->_view->display('index', array( | 28 | $this->_view->display('index', array( |
29 | 'grilsHomePage' => true, | 29 | 'grilsHomePage' => true, |
30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), | 30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), |
31 | 'maybeLike' => true, | 31 | 'maybeLike' => true, |
32 | - 'content' => Index\HomeModel::getGirlsFloor(), | 32 | + 'content' => Index\HomeModel::getGirlsFloor($uid), |
33 | 'pageFooter' => true, | 33 | 'pageFooter' => true, |
34 | )); | 34 | )); |
35 | } | 35 | } |
@@ -1033,7 +1033,7 @@ class HomeController extends AbstractAction | @@ -1033,7 +1033,7 @@ class HomeController extends AbstractAction | ||
1033 | 1033 | ||
1034 | $this->_view->display('order-detail', array( | 1034 | $this->_view->display('order-detail', array( |
1035 | 'orderDetailPage' => true, | 1035 | 'orderDetailPage' => true, |
1036 | - 'navPhone' => 'tel:400-889-9646', | 1036 | + 'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=', |
1037 | 'orderDetail' => $orderDetail, | 1037 | 'orderDetail' => $orderDetail, |
1038 | 'orderCode' => $orderCode, | 1038 | 'orderCode' => $orderCode, |
1039 | 'orderTotal' => isset($orderDetail['goodsAmount']) ? $orderDetail['goodsAmount'] : 0, | 1039 | 'orderTotal' => isset($orderDetail['goodsAmount']) ? $orderDetail['goodsAmount'] : 0, |
@@ -23,13 +23,13 @@ class KidsController extends AbstractAction | @@ -23,13 +23,13 @@ class KidsController extends AbstractAction | ||
23 | $this->setNavSide('kids'); | 23 | $this->setNavSide('kids'); |
24 | // 显示底部TAB | 24 | // 显示底部TAB |
25 | $this->setNavFooterTab(); | 25 | $this->setNavFooterTab(); |
26 | - | 26 | + $uid = $this->getUid(true); |
27 | // 渲染模板并输出 | 27 | // 渲染模板并输出 |
28 | $this->_view->display('index', array( | 28 | $this->_view->display('index', array( |
29 | 'kidsHomePage' => true, | 29 | 'kidsHomePage' => true, |
30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), | 30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), |
31 | 'maybeLike' => true, | 31 | 'maybeLike' => true, |
32 | - 'content' => Index\HomeModel::getKidsFloor(), | 32 | + 'content' => Index\HomeModel::getKidsFloor($uid), |
33 | 'pageFooter' => true, | 33 | 'pageFooter' => true, |
34 | )); | 34 | )); |
35 | } | 35 | } |
@@ -23,13 +23,13 @@ class LifestyleController extends AbstractAction | @@ -23,13 +23,13 @@ class LifestyleController extends AbstractAction | ||
23 | $this->setNavSide('lifestyle'); | 23 | $this->setNavSide('lifestyle'); |
24 | // 显示底部TAB | 24 | // 显示底部TAB |
25 | $this->setNavFooterTab(); | 25 | $this->setNavFooterTab(); |
26 | - | 26 | + $uid = $this->getUid(true); |
27 | // 渲染模板并输出 | 27 | // 渲染模板并输出 |
28 | $this->_view->display('index', array( | 28 | $this->_view->display('index', array( |
29 | 'lifestyleHomePage' => true, | 29 | 'lifestyleHomePage' => true, |
30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), | 30 | 'homeHeader' => array('searchUrl' => Helpers::url('/search', null, 'search')), |
31 | 'maybeLike' => true, | 31 | 'maybeLike' => true, |
32 | - 'content' => Index\HomeModel::getLifestyleFloor(), | 32 | + 'content' => Index\HomeModel::getLifestyleFloor($uid), |
33 | 'pageFooter' => true, | 33 | 'pageFooter' => true, |
34 | )); | 34 | )); |
35 | } | 35 | } |
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | namespace Index; | 3 | namespace Index; |
4 | 4 | ||
5 | use LibModels\Wap\Home\CartData; | 5 | use LibModels\Wap\Home\CartData; |
6 | +use LibModels\Wap\Home\OrderData; | ||
6 | use Plugin\Helpers; | 7 | use Plugin\Helpers; |
7 | use Plugin\Images; | 8 | use Plugin\Images; |
8 | 9 | ||
@@ -869,7 +870,8 @@ class CartModel | @@ -869,7 +870,8 @@ class CartModel | ||
869 | 870 | ||
870 | if ($onlyGift) { | 871 | if ($onlyGift) { |
871 | // 赠品 | 872 | // 赠品 |
872 | - $result['freebie'] = Helpers::formatAdvanceGoods($data['gift_list']); | 873 | + $count = 0; |
874 | + $result['freebie'] = Helpers::formatAdvanceGoods($data['gift_list'], $count, true); | ||
873 | break; | 875 | break; |
874 | } | 876 | } |
875 | if ($onlyAdvanceBuy) { | 877 | if ($onlyAdvanceBuy) { |
@@ -932,4 +934,24 @@ class CartModel | @@ -932,4 +934,24 @@ class CartModel | ||
932 | return $result; | 934 | return $result; |
933 | } | 935 | } |
934 | 936 | ||
937 | + /** | ||
938 | + * 支付成功页 | ||
939 | + */ | ||
940 | + public static function paySuccessData($orderCode, $uid) | ||
941 | + { | ||
942 | + $result = array(); | ||
943 | + $orderInfo = OrderData::viewOrderData($orderCode, $uid, ''); | ||
944 | + | ||
945 | + if (isset($orderInfo['code']) && $orderInfo['code'] == 200 && !empty($orderInfo['data'])) { | ||
946 | + if ($orderInfo['data']['payment_amount'] > 0) { | ||
947 | + $result['price'] = $orderInfo['data']['payment_amount']; | ||
948 | + } | ||
949 | + } | ||
950 | + $param = array('order_code'=>$orderCode); | ||
951 | + $result['guang'] = Helpers::url('','','guang'); | ||
952 | + $result['orderDetail'] = Helpers::url('/home/orderDetail',$param); | ||
953 | + | ||
954 | + return $result; | ||
955 | + } | ||
956 | + | ||
935 | } | 957 | } |
@@ -178,10 +178,9 @@ class HomeModel | @@ -178,10 +178,9 @@ class HomeModel | ||
178 | * | 178 | * |
179 | * @return array | false | 179 | * @return array | false |
180 | */ | 180 | */ |
181 | - public static function getBoysFloor() | 181 | + public static function getBoysFloor($uid = 0) |
182 | { | 182 | { |
183 | $result = array(); | 183 | $result = array(); |
184 | - | ||
185 | if (USE_CACHE) { | 184 | if (USE_CACHE) { |
186 | // 先尝试获取一级缓存(master), 有数据则直接返回. | 185 | // 先尝试获取一级缓存(master), 有数据则直接返回. |
187 | $result = Cache::get(CacheConfig::KEY_ACTION_BOYS_INDEX, 'master'); | 186 | $result = Cache::get(CacheConfig::KEY_ACTION_BOYS_INDEX, 'master'); |
@@ -189,9 +188,8 @@ class HomeModel | @@ -189,9 +188,8 @@ class HomeModel | ||
189 | return $result; | 188 | return $result; |
190 | } | 189 | } |
191 | } | 190 | } |
192 | - | ||
193 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 | 191 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 |
194 | - $channelData = IndexData::getResourceData('1,3', self::CODE_FLOOR_BOYS); | 192 | + $channelData = IndexData::getResourceData('1,3', self::CODE_FLOOR_BOYS, 20, 1, $uid); |
195 | if (isset($channelData['code']) && $channelData['code'] == 200) { | 193 | if (isset($channelData['code']) && $channelData['code'] == 200) { |
196 | $result = FloorProcess::getContent($channelData['data']); | 194 | $result = FloorProcess::getContent($channelData['data']); |
197 | } | 195 | } |
@@ -215,7 +213,7 @@ class HomeModel | @@ -215,7 +213,7 @@ class HomeModel | ||
215 | * | 213 | * |
216 | * @return array | false | 214 | * @return array | false |
217 | */ | 215 | */ |
218 | - public static function getGirlsFloor() | 216 | + public static function getGirlsFloor($uid = 0) |
219 | { | 217 | { |
220 | $result = array(); | 218 | $result = array(); |
221 | 219 | ||
@@ -228,7 +226,7 @@ class HomeModel | @@ -228,7 +226,7 @@ class HomeModel | ||
228 | } | 226 | } |
229 | 227 | ||
230 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 | 228 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 |
231 | - $channelData = IndexData::getResourceData('2,3', self::CODE_FLOOR_GIRLS); | 229 | + $channelData = IndexData::getResourceData('2,3', self::CODE_FLOOR_GIRLS, 20, 1, $uid); |
232 | if (isset($channelData['code']) && $channelData['code'] == 200) { | 230 | if (isset($channelData['code']) && $channelData['code'] == 200) { |
233 | $result = FloorProcess::getContent($channelData['data'], 2); | 231 | $result = FloorProcess::getContent($channelData['data'], 2); |
234 | } | 232 | } |
@@ -249,10 +247,11 @@ class HomeModel | @@ -249,10 +247,11 @@ class HomeModel | ||
249 | 247 | ||
250 | /** | 248 | /** |
251 | * 获取潮童首页的楼层数据 | 249 | * 获取潮童首页的楼层数据 |
252 | - * | 250 | + * @param int $uid |
251 | + * @modify sefon 2016-4-19 13:21:28 | ||
253 | * @return array | false | 252 | * @return array | false |
254 | */ | 253 | */ |
255 | - public static function getKidsFloor() | 254 | + public static function getKidsFloor($uid = 0) |
256 | { | 255 | { |
257 | $result = false; | 256 | $result = false; |
258 | 257 | ||
@@ -267,7 +266,7 @@ class HomeModel | @@ -267,7 +266,7 @@ class HomeModel | ||
267 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 | 266 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 |
268 | $channelData = IndexData::getResourceData('', self::CODE_FLOOR_KIDS); | 267 | $channelData = IndexData::getResourceData('', self::CODE_FLOOR_KIDS); |
269 | if (isset($channelData['code']) && $channelData['code'] == 200) { | 268 | if (isset($channelData['code']) && $channelData['code'] == 200) { |
270 | - $result = FloorProcess::getContent($channelData['data'], 3); | 269 | + $result = FloorProcess::getContent($channelData['data'], 3, 20, 1, $uid); |
271 | } | 270 | } |
272 | 271 | ||
273 | if (USE_CACHE) { | 272 | if (USE_CACHE) { |
@@ -286,10 +285,11 @@ class HomeModel | @@ -286,10 +285,11 @@ class HomeModel | ||
286 | 285 | ||
287 | /** | 286 | /** |
288 | * 获取创意生活首页的楼层数据 | 287 | * 获取创意生活首页的楼层数据 |
289 | - * | 288 | + * @param int $uid |
289 | + * @modify sefon 2016-4-19 13:22:34 | ||
290 | * @return array | false | 290 | * @return array | false |
291 | */ | 291 | */ |
292 | - public static function getLifestyleFloor() | 292 | + public static function getLifestyleFloor($uid = 0) |
293 | { | 293 | { |
294 | $result = false; | 294 | $result = false; |
295 | 295 | ||
@@ -302,7 +302,7 @@ class HomeModel | @@ -302,7 +302,7 @@ class HomeModel | ||
302 | } | 302 | } |
303 | 303 | ||
304 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 | 304 | // 调用接口获取楼层数据, 并封装成模板渲染需要的数据格式 |
305 | - $channelData = IndexData::getResourceData('', self::CODE_FLOOR_LIFESTYLE); | 305 | + $channelData = IndexData::getResourceData('', self::CODE_FLOOR_LIFESTYLE, 20, 1, $uid); |
306 | if (isset($channelData['code']) && $channelData['code'] == 200) { | 306 | if (isset($channelData['code']) && $channelData['code'] == 200) { |
307 | $result = FloorProcess::getContent($channelData['data'], 4); | 307 | $result = FloorProcess::getContent($channelData['data'], 4); |
308 | } | 308 | } |
-
Please register or login to post a comment