Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Conflicts: yohobuy/m.yohobuy.com/application/controllers/Home.php
Showing
27 changed files
with
602 additions
and
408 deletions
@@ -947,18 +947,20 @@ | @@ -947,18 +947,20 @@ | ||
947 | order: { | 947 | order: { |
948 | orders: [ | 948 | orders: [ |
949 | ... | 949 | ... |
950 | - ] | 950 | + ], |
951 | + //没有订单的情况不传orders | ||
952 | + walkWayUrl: '' //随便逛逛url | ||
951 | } | 953 | } |
952 | } | 954 | } |
953 | 955 | ||
954 | 956 | ||
955 | //订单 | 957 | //订单 |
956 | { | 958 | { |
959 | + detailUrl: '', | ||
957 | orderNum: '', | 960 | orderNum: '', |
958 | orderStatus: '', | 961 | orderStatus: '', |
959 | goods: [ | 962 | goods: [ |
960 | { | 963 | { |
961 | - id: '', | ||
962 | thumb: '', | 964 | thumb: '', |
963 | gift: true, //是否赠品 | 965 | gift: true, //是否赠品 |
964 | advanceBuy: true, //是否加价购 | 966 | advanceBuy: true, //是否加价购 |
@@ -18,14 +18,15 @@ class Yohobuy | @@ -18,14 +18,15 @@ class Yohobuy | ||
18 | { | 18 | { |
19 | 19 | ||
20 | /* 正式环境 */ | 20 | /* 正式环境 */ |
21 | - // const API_URL = 'http://api2.open.yohobuy.com/'; | ||
22 | - // const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
23 | - // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 21 | + const API_URL = 'http://api2.open.yohobuy.com/'; |
22 | + const API_URL2 = 'http://api.open.yohobuy.com/'; | ||
23 | + const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
24 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
24 | 25 | ||
25 | /* 测试环境 */ | 26 | /* 测试环境 */ |
26 | - const API_URL = 'http://test2.open.yohobuy.com/'; | ||
27 | - const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
28 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 27 | +// const API_URL = 'http://test2.open.yohobuy.com/'; |
28 | +// const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
29 | +// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
29 | 30 | ||
30 | /** | 31 | /** |
31 | * 私钥列表 | 32 | * 私钥列表 |
@@ -42,5 +42,6 @@ class CacheConfig | @@ -42,5 +42,6 @@ class CacheConfig | ||
42 | const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情 | 42 | const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情 |
43 | const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR | 43 | const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR |
44 | const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 | 44 | const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 |
45 | + const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表 | ||
45 | 46 | ||
46 | } | 47 | } |
@@ -19,7 +19,7 @@ class GradeData | @@ -19,7 +19,7 @@ class GradeData | ||
19 | * @param string $uid 用户id | 19 | * @param string $uid 用户id |
20 | * @return array 接口返回的会员等级数据 | 20 | * @return array 接口返回的会员等级数据 |
21 | */ | 21 | */ |
22 | - public function getGradeData($gender,$channel, $uid) { | 22 | + public function getGradeData($gender, $channel, $uid) { |
23 | $urlList = array(); | 23 | $urlList = array(); |
24 | //获取会员等级数据 | 24 | //获取会员等级数据 |
25 | $param = Yohobuy::param(); | 25 | $param = Yohobuy::param(); |
@@ -27,8 +27,8 @@ class GradeData | @@ -27,8 +27,8 @@ class GradeData | ||
27 | $param['uid'] = $uid; | 27 | $param['uid'] = $uid; |
28 | $param['method'] = 'app.Passport.vip'; | 28 | $param['method'] = 'app.Passport.vip'; |
29 | $param['client_secret'] = Sign::getSign($param); | 29 | $param['client_secret'] = Sign::getSign($param); |
30 | - $urlList['grade'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param); | ||
31 | - | 30 | + $urlList['grade'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param); |
31 | + | ||
32 | //获取用户基本信息数据(用来得到username) | 32 | //获取用户基本信息数据(用来得到username) |
33 | $param = Yohobuy::param(); | 33 | $param = Yohobuy::param(); |
34 | $param['gender'] = $gender; | 34 | $param['gender'] = $gender; |
@@ -36,8 +36,8 @@ class GradeData | @@ -36,8 +36,8 @@ class GradeData | ||
36 | $param['yh_channel'] = $channel; | 36 | $param['yh_channel'] = $channel; |
37 | $param['method'] = 'app.passport.profile'; | 37 | $param['method'] = 'app.passport.profile'; |
38 | $param['client_secret'] = Sign::getSign($param); | 38 | $param['client_secret'] = Sign::getSign($param); |
39 | - $urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param); | ||
40 | - | 39 | + $urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param); |
40 | + | ||
41 | return Yohobuy::getMulti($urlList); | 41 | return Yohobuy::getMulti($urlList); |
42 | } | 42 | } |
43 | 43 |
@@ -4,6 +4,7 @@ namespace LibModels\Wap\Home; | @@ -4,6 +4,7 @@ namespace LibModels\Wap\Home; | ||
4 | 4 | ||
5 | use Api\Yohobuy; | 5 | use Api\Yohobuy; |
6 | use Api\Sign; | 6 | use Api\Sign; |
7 | + | ||
7 | /* | 8 | /* |
8 | * To change this license header, choose License Headers in Project Properties. | 9 | * To change this license header, choose License Headers in Project Properties. |
9 | * To change this template file, choose Tools | Templates | 10 | * To change this template file, choose Tools | Templates |
@@ -18,11 +19,13 @@ use Api\Sign; | @@ -18,11 +19,13 @@ use Api\Sign; | ||
18 | class OrderData | 19 | class OrderData |
19 | { | 20 | { |
20 | /* | 21 | /* |
21 | - * 获取订单数据 | ||
22 | - * To change this template file, choose Tools | Templates | ||
23 | - * and open the template in the editor. | ||
24 | - */ | ||
25 | - public function getOrderData($type,$page,$limit,$gender,$yh_channel,$uid){ | 22 | + * 获取订单数据 |
23 | + * To change this template file, choose Tools | Templates | ||
24 | + * and open the template in the editor. | ||
25 | + */ | ||
26 | + | ||
27 | + public function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) { | ||
28 | + //构建必传参数 | ||
26 | $param = Yohobuy::param(); | 29 | $param = Yohobuy::param(); |
27 | $param['gender'] = $gender; | 30 | $param['gender'] = $gender; |
28 | $param['limit'] = $limit; | 31 | $param['limit'] = $limit; |
@@ -32,7 +35,8 @@ class OrderData | @@ -32,7 +35,8 @@ class OrderData | ||
32 | $param['uid'] = $uid; | 35 | $param['uid'] = $uid; |
33 | $param['yh_channel'] = $yh_channel; | 36 | $param['yh_channel'] = $yh_channel; |
34 | $param['client_secret'] = Sign::getSign($param); | 37 | $param['client_secret'] = Sign::getSign($param); |
35 | - print_r($param); | ||
36 | - return Yohobuy::get(Yohobuy::API_URL,$param); | 38 | + //调用接口获得数据 |
39 | + return Yohobuy::get(Yohobuy::API_URL2, $param); | ||
37 | } | 40 | } |
41 | + | ||
38 | } | 42 | } |
@@ -298,7 +298,12 @@ class FloorProcess | @@ -298,7 +298,12 @@ class FloorProcess | ||
298 | $one['img'] = Helpers::getImageUrl($one['src'], 640, 403); | 298 | $one['img'] = Helpers::getImageUrl($one['src'], 640, 403); |
299 | unset($one['src']); | 299 | unset($one['src']); |
300 | } | 300 | } |
301 | - $result['big_image']['list'] = $data['big_image']; | 301 | + |
302 | + // 区别多张图与一张图 | ||
303 | + if (count($data['big_image']) > 1) { | ||
304 | + $result['big_image']['list'] = $data['big_image']; | ||
305 | + unset($data['big_image']); | ||
306 | + } | ||
302 | 307 | ||
303 | foreach ($data['list'] as $kk => &$one) { | 308 | foreach ($data['list'] as $kk => &$one) { |
304 | if ($kk == 0) { | 309 | if ($kk == 0) { |
@@ -318,8 +323,6 @@ class FloorProcess | @@ -318,8 +323,6 @@ class FloorProcess | ||
318 | $data['title']['more_url'] = Helpers::getFilterUrl($data['title']['more_url']); | 323 | $data['title']['more_url'] = Helpers::getFilterUrl($data['title']['more_url']); |
319 | } | 324 | } |
320 | 325 | ||
321 | - unset($data['big_image']); | ||
322 | - | ||
323 | $result['goodsCategory'] = $data; | 326 | $result['goodsCategory'] = $data; |
324 | 327 | ||
325 | return $result; | 328 | return $result; |
@@ -50,4 +50,47 @@ class NewSaleProcess | @@ -50,4 +50,47 @@ class NewSaleProcess | ||
50 | return $result; | 50 | return $result; |
51 | } | 51 | } |
52 | 52 | ||
53 | + /** | ||
54 | + * 处理热销排行榜数据 | ||
55 | + * | ||
56 | + * @param array $products 接口传回的数据 | ||
57 | + * @param boolean $notab 是否传回tab数据 | ||
58 | + * @param int $limit 查询返回的最大限制数 | ||
59 | + * @param int $page 分页第几页 | ||
60 | + * @return array 处理之后的数据 | ||
61 | + */ | ||
62 | + public static function topData($products, $notab, $limit, $page) | ||
63 | + { | ||
64 | + $result = array(); | ||
65 | + | ||
66 | + // 处理Tabs | ||
67 | + if (!$notab && isset($products['tabs'])) { | ||
68 | + $result['tabs'] = array(); | ||
69 | + foreach ($products['tabs'] as $key => $one) { | ||
70 | + $tabItem = array(); | ||
71 | + $tabItem['title'] = $one; | ||
72 | + $tabItem['dataId'] = $key; | ||
73 | + if ($key === 1) { | ||
74 | + $tabItem['focus'] = true; | ||
75 | + } | ||
76 | + $result['tabs'][] = $tabItem; | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | + // 处理商品 | ||
81 | + if (isset($products['product_list'])) { | ||
82 | + | ||
83 | + $count = count($products['product_list']); | ||
84 | + $one = array(); | ||
85 | + foreach ($products['product_list'] as $key => $single) { | ||
86 | + $one = Helpers::formatProduct($single, true, false, false, 75, 114); | ||
87 | + $one['rank'] = $limit * ($page -1) + $key + 1; | ||
88 | + | ||
89 | + $result['goods'][] = $one; | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + return $result; | ||
94 | + } | ||
95 | + | ||
53 | } | 96 | } |
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Mon Nov 16 11:40:15 2015 | 5 | +Created by FontForge 20120731 at Mon Nov 16 18:08:15 2015 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 16 11:40:15 2015 | @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 16 11:40:15 2015 | ||
19 | bbox="-0.75 -224 3943 812.871" | 19 | bbox="-0.75 -224 3943 812.871" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E632" | 22 | + unicode-range="U+0078-E63E" |
23 | /> | 23 | /> |
24 | <missing-glyph horiz-adv-x="374" | 24 | <missing-glyph horiz-adv-x="374" |
25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | 25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> |
@@ -196,5 +196,56 @@ q0 58 40.5 98.5t98.5 40.5t98.5 -40.5t40.5 -98.5t-40.5 -99t-98.5 -41q-28 0 -54 11 | @@ -196,5 +196,56 @@ q0 58 40.5 98.5t98.5 40.5t98.5 -40.5t40.5 -98.5t-40.5 -99t-98.5 -41q-28 0 -54 11 | ||
196 | <glyph glyph-name="uniE632" unicode="" | 196 | <glyph glyph-name="uniE632" unicode="" |
197 | d="M313 163h397v69h-397v-69zM313 26h397v68h-397v-68zM611 747h-430q-4 0 -7 -0.5t-6 -2t-6 -3.5t-5 -4t-4 -5t-3 -6t-1.5 -6.5t-0.5 -6.5v-825q0 -5 1.5 -10.5t4.5 -9.5t7 -7.5t9 -5t11 -1.5h661q9 0 17 4.5t12.5 12.5t4.5 17v619zM644 626l131 -119h-131v119zM809 -77 | 197 | d="M313 163h397v69h-397v-69zM313 26h397v68h-397v-68zM611 747h-430q-4 0 -7 -0.5t-6 -2t-6 -3.5t-5 -4t-4 -5t-3 -6t-1.5 -6.5t-0.5 -6.5v-825q0 -5 1.5 -10.5t4.5 -9.5t7 -7.5t9 -5t11 -1.5h661q9 0 17 4.5t12.5 12.5t4.5 17v619zM644 626l131 -119h-131v119zM809 -77 |
198 | h-595v755h364v-206q0 -14 9.5 -24t23.5 -10h198v-515zM313 300h397v69h-397v-69z" /> | 198 | h-595v755h364v-206q0 -14 9.5 -24t23.5 -10h198v-515zM313 300h397v69h-397v-69z" /> |
199 | + <glyph glyph-name="uniE633" unicode="" horiz-adv-x="1304" | ||
200 | +d="M1303 454l-161 242h-304v-443h233q12 0 23 6.5t17 17t6 23.5q0 8 -2.5 15t-6.5 12.5t-10 10t-13 7t-14 2.5h-140v256h161l118 -177v-242h-442v577q0 14 -7 25.5t-18.5 18.5t-25.5 7h-666q-21 0 -36 -15t-15 -36v-620q0 -21 15 -35.5t36 -14.5h142q-30 -49 -30 -105 | ||
201 | +q0 -82 58 -140t140 -58t140 58t58 140q0 28 -8 54.5t-23 50.5h363q-30 -49 -30 -105q0 -82 58 -140t140 -58t140 58t58 140q0 56 -31 105h77v363zM93 719h582v-535h-582v535zM465 -14q0 -43 -30.5 -74t-74 -31t-74 31t-30.5 74t30.5 74t74 31t74 -31t30.5 -74zM1164 -14 | ||
202 | +q0 -29 -14 -53t-38.5 -38t-52.5 -14q-43 0 -74 31t-31 74t31 74t74 31t74 -31t31 -74z" /> | ||
203 | + <glyph glyph-name="uniE634" unicode="" horiz-adv-x="1476" | ||
204 | +d="M1403 812h-1331q-14 0 -27.5 -5.5t-23.5 -15.5t-15.5 -23.5t-5.5 -27.5v-880q0 -30 21 -51t51 -21h1331q30 0 51.5 21t21.5 51v880q0 19 -10 36t-26.5 26.5t-36.5 9.5zM120 692h1235v-151h-1235v151zM120 330h1235v-422h-1235v422zM211 210h572v-61h-572v61zM211 89h331 | ||
205 | +v-60h-331v60z" /> | ||
206 | + <glyph glyph-name="uniE635" unicode="" | ||
207 | +d="M512 797q-102 0 -194.5 -39.5t-160 -106.5t-107 -160t-39.5 -195q0 -68 18 -133t50.5 -119.5t78.5 -101t101 -79t120 -50.5t133 -18q102 0 194.5 40t160 107t107 160t39.5 194q0 82 -25.5 158.5t-71.5 138t-108 108t-138 71.5t-158 25zM512 -118q-112 0 -207.5 55.5 | ||
208 | +t-151 151t-55.5 207.5q0 84 33 161t88.5 132.5t132 88t160.5 32.5q112 0 207.5 -55.5t151 -150.5t55.5 -207.5t-55.5 -208t-151 -151t-207.5 -55.5zM512 471q25 0 43 -18t18 -44h87q0 50 -29 89t-75 53v50q0 6 -3 11t-8 8t-11 3h-44q-9 0 -15.5 -6.5t-6.5 -15.5v-50 | ||
209 | +q-22 -7 -41.5 -20.5t-33.5 -32t-21.5 -41.5t-7.5 -48q0 -104 133 -154q27 -9 44 -20t23 -22t7.5 -16.5t1.5 -13.5q0 -25 -18 -43t-43 -18q-17 0 -31 8.5t-22 22.5t-8 30h-87q0 -73 59 -118q21 -16 45 -24v-50q0 -9 6.5 -15t15.5 -6h44q6 0 11 2.5t8 7.5t3 11v50q46 15 75 54 | ||
210 | +t29 88q0 105 -133 154q-18 7 -32 14.5t-22 14.5t-13 13t-6.5 12.5t-2 10t-0.5 7.5q0 26 18 44t43 18z" /> | ||
211 | + <glyph glyph-name="uniE636" unicode="" | ||
212 | +d="M947 675h-892q-23 0 -39 -16t-16 -38v-642q0 -23 16 -39t39 -16h892q22 0 38 16t16 39v642q0 15 -7 27.5t-19.5 19.5t-27.5 7zM836 584l-335 -260l-336 260h671zM91 16v511l376 -293q4 -3 8 -5t8 -3.5t8.5 -2t9.5 -0.5q18 0 33 11l376 293v-511h-819z" /> | ||
213 | + <glyph glyph-name="uniE637" unicode="" | ||
214 | +d="M512 572q-31 0 -59 -12t-48.5 -32.5t-32.5 -48.5t-12 -59q0 -63 44.5 -107.5t107.5 -44.5q31 0 59 12t48.5 32.5t32.5 48.5t12 59q0 63 -44.5 107.5t-107.5 44.5zM512 796q-149 0 -257 -103q-107 -100 -117 -245q-1 -14 -1 -28q0 -56 36 -137.5t81 -151t104 -146.5 | ||
215 | +t85 -107t44 -50l25 -28l25 28q18 20 44 50t85 107t104 146.5t81 151t36 137.5q0 76 -29.5 145.5t-80 120t-120 80.5t-145.5 30zM512 -97q-46 54 -93.5 115.5t-98.5 137t-83 147t-32 117.5q0 127 90 217t217 90t217 -90t90 -217q0 -46 -32 -117.5t-83 -147t-98.5 -137 | ||
216 | +t-93.5 -115.5z" /> | ||
217 | + <glyph glyph-name="uniE638" unicode="" horiz-adv-x="1335" | ||
218 | +d="M1273 -88h-1179q-26 0 -44 -18t-18 -44t18 -44t44 -18h1179q17 0 31 8.5t22.5 22.5t8.5 31t-8.5 31.5t-22.5 22.5t-31 8zM841 657h429q27 0 46 18t19 44t-19 44t-46 18h-429q-27 0 -46 -18t-19 -44q0 -10 3.5 -19.5t9.5 -17t14 -13.5t17.5 -9t20.5 -3zM841 230h429 | ||
219 | +q27 0 46 18t19 44q0 17 -8.5 31.5t-23.5 22.5t-33 8h-429q-13 0 -25 -5t-20.5 -13t-14 -19.5t-5.5 -24t5.5 -24t14 -20t20.5 -13.5t25 -5zM85 230h434q26 0 44 18t18 44v435q0 17 -8 31t-22.5 22.5t-31.5 8.5h-434q-26 0 -44 -18.5t-18 -43.5v-435q0 -25 18 -43.5t44 -18.5z | ||
220 | +M147 665h310v-311h-310v311z" /> | ||
221 | + <glyph glyph-name="uniE639" unicode="" | ||
222 | +d="M507 811q-81 0 -157.5 -25.5t-138 -72t-108 -108t-72 -138t-25.5 -157.5q0 -185 121 -326q115 -134 287 -167q47 -8 93 -9q46 0 90.5 8.5t85 23.5t78 37t70 49.5t60 60t49.5 70t37 78t23.5 85t8.5 90.5q0 101 -40 194t-107 160t-160 107t-195 40zM507 -104 | ||
223 | +q-112 0 -207.5 55.5t-150.5 150.5t-55 207.5t55 208t150.5 151t207.5 55.5q68 0 131 -21t114 -59.5t89.5 -89.5t59 -114t20.5 -130q0 -113 -55.5 -208t-150.5 -150.5t-208 -55.5zM506 605h-1h-1q-67 0 -115 -47q-48 -48 -48 -116q0 -9 3 -17t9 -14t14 -9.5t17 -3.5t17 3.5 | ||
224 | +t14 9.5t9.5 14t3.5 17q0 32 22 54q22 21 55 22q10 0 19.5 -3t17.5 -8t15 -12t12 -15t8 -17.5t3 -19.5q1 -24 -12 -43t-34 -29q-22 -9 -39 -26t-26 -39.5t-9 -47.5v-36q0 -18 13 -30.5t31 -12.5t31 12.5t13 30.5v36q0 24 20 33q46 20 73 61.5t26 91.5q-1 66 -48 113t-113 48z | ||
225 | +M504 135q-23 0 -39 -16t-16 -38q0 -5 1 -10t3 -9.5t4 -8.5t5 -7.5t6.5 -6.5t8 -5.5t8.5 -4t9 -2.5t10 -1q23 0 38.5 16t15.5 39q0 9 -2.5 17t-7.5 15t-12 12t-15 7.5t-17 2.5z" /> | ||
226 | + <glyph glyph-name="uniE63A" unicode="" | ||
227 | +d="M964 376q14 1 25 8t17.5 18.5t6.5 25.5v147q0 14 -7 26t-19 19t-26 7h-898q-10 0 -20 -4t-17 -11t-11 -17t-4 -20v-147q0 -21 14 -36t35 -16q29 -2 49.5 -24t20.5 -52t-20.5 -52t-49.5 -24q-21 -1 -35 -16t-14 -36v-147q0 -21 15.5 -36.5t36.5 -15.5h898q21 0 36.5 15.5 | ||
228 | +t15.5 36.5v147q0 21 -14 36t-35 16q-19 2 -35.5 12.5t-25.5 27t-9 36.5q0 15 5.5 28.5t15 23.5t22.5 16.5t27 7.5zM926 143v-83h-828v83q52 15 85.5 58.5t33.5 98.5t-33.5 98.5t-85.5 58.5v83h283v-66h66v66h479v-83q-52 -15 -85.5 -58.5t-33.5 -98.5t33.5 -98.5t85.5 -58.5 | ||
229 | +zM381 278h66v-109h-66v109zM381 431h66v-109h-66v109zM381 126h66v-66h-66v66z" /> | ||
230 | + <glyph glyph-name="uniE63B" unicode="" horiz-adv-x="1199" | ||
231 | +d="M1149 812h-1099q-21 0 -35.5 -14.5t-14.5 -35.5v-350q0 -20 14.5 -35t35.5 -15h1099q13 0 24.5 7t18.5 18.5t7 24.5v350q0 21 -14.5 35.5t-35.5 14.5zM100 712h999v-250h-999v250zM1024 312q-21 0 -35.5 -14.5t-14.5 -34.5v-375h-749v375q0 20 -14.5 34.5t-35.5 14.5 | ||
232 | +t-35.5 -14.5t-14.5 -34.5v-425q0 -21 14.5 -35.5t35.5 -14.5h849q10 0 19.5 4t16 10.5t10.5 16t4 19.5v425q0 20 -14.5 34.5t-35.5 14.5zM325 312q-10 0 -19.5 -3.5t-16 -10.5t-10.5 -16t-4 -19v-200q0 -33 30 -46q10 -4 20 -4h549q21 0 35.5 14.5t14.5 35.5v200 | ||
233 | +q0 20 -14.5 34.5t-35.5 14.5t-35.5 -14.5t-14.5 -34.5v-150h-449v150q0 32 -30 45q-10 4 -20 4z" /> | ||
234 | + <glyph glyph-name="uniE63C" unicode="" horiz-adv-x="1048" | ||
235 | +d="M298 437q-21 0 -35.5 -14.5t-14.5 -35.5t14.5 -35.5t35.5 -14.5q13 0 24.5 7t18.5 18.5t7 25t-7 25t-18.5 18t-24.5 6.5zM953 -55q95 93 95 215t-94 214q0 2 0.5 7t1 9t0.5 7q0 111 -64 205t-174.5 148.5t-239.5 54.5q-97 0 -185.5 -32.5t-152.5 -87t-102 -130 | ||
236 | +t-38 -158.5q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26t10.5 -25l5 -5q2 -2 4.5 -3.5t5 -2.5t5.5 -2t6 -1.5t6 -0.5q9 0 18 4l180 80q4 2 7 4q20 -7 39 -12q48 -80 138.5 -128t199.5 -48q38 0 74.5 6t70.5 19q1 -1 2 -1l140 -62q2 -2 5 -2l6 -2h6q20 0 32 15 | ||
237 | +q10 10 11 24t-7 26zM286 160q0 -17 2 -35v1q-35 16 -64.5 38t-53 48t-40.5 55.5t-26 62.5t-9 67q0 85 51.5 157t139.5 114t192 42q142 0 249.5 -76.5t128.5 -189.5q-43 21 -91 32t-98 11q-39 0 -77 -6.5t-71.5 -19t-64.5 -30.5t-56.5 -40t-46.5 -48.5t-35.5 -55.5t-22 -61 | ||
238 | +t-7.5 -66zM381 160q0 63 38.5 116.5t104 84.5t143.5 31q118 0 202 -68t84 -164q0 -62 -38.5 -115.5t-104.5 -84.5t-143 -31q-118 0 -202 68t-84 163zM527 191q-16 0 -27.5 -11t-11.5 -27q0 -11 5.5 -20t14.5 -14t19 -5q16 0 27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM667 191 | ||
239 | +q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5q10 0 19 5t14.5 14t5.5 20q0 7 -3.5 14.5t-8.5 12.5t-12 8t-15 3zM806 191q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5q0 7 -3 14.5t-8 12.5t-12.5 8t-15.5 3z" /> | ||
240 | + <glyph glyph-name="uniE63E" unicode="" | ||
241 | +d="M521 317zM768 -178h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1q-11 1 -23 2h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1 | ||
242 | +h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1 | ||
243 | +h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1q-145 72 -277 204.5t-205 277.5q-55 113 -56.5 201t52.5 140q13 13 30 13 | ||
244 | +t30 -13q8 -8 11 -19t0 -21.5t-11 -19.5q-32 -32 -26.5 -98t47.5 -149q68 -137 187.5 -256.5t256.5 -187.5q83 -42 149 -47.5t98 26.5q13 13 30 13t30 -13t13 -30t-13 -30q-54 -47 -141 -47zM333 355q-26 0 -39 26q-9 16 -4 32.5t21 23.5l99 46q15 8 26 23t8 33q0 13 -17 30 | ||
245 | +l-141 145q-10 9 -24.5 12.5t-31.5 0.5q-12 -7 -25 -13l-68 -73q-9 -8 -19.5 -11t-21.5 0t-19 11q-13 13 -13 30t13 30l68 68q28 28 60 34q80 20 141 -34l140 -140q4 -4 7 -8l6 -8q3 -4 6 -8.5t5 -8.5l4 -10q2 -4 4 -9l2 -10q2 -5 3 -10l2 -10q1 -8 1 -16.5t-1 -16.5 | ||
246 | +t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5 -10.5l-98 -47q0 2 -2.5 2t-6 -1t-4.5 -1zM875 -139q-10 0 -17 3t-13 9q-13 13 -13 30t13 30l68 68q13 13 13 26q7 35 -13 55l-141 141q-4 4 -30 17q-12 2 -23.5 -2t-19.5 -12.5t-12 -19.5 | ||
247 | +l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4 | ||
248 | +q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5 | ||
249 | +q-6 -21 -34 -21z" /> | ||
199 | </font> | 250 | </font> |
200 | </defs></svg> | 251 | </defs></svg> |
No preview for this file type
No preview for this file type
@@ -13,7 +13,7 @@ var $navLi = $('#order-nav > li'), | @@ -13,7 +13,7 @@ var $navLi = $('#order-nav > li'), | ||
13 | 13 | ||
14 | var $curContainer = $orderContainer.children('.orders').first();//保存当前显示的order-container | 14 | var $curContainer = $orderContainer.children('.orders').first();//保存当前显示的order-container |
15 | 15 | ||
16 | -var navHammer; | 16 | +var navHammer, orderHammer; |
17 | 17 | ||
18 | lazyLoad(); | 18 | lazyLoad(); |
19 | 19 | ||
@@ -33,4 +33,20 @@ navHammer.on('tap', function(e) { | @@ -33,4 +33,20 @@ navHammer.on('tap', function(e) { | ||
33 | 33 | ||
34 | $curContainer.addClass('hide'); | 34 | $curContainer.addClass('hide'); |
35 | $curContainer = $orderContainer.children(':eq(' + index + ')').removeClass('hide'); | 35 | $curContainer = $orderContainer.children(':eq(' + index + ')').removeClass('hide'); |
36 | +}); | ||
37 | + | ||
38 | +orderHammer = new Hammer(document.getElementById('order-container')); | ||
39 | +orderHammer.on('tap', function(e) { | ||
40 | + var $cur = $(e.target), | ||
41 | + $order, | ||
42 | + url; | ||
43 | + | ||
44 | + if ($cur.closest('.locHref').length > 0) { | ||
45 | + return; | ||
46 | + } | ||
47 | + | ||
48 | + $order = $cur.closest('.order'); | ||
49 | + url = $order.data('href'); | ||
50 | + | ||
51 | + location.href = url; | ||
36 | }); | 52 | }); |
@@ -8,31 +8,25 @@ var page = 1, | @@ -8,31 +8,25 @@ var page = 1, | ||
8 | hotnav, | 8 | hotnav, |
9 | listTop, | 9 | listTop, |
10 | navSwiper, | 10 | navSwiper, |
11 | - notab=0, | 11 | + notab = 0, |
12 | sort = '', | 12 | sort = '', |
13 | id = ''; | 13 | id = ''; |
14 | 14 | ||
15 | function hotrank(page, sort, tabId, notab) { | 15 | function hotrank(page, sort, tabId, notab) { |
16 | $.ajax({ | 16 | $.ajax({ |
17 | type: 'GET', | 17 | type: 'GET', |
18 | - url: '/product/newsale/selectHotrank', | 18 | + url: '/product/newsale/selectHotrank?' + sort, |
19 | dataType: 'html', | 19 | dataType: 'html', |
20 | data: { | 20 | data: { |
21 | page: page, | 21 | page: page, |
22 | - sort: sort, | ||
23 | tab_id: tabId, | 22 | tab_id: tabId, |
24 | notab: notab | 23 | notab: notab |
25 | }, | 24 | }, |
26 | success: function(data) { | 25 | success: function(data) { |
27 | if (page === 1) { | 26 | if (page === 1) { |
28 | - $('.rank-main').html(''); | ||
29 | - } | ||
30 | - console.log(notab); | ||
31 | - if (notab === 1) { | ||
32 | - $('.rank-main').append(data); | ||
33 | - } else { | ||
34 | - $('#hotRank').append(data); | 27 | + $('.rank-main').remove(); |
35 | } | 28 | } |
29 | + $('#hotRank').append(data); | ||
36 | lazyLoad($('img.lazy')); | 30 | lazyLoad($('img.lazy')); |
37 | $('#yoho-footer').css('position', 'static'); | 31 | $('#yoho-footer').css('position', 'static'); |
38 | $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); | 32 | $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); |
@@ -50,6 +44,7 @@ function hotrank(page, sort, tabId, notab) { | @@ -50,6 +44,7 @@ function hotrank(page, sort, tabId, notab) { | ||
50 | var navItme = $('.s-goods-nav .nav-item').eq(index); | 44 | var navItme = $('.s-goods-nav .nav-item').eq(index); |
51 | 45 | ||
52 | id = navItme.data('id') ? navItme.data('id') : ''; | 46 | id = navItme.data('id') ? navItme.data('id') : ''; |
47 | + sort = navItme.data('sort') ? navItme.data('sort') : ''; | ||
53 | page = 1; | 48 | page = 1; |
54 | notab = 1; | 49 | notab = 1; |
55 | hotrank(page, sort, id, notab); | 50 | hotrank(page, sort, id, notab); |
@@ -80,10 +80,15 @@ | @@ -80,10 +80,15 @@ | ||
80 | line-height: 1.5; | 80 | line-height: 1.5; |
81 | } | 81 | } |
82 | 82 | ||
83 | + .iconfont { | ||
84 | + font-size: rem(46); | ||
85 | + } | ||
86 | + | ||
83 | .icon-yoho-enter { | 87 | .icon-yoho-enter { |
84 | color: #ccc; | 88 | color: #ccc; |
85 | float: right; | 89 | float: right; |
86 | } | 90 | } |
91 | + | ||
87 | .connect-item { | 92 | .connect-item { |
88 | position: relative; | 93 | position: relative; |
89 | a { | 94 | a { |
@@ -2,11 +2,16 @@ | @@ -2,11 +2,16 @@ | ||
2 | background: #f0f0f0; | 2 | background: #f0f0f0; |
3 | 3 | ||
4 | .order { | 4 | .order { |
5 | + display: block; | ||
5 | background: #fff; | 6 | background: #fff; |
6 | margin: 30rem / $pxConvertRem 0; | 7 | margin: 30rem / $pxConvertRem 0; |
7 | border-top: 1px solid #e0e0e0; | 8 | border-top: 1px solid #e0e0e0; |
8 | border-bottom: 1px solid #e0e0e0; | 9 | border-bottom: 1px solid #e0e0e0; |
9 | 10 | ||
11 | + &:last-child { | ||
12 | + margin-bottom: 0; | ||
13 | + } | ||
14 | + | ||
10 | .header, .footer { | 15 | .header, .footer { |
11 | height: 90rem / $pxConvertRem; | 16 | height: 90rem / $pxConvertRem; |
12 | line-height: 90rem / $pxConvertRem; | 17 | line-height: 90rem / $pxConvertRem; |
@@ -37,7 +42,7 @@ | @@ -37,7 +42,7 @@ | ||
37 | border-top: 1px solid #e0e0e0; | 42 | border-top: 1px solid #e0e0e0; |
38 | text-align: right; | 43 | text-align: right; |
39 | 44 | ||
40 | - > .btn { | 45 | + .btn { |
41 | display: inline-block; | 46 | display: inline-block; |
42 | box-sizing: border-box; | 47 | box-sizing: border-box; |
43 | height: 60rem / $pxConvertRem; | 48 | height: 60rem / $pxConvertRem; |
@@ -46,6 +51,7 @@ | @@ -46,6 +51,7 @@ | ||
46 | font-size: 24rem / $pxConvertRem; | 51 | font-size: 24rem / $pxConvertRem; |
47 | text-align: center; | 52 | text-align: center; |
48 | border: 1px solid #000; | 53 | border: 1px solid #000; |
54 | + @include border-radius(5px); | ||
49 | } | 55 | } |
50 | 56 | ||
51 | .pay { | 57 | .pay { |
@@ -56,6 +62,22 @@ | @@ -56,6 +62,22 @@ | ||
56 | } | 62 | } |
57 | } | 63 | } |
58 | } | 64 | } |
65 | + | ||
66 | + .no-order { | ||
67 | + text-align: center; | ||
68 | + color: #f0f0f0; | ||
69 | + | ||
70 | + .iconfont { | ||
71 | + font-size: 50px; | ||
72 | + } | ||
73 | + | ||
74 | + .walk-way { | ||
75 | + display: block; | ||
76 | + color: #fff; | ||
77 | + background: #fff; | ||
78 | + @include border-radius(5px); | ||
79 | + } | ||
80 | + } | ||
59 | } | 81 | } |
60 | 82 | ||
61 | .order-nav { | 83 | .order-nav { |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | background: url("../img/me/employ/rank-t.png") no-repeat; | 46 | background: url("../img/me/employ/rank-t.png") no-repeat; |
47 | background-position: center top; | 47 | background-position: center top; |
48 | background-size: 100%; | 48 | background-size: 100%; |
49 | - line-height: 58rem / $pxConvertRem; | 49 | + line-height: 54rem / $pxConvertRem; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 |
@@ -33,55 +33,55 @@ | @@ -33,55 +33,55 @@ | ||
33 | </div> | 33 | </div> |
34 | <div class="order-type clearfix"> | 34 | <div class="order-type clearfix"> |
35 | <a class="type-item" href="/home/order"> | 35 | <a class="type-item" href="/home/order"> |
36 | - <span class="iconfont"></span> | ||
37 | - <br>代付款 | 36 | + <span class="iconfont"></span> |
37 | + <br>待付款 | ||
38 | </a> | 38 | </a> |
39 | <a class="type-item" href="/home/order"> | 39 | <a class="type-item" href="/home/order"> |
40 | - <span class="iconfont"></span> | ||
41 | - <br>代发货 | 40 | + <span class="iconfont"></span> |
41 | + <br>待发货 | ||
42 | </a> | 42 | </a> |
43 | <a class="type-item" href="/home/order"> | 43 | <a class="type-item" href="/home/order"> |
44 | - <span class="iconfont"></span> | ||
45 | - <br>代收货 | 44 | + <span class="iconfont"></span> |
45 | + <br>待收货 | ||
46 | </a> | 46 | </a> |
47 | </div> | 47 | </div> |
48 | </div> | 48 | </div> |
49 | <div class="group-list"> | 49 | <div class="group-list"> |
50 | <div class="list-item"> | 50 | <div class="list-item"> |
51 | - <span class="iconfont icon"></span> | 51 | + <span class="iconfont icon"></span> |
52 | 地址管理 | 52 | 地址管理 |
53 | <span class="iconfont num">3 </span> | 53 | <span class="iconfont num">3 </span> |
54 | </div> | 54 | </div> |
55 | </div> | 55 | </div> |
56 | <div class="group-list"> | 56 | <div class="group-list"> |
57 | <div class="list-item"> | 57 | <div class="list-item"> |
58 | - <span class="iconfont icon"></span> | 58 | + <span class="iconfont icon"></span> |
59 | 优惠券 | 59 | 优惠券 |
60 | <span class="iconfont num">{{coupon_num}} </span> | 60 | <span class="iconfont num">{{coupon_num}} </span> |
61 | </div> | 61 | </div> |
62 | <div class="list-item"> | 62 | <div class="list-item"> |
63 | - <span class="iconfont icon"></span> | 63 | + <span class="iconfont icon"></span> |
64 | YOHO 币 | 64 | YOHO 币 |
65 | <span class="iconfont num">{{yoho_coin_num}} </span> | 65 | <span class="iconfont num">{{yoho_coin_num}} </span> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> |
68 | <div class="group-list"> | 68 | <div class="group-list"> |
69 | <div class="list-item"> | 69 | <div class="list-item"> |
70 | - <span class="iconfont icon"></span> | 70 | + <span class="iconfont icon"></span> |
71 | 消息 | 71 | 消息 |
72 | <span class="iconfont num">{{inbox_total}} </span> | 72 | <span class="iconfont num">{{inbox_total}} </span> |
73 | </div> | 73 | </div> |
74 | </div> | 74 | </div> |
75 | <div class="group-list"> | 75 | <div class="group-list"> |
76 | <div class="list-item"> | 76 | <div class="list-item"> |
77 | - <span class="iconfont icon"></span> | 77 | + <span class="iconfont icon"></span> |
78 | 在线客服 | 78 | 在线客服 |
79 | <span class="iconfont num"></span> | 79 | <span class="iconfont num"></span> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | <div class="group-list"> | 82 | <div class="group-list"> |
83 | <div class="list-item"> | 83 | <div class="list-item"> |
84 | - <span class="iconfont icon"></span> | 84 | + <span class="iconfont icon"></span> |
85 | 帮助 | 85 | 帮助 |
86 | <span class="iconfont num"></span> | 86 | <span class="iconfont num"></span> |
87 | </div> | 87 | </div> |
@@ -26,14 +26,14 @@ | @@ -26,14 +26,14 @@ | ||
26 | <div class="connect-info"> | 26 | <div class="connect-info"> |
27 | <div class="connect-item connect-online"> | 27 | <div class="connect-item connect-online"> |
28 | <a href="http://chat80.live800.com/live800/chatClient/chatbox.jsp?companyID=493979&configID=123576&jid=9277320930" target="_blank" title="在线客服"> | 28 | <a href="http://chat80.live800.com/live800/chatClient/chatbox.jsp?companyID=493979&configID=123576&jid=9277320930" target="_blank" title="在线客服"> |
29 | - <span class="icon iconfont icon-chat"></span> | 29 | + <span class="icon iconfont icon-chat"></span> |
30 | 在线客服 | 30 | 在线客服 |
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"> | 34 | <div class="connect-item connect-tel"> |
35 | <a href="tel:400-889-9649" title="电话客服"> | 35 | <a href="tel:400-889-9649" title="电话客服"> |
36 | - <span class="icon iconfont icon-tel"></span> | 36 | + <span class="icon iconfont icon-tel"></span> |
37 | 电话客服 | 37 | 电话客服 |
38 | <p> | 38 | <p> |
39 | 400-889-9649 09:00 - 22:30 (周一至周日) | 39 | 400-889-9649 09:00 - 22:30 (周一至周日) |
@@ -18,9 +18,7 @@ | @@ -18,9 +18,7 @@ | ||
18 | 18 | ||
19 | <div id="order-container" class="order-container"> | 19 | <div id="order-container" class="order-container"> |
20 | <div class="all orders"> | 20 | <div class="all orders"> |
21 | - {{#each orders}} | ||
22 | - {{> me/order/order}} | ||
23 | - {{/each}} | 21 | + {{> me/order/orders}} |
24 | </div> | 22 | </div> |
25 | <div class="unpaid orders hide"></div> | 23 | <div class="unpaid orders hide"></div> |
26 | <div class="unshipped orders hide"></div> | 24 | <div class="unshipped orders hide"></div> |
1 | +{{#if tabs}} | ||
1 | <div class="s-goods-nav goods-nav"> | 2 | <div class="s-goods-nav goods-nav"> |
2 | <ul class="swiper-wrapper clearfix"> | 3 | <ul class="swiper-wrapper clearfix"> |
3 | - {{# tabs}} | 4 | + {{# tabs}} |
4 | {{# title}} | 5 | {{# title}} |
5 | <li class="swiper-slide nav-item" data-sort="{{ params}}" data-id="{{ id}}"> | 6 | <li class="swiper-slide nav-item" data-sort="{{ params}}" data-id="{{ id}}"> |
6 | <span>{{ name}}</span> | 7 | <span>{{ name}}</span> |
7 | </li> | 8 | </li> |
8 | {{/ title}} | 9 | {{/ title}} |
9 | - {{/ tabs}} | 10 | + {{/ tabs}} |
10 | </ul> | 11 | </ul> |
11 | </div> | 12 | </div> |
12 | - | 13 | +{{/if}} |
13 | <div class="rank-main"> | 14 | <div class="rank-main"> |
14 | <ul> | 15 | <ul> |
15 | {{# goods}} | 16 | {{# goods}} |
1 | -<div class="order" data-id="{{orderNum}}"> | 1 | +<div class="order" data-id="{{orderNum}}" data-href="{{detailUrl}}"> |
2 | <header class="header"> | 2 | <header class="header"> |
3 | 订单编号:{{orderNum}} | 3 | 订单编号:{{orderNum}} |
4 | <span class="order-status">{{orderStatus}}</span> | 4 | <span class="order-status">{{orderStatus}}</span> |
@@ -15,24 +15,24 @@ | @@ -15,24 +15,24 @@ | ||
15 | {{!-- 对应订单状态的操作逻辑 --}} | 15 | {{!-- 对应订单状态的操作逻辑 --}} |
16 | 16 | ||
17 | {{!-- 完成和取消订单显示删除按钮 --}} | 17 | {{!-- 完成和取消订单显示删除按钮 --}} |
18 | - {{#unless unpaid}} | ||
19 | - {{#unless unreceived}} | ||
20 | - <div class="order-opt"> | 18 | + <div class="order-opt"> |
19 | + {{#unless unpaid}} | ||
20 | + {{#unless unreceived}} | ||
21 | <span class="btn del">删除订单</span> | 21 | <span class="btn del">删除订单</span> |
22 | - </div> | 22 | + {{/unless}} |
23 | {{/unless}} | 23 | {{/unless}} |
24 | - {{/unless}} | ||
25 | 24 | ||
26 | - {{#if unpaid}} | ||
27 | - <div class="order-opt"> | 25 | + {{#if unpaid}} |
28 | <span class="btn cancel">取消订单</span> | 26 | <span class="btn cancel">取消订单</span> |
29 | - <span class="btn pay">立即付款</span> | ||
30 | - </div> | ||
31 | - {{/if}} | 27 | + <a class="locHref" href="{{payUrl}}"> |
28 | + <span class="btn pay">立即付款</span> | ||
29 | + </a> | ||
30 | + {{/if}} | ||
32 | 31 | ||
33 | - {{#if unreceived}} | ||
34 | - <div class="order-opt"> | ||
35 | - <a class="check-logistics" href="{{logisticsUrl}}">查看物流</a> | ||
36 | - </div> | ||
37 | - {{/if}} | 32 | + {{#if unreceived}} |
33 | + <a class="locHref" href="{{logisticsUrl}}"> | ||
34 | + <span class="btn check-logistics">查看物流</span> | ||
35 | + </a> | ||
36 | + {{/if}} | ||
37 | + </div> | ||
38 | </div> | 38 | </div> |
@@ -16,24 +16,24 @@ use Plugin\Helpers; | @@ -16,24 +16,24 @@ use Plugin\Helpers; | ||
16 | */ | 16 | */ |
17 | class HomeController extends AbstractAction | 17 | class HomeController extends AbstractAction |
18 | { | 18 | { |
19 | + | ||
19 | /** | 20 | /** |
20 | * 个人中心入口 | 21 | * 个人中心入口 |
21 | */ | 22 | */ |
22 | - public function indexAction() | ||
23 | - { | ||
24 | - // 设置网站标题 | 23 | + public function indexAction() { |
24 | + // 设置网站标题 | ||
25 | $this->setTitle('个人中心'); | 25 | $this->setTitle('个人中心'); |
26 | - $this->setNavHeader('个人中心', true, SITE_MAIN); | 26 | + $this->setNavHeader('个人中心', true, SITE_MAIN); |
27 | 27 | ||
28 | // $uid = $this->getUid(); | 28 | // $uid = $this->getUid(); |
29 | - $uid = 967016; | 29 | + $uid = 8826435; |
30 | $data = \Index\UserModel::getUserProfileData($uid); | 30 | $data = \Index\UserModel::getUserProfileData($uid); |
31 | $data += \Index\UserModel::getInfoNumData($uid); | 31 | $data += \Index\UserModel::getInfoNumData($uid); |
32 | 32 | ||
33 | - // 优选新品数据 | ||
34 | - $channel = Helpers::getChannelByCookie(); | ||
35 | - $data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel); | ||
36 | - // print_r($data); | 33 | + // 优选新品数据 |
34 | + $channel = Helpers::getChannelByCookie(); | ||
35 | + $data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel); | ||
36 | + // print_r($data); | ||
37 | 37 | ||
38 | $data['myIndexPage'] = true; | 38 | $data['myIndexPage'] = true; |
39 | $data['pageFooter'] = true; | 39 | $data['pageFooter'] = true; |
@@ -46,10 +46,15 @@ class HomeController extends AbstractAction | @@ -46,10 +46,15 @@ class HomeController extends AbstractAction | ||
46 | */ | 46 | */ |
47 | public function ordersAction() | 47 | public function ordersAction() |
48 | { | 48 | { |
49 | - // $uid = $this->getUid(); | ||
50 | - // $type = $this->get('type', 1); | 49 | + // 设置网站标题 |
50 | + $this->setTitle('我的订单'); | ||
51 | + $this->setNavHeader('我的订单', true, SITE_MAIN); | ||
52 | + | ||
53 | + $uid = $this->getUid(); | ||
54 | + $uid = 8826435; | ||
55 | + $type = $this->get('type', 1); | ||
51 | 56 | ||
52 | - // $orders = \Index\UserModel::getUserOrderData(967016, $type); | 57 | + $order = \Index\UserModel::getUserOrderData($uid, $type); |
53 | 58 | ||
54 | $order = array( | 59 | $order = array( |
55 | 'orders' => array( | 60 | 'orders' => array( |
@@ -85,19 +90,17 @@ class HomeController extends AbstractAction | @@ -85,19 +90,17 @@ class HomeController extends AbstractAction | ||
85 | ); | 90 | ); |
86 | 91 | ||
87 | $this->_view->display('order', array('order' => $order, 'orderPage' => true)); | 92 | $this->_view->display('order', array('order' => $order, 'orderPage' => true)); |
88 | - // print_r($orders); | ||
89 | } | 93 | } |
90 | 94 | ||
91 | - /** | ||
92 | - * 用户收藏的商品 | ||
93 | - */ | ||
94 | - public function favoriteAction() | ||
95 | - { | ||
96 | - $uid = $this->getUid(); | 95 | + /** |
96 | + * 用户收藏的商品 | ||
97 | + */ | ||
98 | + public function favoriteAction() { | ||
99 | + $uid = $this->getUid(); | ||
97 | 100 | ||
98 | - $favProducts = \Index\UserModel::getFavProductData($uid); | 101 | + $favProducts = \Index\UserModel::getFavProductData($uid); |
99 | 102 | ||
100 | - //print_r($favProducts); | 103 | + //print_r($favProducts); |
101 | 104 | ||
102 | $this->_view->display('favorite', array( | 105 | $this->_view->display('favorite', array( |
103 | 'favPage' => true, //加载js | 106 | 'favPage' => true, //加载js |
@@ -202,57 +205,43 @@ class HomeController extends AbstractAction | @@ -202,57 +205,43 @@ class HomeController extends AbstractAction | ||
202 | ) | 205 | ) |
203 | ) | 206 | ) |
204 | )); | 207 | )); |
205 | - } | 208 | + } |
206 | 209 | ||
207 | - /** | ||
208 | - * 用户收藏的品牌 | ||
209 | - */ | ||
210 | - public function favoritebrandAction() | ||
211 | - { | ||
212 | - $uid = $this->getUid(); | ||
213 | - $gender = Helpers::getGenderByCookie(); | 210 | + /** |
211 | + * 用户收藏的品牌 | ||
212 | + */ | ||
213 | + public function favoritebrandAction() { | ||
214 | + $uid = $this->getUid(); | ||
215 | + $gender = Helpers::getGenderByCookie(); | ||
214 | 216 | ||
215 | - $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); | 217 | + $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); |
216 | 218 | ||
217 | - print_r($favBrands); | ||
218 | - } | 219 | + print_r($favBrands); |
220 | + } | ||
219 | 221 | ||
220 | - /** | ||
221 | - * 个人信息 | ||
222 | - */ | ||
223 | - public function personalDetailsAction() | ||
224 | - { | 222 | + /** |
223 | + * 个人信息 | ||
224 | + */ | ||
225 | + public function personalDetailsAction() { | ||
225 | $this->setTitle('个人信息'); | 226 | $this->setTitle('个人信息'); |
226 | - $this->setNavHeader('个人信息', true, SITE_MAIN); | 227 | + $this->setNavHeader('个人信息', true, SITE_MAIN); |
227 | 228 | ||
228 | - // $uid = $this->getUid(); | ||
229 | - $uid = 967016; | ||
230 | - $data = \Index\UserModel::getUserProfileData($uid); | ||
231 | - $data['pageFooter'] = true; | 229 | + // $uid = $this->getUid(); |
230 | + $uid = 967016; | ||
231 | + $data = \Index\UserModel::getUserProfileData($uid); | ||
232 | + $data['pageFooter'] = true; | ||
232 | $this->_view->display('personal-details', $data); | 233 | $this->_view->display('personal-details', $data); |
234 | + } | ||
233 | 235 | ||
236 | + /** | ||
237 | + * YOHO币 | ||
238 | + */ | ||
239 | + public function currencyAction() { | ||
240 | + // $uid = $this->getUid(); | ||
241 | + $this->setNavHeader('YOHO币', true, false); | ||
234 | 242 | ||
235 | - } | ||
236 | - | ||
237 | - /** | ||
238 | - * YOHO币 | ||
239 | - */ | ||
240 | - public function currencyAction() | ||
241 | - { | ||
242 | - // $uid = $this->getUid(); | ||
243 | - $this->setNavHeader('YOHO币', true, false); | ||
244 | - | ||
245 | - $uid = 967016; | ||
246 | - $currency = \Index\UserModel::getYohoCoinData($uid); | ||
247 | - | ||
248 | - $this->_view->display('currency', $currency); | ||
249 | - } | ||
250 | - | ||
251 | - /** | ||
252 | - * 优惠券 | ||
253 | - */ | ||
254 | - public function couponsAction() | ||
255 | - { | 243 | + $uid = 967016; |
244 | + $currency = \Index\UserModel::getYohoCoinData($uid); | ||
256 | 245 | ||
257 | $this->setTitle('优惠券'); | 246 | $this->setTitle('优惠券'); |
258 | $this->setNavHeader('优惠券', true, SITE_MAIN); | 247 | $this->setNavHeader('优惠券', true, SITE_MAIN); |
@@ -266,106 +255,117 @@ class HomeController extends AbstractAction | @@ -266,106 +255,117 @@ class HomeController extends AbstractAction | ||
266 | 'couponsPage' => true | 255 | 'couponsPage' => true |
267 | ); | 256 | ); |
268 | 257 | ||
258 | + print_r($coupons); | ||
269 | $this->_view->display('coupons', $coupons); | 259 | $this->_view->display('coupons', $coupons); |
260 | + } | ||
270 | 261 | ||
271 | - } | 262 | + /** |
263 | + * 优惠券 | ||
264 | + */ | ||
265 | + public function couponsAction() { | ||
272 | 266 | ||
273 | - /** | ||
274 | - * 我的消息 | ||
275 | - */ | ||
276 | - public function messageAction() | ||
277 | - { | ||
278 | - // $uid = $this->getUid(); | ||
279 | - $page = $this->get('page', 0); | ||
280 | - $size = $this->get('size', 10); | 267 | + $this->setTitle('优惠券'); |
268 | + $this->setNavHeader('优惠券', true, SITE_MAIN); | ||
269 | + // $uid = $this->getUid(); | ||
270 | + $uid = 8826435; | ||
271 | + $status = $this->get('status', 0); | ||
272 | + $coupons = array( | ||
273 | + 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status), | ||
274 | + 'couponsPage' => true | ||
275 | + ); | ||
281 | 276 | ||
282 | - $uid = 967016; | ||
283 | - $messages = \Index\UserModel::getMessageData($uid, $page, $size); | 277 | + print_r($coupons); |
278 | + $this->_view->display('coupons', $coupons); | ||
279 | + } | ||
284 | 280 | ||
285 | - print_r($messages); | 281 | + /** |
282 | + * 我的消息 | ||
283 | + */ | ||
284 | + public function messageAction() { | ||
285 | + // $uid = $this->getUid(); | ||
286 | + $page = $this->get('page', 0); | ||
287 | + $size = $this->get('size', 10); | ||
286 | 288 | ||
287 | - } | 289 | + $uid = 967016; |
290 | + $messages = \Index\UserModel::getMessageData($uid, $page, $size); | ||
288 | 291 | ||
289 | - /** | ||
290 | - * 地址管理 | ||
291 | - */ | ||
292 | - public function addressAction() | ||
293 | - { | ||
294 | - // 设置网站标题 | 292 | + print_r($messages); |
293 | + } | ||
294 | + | ||
295 | + /** | ||
296 | + * 地址管理 | ||
297 | + */ | ||
298 | + public function addressAction() { | ||
299 | + // 设置网站标题 | ||
295 | $this->setTitle('地址管理'); | 300 | $this->setTitle('地址管理'); |
296 | $this->setNavHeader('地址管理', true, SITE_MAIN); | 301 | $this->setNavHeader('地址管理', true, SITE_MAIN); |
297 | 302 | ||
298 | // $uid = $this->getUid(); | 303 | // $uid = $this->getUid(); |
299 | $uid = 967016; | 304 | $uid = 967016; |
300 | 305 | ||
301 | - $address = \Index\UserModel::getAddressData($uid); | ||
302 | - $addressList = \Index\UserModel::getAddressListData($uid); | 306 | + $address = \Index\UserModel::getAddressData($uid); |
307 | + $addressList = \Index\UserModel::getAddressListData($uid); | ||
303 | 308 | ||
304 | - // print_r($address); | 309 | + // print_r($address); |
305 | 310 | ||
306 | $this->_view->display('address', array( | 311 | $this->_view->display('address', array( |
307 | 'addressPage' => true, | 312 | 'addressPage' => true, |
308 | 'pageFooter' => true, | 313 | 'pageFooter' => true, |
309 | 'address' => $address, | 314 | 'address' => $address, |
310 | - 'addressList' => $addressList | 315 | + 'addressList' => $addressList |
311 | )); | 316 | )); |
312 | - } | ||
313 | - | ||
314 | - /** | ||
315 | - * 修改地址或者添加新地址 | ||
316 | - */ | ||
317 | - public function saveAddressAction() | ||
318 | - { | ||
319 | - $result = array(); | ||
320 | - | ||
321 | - if ($this->isAjax()) { | ||
322 | - // $uid = $this->getUid(); | ||
323 | - $uid = 967016; | ||
324 | - $address = $this->post('address', ''); | ||
325 | - $area_code = $this->post('area_code', ''); | ||
326 | - $consignee = $this->post('consignee', ''); | ||
327 | - $email = $this->post('email', ''); | ||
328 | - $id = $this->post('id', null); | ||
329 | - $mobile = $this->post('mobile', ''); | ||
330 | - $zip_code = $this->post('zip_code', ''); | ||
331 | - | ||
332 | - $result = \Index\UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code); | ||
333 | - } | ||
334 | - | ||
335 | - if (empty($result)) { | ||
336 | - echo ' '; | ||
337 | - } else { | ||
338 | - $this->echoJson($result); | ||
339 | - } | 317 | + } |
340 | 318 | ||
341 | - } | 319 | + /** |
320 | + * 修改地址或者添加新地址 | ||
321 | + */ | ||
322 | + public function saveAddressAction() { | ||
323 | + $result = array(); | ||
324 | + | ||
325 | + if ($this->isAjax()) { | ||
326 | + // $uid = $this->getUid(); | ||
327 | + $uid = 967016; | ||
328 | + $address = $this->post('address', ''); | ||
329 | + $area_code = $this->post('area_code', ''); | ||
330 | + $consignee = $this->post('consignee', ''); | ||
331 | + $email = $this->post('email', ''); | ||
332 | + $id = $this->post('id', null); | ||
333 | + $mobile = $this->post('mobile', ''); | ||
334 | + $zip_code = $this->post('zip_code', ''); | ||
335 | + | ||
336 | + $result = \Index\UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code); | ||
337 | + } | ||
342 | 338 | ||
343 | - /** | ||
344 | - * 设置默认地址 | ||
345 | - */ | ||
346 | - public function defaultAddressAction() | ||
347 | - { | ||
348 | - $result = array(); | 339 | + if (empty($result)) { |
340 | + echo ' '; | ||
341 | + } else { | ||
342 | + $this->echoJson($result); | ||
343 | + } | ||
344 | + } | ||
349 | 345 | ||
350 | - if ($this->isAjax()) { | ||
351 | - // $uid = $this->getUid(); | ||
352 | - $uid = 967016; | ||
353 | - $id = $this->post('id', ''); | 346 | + /** |
347 | + * 设置默认地址 | ||
348 | + */ | ||
349 | + public function defaultAddressAction() { | ||
350 | + $result = array(); | ||
354 | 351 | ||
355 | - $result = \Index\UserModel::setDefaultAddress($uid, $id); | ||
356 | - } | 352 | + if ($this->isAjax()) { |
353 | + // $uid = $this->getUid(); | ||
354 | + $uid = 967016; | ||
355 | + $id = $this->post('id', ''); | ||
357 | 356 | ||
358 | - if (empty($result)) { | ||
359 | - echo ' '; | ||
360 | - } else { | ||
361 | - $this->echoJson($result); | ||
362 | - } | 357 | + $result = \Index\UserModel::setDefaultAddress($uid, $id); |
358 | + } | ||
363 | 359 | ||
364 | - } | 360 | + if (empty($result)) { |
361 | + echo ' '; | ||
362 | + } else { | ||
363 | + $this->echoJson($result); | ||
364 | + } | ||
365 | + } | ||
365 | 366 | ||
366 | //在线客服 | 367 | //在线客服 |
367 | - public function onlineServiceAction() | ||
368 | - { | 368 | + public function onlineServiceAction() { |
369 | // 设置网站标题 | 369 | // 设置网站标题 |
370 | $this->setTitle('在线客服'); | 370 | $this->setTitle('在线客服'); |
371 | $this->setNavHeader('在线客服', true, SITE_MAIN); | 371 | $this->setNavHeader('在线客服', true, SITE_MAIN); |
@@ -380,13 +380,11 @@ class HomeController extends AbstractAction | @@ -380,13 +380,11 @@ class HomeController extends AbstractAction | ||
380 | } | 380 | } |
381 | 381 | ||
382 | //在线客服-具体详情 | 382 | //在线客服-具体详情 |
383 | - public function onlineServiceDetailAction() | ||
384 | - { | 383 | + public function onlineServiceDetailAction() { |
385 | $service = array(); | 384 | $service = array(); |
386 | $cateId = $this->get('cateId', 0); | 385 | $cateId = $this->get('cateId', 0); |
387 | $cateName = $this->get('cateName', ''); | 386 | $cateName = $this->get('cateName', ''); |
388 | - if ($cateId > 0) | ||
389 | - { | 387 | + if ($cateId > 0) { |
390 | $service = home\OnlineModel::getOnlineServiceDetail($cateId); | 388 | $service = home\OnlineModel::getOnlineServiceDetail($cateId); |
391 | } | 389 | } |
392 | $this->setTitle('在线客服'); | 390 | $this->setTitle('在线客服'); |
@@ -395,25 +393,23 @@ class HomeController extends AbstractAction | @@ -395,25 +393,23 @@ class HomeController extends AbstractAction | ||
395 | } | 393 | } |
396 | 394 | ||
397 | /** | 395 | /** |
398 | - * 我的逛 | ||
399 | - */ | ||
400 | - public function myGuangAction() | ||
401 | - { | ||
402 | - echo 'My Guang'; | ||
403 | - } | 396 | + * 我的逛 |
397 | + */ | ||
398 | + public function myGuangAction() { | ||
399 | + echo 'My Guang'; | ||
400 | + } | ||
404 | 401 | ||
405 | - /** | ||
406 | - * 意见反馈 | ||
407 | - */ | ||
408 | - public function suggestAction() | ||
409 | - { | ||
410 | - $udid = $this->getUdid(); | ||
411 | - $page = $this->get('page', 1); | ||
412 | - $limit = $this->get('limit', 30); | 402 | + /** |
403 | + * 意见反馈 | ||
404 | + */ | ||
405 | + public function suggestAction() { | ||
406 | + $udid = $this->getUdid(); | ||
407 | + $page = $this->get('page', 1); | ||
408 | + $limit = $this->get('limit', 30); | ||
413 | 409 | ||
414 | - $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit); | 410 | + $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit); |
415 | 411 | ||
416 | - //print_r($suggest); | 412 | + //print_r($suggest); |
417 | $this->_view->display('suggest', array( | 413 | $this->_view->display('suggest', array( |
418 | 'suggestPage' => true, //加载js | 414 | 'suggestPage' => true, //加载js |
419 | 'pageHeader' => array( | 415 | 'pageHeader' => array( |
@@ -443,8 +439,8 @@ class HomeController extends AbstractAction | @@ -443,8 +439,8 @@ class HomeController extends AbstractAction | ||
443 | 'bad' => false) | 439 | 'bad' => false) |
444 | ) | 440 | ) |
445 | )); | 441 | )); |
442 | + } | ||
446 | 443 | ||
447 | - } | ||
448 | 444 | ||
449 | /** | 445 | /** |
450 | * 意见反馈-提交表单 | 446 | * 意见反馈-提交表单 |
@@ -480,121 +476,84 @@ class HomeController extends AbstractAction | @@ -480,121 +476,84 @@ class HomeController extends AbstractAction | ||
480 | $uid = $this->getUid(); | 476 | $uid = $this->getUid(); |
481 | $content = $this->post('content', ''); | 477 | $content = $this->post('content', ''); |
482 | $suggest_type = $this->get('suggest_type', 2); | 478 | $suggest_type = $this->get('suggest_type', 2); |
479 | + $result = \Index\UserModel::saveSuggestData($uid, $content, $suggest_type); | ||
483 | 480 | ||
484 | - $result = \Index\UserModel::saveSuggestData($uid, $content, $suggest_type); | 481 | + $this->echoJson($result); |
482 | + } | ||
483 | + } | ||
485 | 484 | ||
486 | - $this->echoJson($result); | ||
487 | - } | 485 | + /** |
486 | + * 会员等级展示页 | ||
487 | + */ | ||
488 | + public function gradeAction() { | ||
489 | + //设置网站seo信息 | ||
490 | + $this->setTitle('会员等级'); | ||
491 | + //显示网站导航头部信息 | ||
492 | + $this->setNavHeader('会员等级'); | ||
493 | + | ||
494 | + $gender = Helpers::getGenderByCookie(); | ||
495 | + $channel = Helpers::getChannelByCookie(); | ||
496 | + $uid = $this->getUid(); | ||
497 | + $uid = '7566245'; //临时测试用 | ||
498 | + $data = GradeModel::getGrade($gender, $channel, $uid); | ||
499 | + $data['pageFooter'] = true; | ||
500 | + $this->_view->display('vip-grade', $data); | ||
501 | + } | ||
488 | 502 | ||
489 | - } | ||
490 | - | ||
491 | - /** | ||
492 | - * 会员等级展示页 | ||
493 | - */ | ||
494 | - public function gradeAction(){ | ||
495 | - //设置网站seo信息 | ||
496 | - $this->setTitle('会员等级'); | ||
497 | - //显示网站导航头部信息 | ||
498 | - $this->setNavHeader('会员等级'); | ||
499 | - | ||
500 | - $gender = Helpers::getGenderByCookie(); | ||
501 | - $channel = Helpers::getChannelByCookie(); | ||
502 | - $uid = $this -> getUid(); | ||
503 | - $uid = '7566245';//临时测试用 | ||
504 | - $data = GradeModel::getGrade($gender,$channel,$uid); | ||
505 | - $data['pageFooter'] = true; | ||
506 | - $this -> _view -> display('vip-grade',$data); | ||
507 | - } | ||
508 | - /* | ||
509 | - *会员特权查看页 | ||
510 | - */ | ||
511 | - public function preferentialAction(){ | ||
512 | - //设置网站seo信息 | ||
513 | - $this->setTitle('会员等级'); | ||
514 | - //显示网站导航头部信息 | ||
515 | - $this->setNavHeader('会员特权详情'); | ||
516 | - | ||
517 | - $channel = Helpers::getChannelByCookie(); | ||
518 | - $uid = $this -> getUid(); | ||
519 | - $data = GradeModel::getPreferential($channel,$uid); | ||
520 | - $data['pageFooter'] = true; | ||
521 | - $this -> _view -> display('privilege',$data); | ||
522 | - } | ||
523 | - | ||
524 | - /* | ||
525 | - *我的订单页面 | ||
526 | - */ | ||
527 | - public function orderAction(){ | ||
528 | - | ||
529 | - do{ | ||
530 | - //判断是不是ajax请求 | ||
531 | -// if(!$this -> isAjax()){ | ||
532 | -// break; | ||
533 | -// } | ||
534 | - //判断参数是否有效 | ||
535 | - $type = $this -> get('type',1); | ||
536 | - $page = $this -> get('page',1); | ||
537 | - $limit = $this -> get('limit',10); | ||
538 | - $gender = Helpers::getGenderByCookie(); | ||
539 | - $yh_channel = $this -> get('yh_channel',1); | ||
540 | - $uid = $this -> getUid(); | ||
541 | - if(!empty($type) && !is_numeric($type)){ | ||
542 | - break; | ||
543 | - } | ||
544 | - //$data = OrderModel::getOrder(); | ||
545 | - $data = OrderModel::getOrder($type,$page,$limit,$gender,$yh_channel,$uid); | ||
546 | - //print_r($data); | ||
547 | - } | ||
548 | - while(false); | ||
549 | - //$this -> _view -> display('order',$data); | ||
550 | - } | 503 | + /* |
504 | + * 会员特权查看页 | ||
505 | + */ | ||
506 | + public function preferentialAction() { | ||
507 | + //设置网站seo信息 | ||
508 | + $this->setTitle('会员等级'); | ||
509 | + //显示网站导航头部信息 | ||
510 | + $this->setNavHeader('会员特权详情'); | ||
511 | + | ||
512 | + $channel = Helpers::getChannelByCookie(); | ||
513 | + $uid = $this->getUid(); | ||
514 | + $data = GradeModel::getPreferential($channel, $uid); | ||
515 | + $data['pageFooter'] = true; | ||
516 | + $this->_view->display('privilege', $data); | ||
517 | + } | ||
551 | 518 | ||
552 | - /** | ||
553 | - * 订单详情页 | 519 | + /* |
520 | + * 我的订单页面 | ||
554 | */ | 521 | */ |
555 | - public function orderDetailAction() | ||
556 | - { | ||
557 | - $data = array( | ||
558 | - 'name' => '毛毛莉Lydia', | ||
559 | - 'phoneNum' => '18600001133', | ||
560 | - 'address' => '南京市建邺区嘉陵江东街18号国家广告产业园5栋17楼', | ||
561 | - 'orderStatus' => '待收货', | ||
562 | - 'orderNum' => '418358063', | ||
563 | - 'orderTime' => '2014-03-10 17:25:10', | ||
564 | - | ||
565 | - 'unreceived' => true, | ||
566 | - 'logisticsUrl' => '', | ||
567 | - 'logisticsCompany' => '顺丰', | ||
568 | - 'logisticsNum' => '51537443456', | ||
569 | - | ||
570 | - 'goods' => array( | ||
571 | - array( | ||
572 | - 'id' => 1, | ||
573 | - 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
574 | - 'name' => 'Adidas Originals ZX FLUXM22508', | ||
575 | - 'color' => '黄', | ||
576 | - 'size' => '43', | ||
577 | - 'price' => '699.00', | ||
578 | - 'count' => '2' | ||
579 | - ), | ||
580 | - array( | ||
581 | - 'id' => 1, | ||
582 | - 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
583 | - 'name' => 'B.Duck浴室玩伴mini浮水鸭', | ||
584 | - 'gift' => true, | ||
585 | - 'color' => '黄', | ||
586 | - 'size' => '43', | ||
587 | - 'price' => '0.00', | ||
588 | - 'count' => '1' | ||
589 | - ) | ||
590 | - ), | 522 | + public function orderAction() { |
523 | + //获取基本参数:type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论 | ||
524 | + $type = $this->get('type', 1); | ||
525 | + $page = $this->get('page', 1); | ||
526 | + $limit = $this->get('limit', 10); | ||
527 | + $gender = Helpers::getGenderByCookie(); | ||
528 | + $yh_channel = $this->get('yh_channel', 1); | ||
529 | + $uid = $this->getUid(); | ||
530 | + $uid = '7566245'; //测试用 | ||
531 | + //调用模型层getOrder方法获得并处理数据 | ||
532 | + $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid); | ||
533 | + //如果没有订单数据,就给一个随便逛逛链接 | ||
534 | + $order = array(); | ||
535 | + if (!empty($data)) { | ||
536 | + $order['orders'] = $data; | ||
537 | + } else { | ||
538 | + $order['walkwayUrl'] = 'http://www.baidu.com'; | ||
539 | + } | ||
540 | + //渲染模板 | ||
541 | + $this->_view->display('order', array( | ||
542 | + 'order' => $order, | ||
543 | + 'orderPage' => true | ||
544 | + )); | ||
545 | + } | ||
591 | 546 | ||
592 | - 'sumPrice' => 799, | ||
593 | - 'salePrice' => 80, | ||
594 | - 'freight' => 5, | ||
595 | - 'yohoCoin' => 5, | ||
596 | - 'price' => 719 | ||
597 | - ); | ||
598 | - $this->_view->display('order-detail', array('orderDetail' => $data, 'orderDetailPage' => true)); | 547 | + /* |
548 | + * 我的订单-处理ajax请求页面(切换订单状态) | ||
549 | + */ | ||
550 | + public function orderAjaxAction() { | ||
551 | + | ||
552 | + //判断是不是ajax请求 | ||
553 | + if (!$this->isAjax()) { | ||
554 | + $this->error(); | ||
555 | + } | ||
556 | + self::orderAction(); | ||
599 | } | 557 | } |
558 | + | ||
600 | } | 559 | } |
@@ -26,41 +26,41 @@ class GradeModel | @@ -26,41 +26,41 @@ class GradeModel | ||
26 | } | 26 | } |
27 | } | 27 | } |
28 | //调用接口获取数据 | 28 | //调用接口获取数据 |
29 | - $data = GradeData::getGradeData($gender,$channel, $uid); | ||
30 | - switch (intval($data['grade']['current_vip_level'])) { | ||
31 | - case 0://普通会员 | ||
32 | - $result['vipGrade']['vip0'] = true; | ||
33 | - break; | ||
34 | - case 1://银卡会员 | ||
35 | - $result['vipGrade']['vip1'] = true; | ||
36 | - break; | ||
37 | - case 2://金卡会员 | ||
38 | - $result['vipGrade']['vip2'] = true; | ||
39 | - break; | ||
40 | - case 3://白金会员 | ||
41 | - $result['vipGrade']['vip3'] = true; | ||
42 | - break; | ||
43 | - } | ||
44 | - | ||
45 | - //今年总消费 | ||
46 | - $result['vipGrade']['costOfThisYear'] = $data['grade']['current_year_cost']; | ||
47 | - //升级下一等级会员的进度; | ||
48 | - $result['vipGrade']['percent'] = 100*(round($data['grade']['current_total_cost'] / $data['grade']['next_need_cost'], 2)); | ||
49 | - //距离升级所需消费金额 | ||
50 | - | ||
51 | - if ($data['grade']['current_vip_level'] != 3) { | ||
52 | - $result['vipGrade']['costGap'] = $data['grade']['upgrade_need_cost']; | ||
53 | - } | ||
54 | - //消费总计 | ||
55 | - $result['vipGrade']['sumCost'] = $data['grade']['current_total_cost']; | ||
56 | - //username 调用获取用户基本信息数据,获得username; | ||
57 | - //$userProfile = GradeData::getUserProfileData($gender,$uid,$channel); | ||
58 | - $result['vipGrade']['name'] = $data['userProfile']['username']; | ||
59 | - //跳转url(会员特权详情) | ||
60 | - $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential',null); | ||
61 | - //当前vip等级享受的特权 | ||
62 | - $result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential']; | ||
63 | - | 29 | + $data = GradeData::getGradeData($gender, $channel, $uid); |
30 | + switch (intval($data['grade']['current_vip_level'])) { | ||
31 | + case 0://普通会员 | ||
32 | + $result['vipGrade']['vip0'] = true; | ||
33 | + break; | ||
34 | + case 1://银卡会员 | ||
35 | + $result['vipGrade']['vip1'] = true; | ||
36 | + break; | ||
37 | + case 2://金卡会员 | ||
38 | + $result['vipGrade']['vip2'] = true; | ||
39 | + break; | ||
40 | + case 3://白金会员 | ||
41 | + $result['vipGrade']['vip3'] = true; | ||
42 | + break; | ||
43 | + } | ||
44 | + | ||
45 | + //今年总消费 | ||
46 | + $result['vipGrade']['costOfThisYear'] = $data['grade']['current_year_cost']; | ||
47 | + //升级下一等级会员的进度; | ||
48 | + $result['vipGrade']['percent'] = 100 * (round($data['grade']['current_total_cost'] / $data['grade']['next_need_cost'], 2)); | ||
49 | + //距离升级所需消费金额 | ||
50 | + | ||
51 | + if ($data['grade']['current_vip_level'] != 3) { | ||
52 | + $result['vipGrade']['costGap'] = $data['grade']['upgrade_need_cost']; | ||
53 | + } | ||
54 | + //消费总计 | ||
55 | + $result['vipGrade']['sumCost'] = $data['grade']['current_total_cost']; | ||
56 | + //username 调用获取用户基本信息数据,获得username; | ||
57 | + //$userProfile = GradeData::getUserProfileData($gender,$uid,$channel); | ||
58 | + $result['vipGrade']['name'] = $data['userProfile']['username']; | ||
59 | + //跳转url(会员特权详情) | ||
60 | + $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null); | ||
61 | + //当前vip等级享受的特权 | ||
62 | + $result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential']; | ||
63 | + | ||
64 | 64 | ||
65 | if (USE_CACHE) { | 65 | if (USE_CACHE) { |
66 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 66 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
@@ -72,7 +72,7 @@ class GradeModel | @@ -72,7 +72,7 @@ class GradeModel | ||
72 | Cache::set(CacheConfig::KEY_ACTION_HOME_GRADE, $result); | 72 | Cache::set(CacheConfig::KEY_ACTION_HOME_GRADE, $result); |
73 | } | 73 | } |
74 | } | 74 | } |
75 | - | 75 | + |
76 | return $result; | 76 | return $result; |
77 | } | 77 | } |
78 | 78 | ||
@@ -95,7 +95,7 @@ class GradeModel | @@ -95,7 +95,7 @@ class GradeModel | ||
95 | if (isset($data['code']) && $data['code'] == 200) { | 95 | if (isset($data['code']) && $data['code'] == 200) { |
96 | $result['vipGrade']['privilege'] = $data['data']; | 96 | $result['vipGrade']['privilege'] = $data['data']; |
97 | } | 97 | } |
98 | - | 98 | + |
99 | 99 | ||
100 | if (USE_CACHE) { | 100 | if (USE_CACHE) { |
101 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 101 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
@@ -107,7 +107,7 @@ class GradeModel | @@ -107,7 +107,7 @@ class GradeModel | ||
107 | Cache::set(CacheConfig::KEY_ACTION_HOME_PREFERENTIAL, $result); | 107 | Cache::set(CacheConfig::KEY_ACTION_HOME_PREFERENTIAL, $result); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | - | 110 | + |
111 | return $result; | 111 | return $result; |
112 | } | 112 | } |
113 | 113 |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - namespace home; | ||
4 | - | ||
5 | - use LibModels\Wap\Home\OrderData; | 3 | +namespace home; |
4 | + | ||
5 | +use LibModels\Wap\Home\OrderData; | ||
6 | +use Plugin\Helpers; | ||
7 | +use Configs\CacheConfig; | ||
8 | + | ||
6 | /* | 9 | /* |
7 | * To change this license header, choose License Headers in Project Properties. | 10 | * To change this license header, choose License Headers in Project Properties. |
8 | * To change this template file, choose Tools | Templates | 11 | * To change this template file, choose Tools | Templates |
@@ -15,15 +18,104 @@ | @@ -15,15 +18,104 @@ | ||
15 | */ | 18 | */ |
16 | class OrderModel | 19 | class OrderModel |
17 | { | 20 | { |
18 | - | 21 | + |
19 | /** | 22 | /** |
20 | * 订单相关数据处理 | 23 | * 订单相关数据处理 |
21 | */ | 24 | */ |
22 | - public function getOrder($type = 1,$page = 1,$limit,$gender,$yh_channel,$uid){ | ||
23 | - | ||
24 | - $data = OrderData::getOrderData($type,$page,$limit,$gender,$yh_channel,$uid); | ||
25 | - | ||
26 | - return $data; | 25 | + public function getOrder($type = 1, $page = 1, $limit, $gender, $yh_channel, $uid) { |
26 | + $result = array(); | ||
27 | + if (USE_CACHE) { | ||
28 | + $key = CacheConfig::KEY_ACTION_HOME_ORDER_ORDER; | ||
29 | + // 先尝试获取一级缓存(master), 有数据则直接返回. | ||
30 | + $result = Cache::get($key, 'master'); | ||
31 | + if (!empty($result)) { | ||
32 | + return $result; | ||
33 | + } | ||
34 | + } | ||
35 | + //调用接口获得数据 | ||
36 | + $data = OrderData::getOrderData($type, $page, $limit, $gender, $yh_channel, $uid); | ||
37 | + //检查数据返回是否正常,正常则处理数据 | ||
38 | + if ($data['code'] == 200 && isset($data['data'])) { | ||
39 | + foreach ($data['data']['order_list'] as $key => $vo) { | ||
40 | + //订单号,支付状态,订单商品数量,订单总价格 | ||
41 | + $result[$key]['orderNum'] = $vo['order_code']; | ||
42 | + $result[$key]['orderStatus'] = $vo['status_str']; | ||
43 | + $result[$key]['count'] = count($vo['order_goods']); | ||
44 | + $result[$key]['sumCost'] = $vo['amount'] + $vo['shipping_cost']; | ||
45 | + //订单商品列表数据 | ||
46 | + $result[$key]['goods'] = self::formatOrderGoods($vo['order_goods']); | ||
47 | + //订单status判断订单处于什么状态。 | ||
48 | + do { | ||
49 | + //订单取消状态 | ||
50 | + if ($vo['is_cancel'] === 'Y') { | ||
51 | + $result[$key]['canceled'] = true; | ||
52 | + break; | ||
53 | + } | ||
54 | + //支付方式不是货到付款时,计算订单状态 | ||
55 | + if ($vo['payment_type'] != 2) { | ||
56 | + switch ($vo['status']) { | ||
57 | + case 0: | ||
58 | + $result[$key]['unpaid'] = true; | ||
59 | + break; | ||
60 | + case 1 || 2 || 3 || 4 || 5: | ||
61 | + $result[$key]['unreceived'] = true; | ||
62 | + $resault[$key]['logisticsUrl'] = "暂无logisticsUrl数据"; | ||
63 | + break; | ||
64 | + case 6: | ||
65 | + $result[$key]['completed'] = true; | ||
66 | + break; | ||
67 | + default: | ||
68 | + break; | ||
69 | + } | ||
70 | + } elseif ($vo['payment_type'] == 2) { | ||
71 | + //订单为货到付款订单时,订单没有未支付状态 | ||
72 | + switch ($vo['status']) { | ||
73 | + case 0 || 1 || 2 || 3 || 4 || 5: | ||
74 | + $result[$key]['unreceived'] = true; | ||
75 | + //此处备注,接口没有返回logisticsUrl数据 | ||
76 | + $resault[$key]['logisticsUrl'] = "备注:暂无logisticsUrl数据"; | ||
77 | + break; | ||
78 | + case 6: | ||
79 | + $result[$key]['completed'] = true; | ||
80 | + break; | ||
81 | + default: | ||
82 | + break; | ||
83 | + } | ||
84 | + } | ||
85 | + } while (false); | ||
86 | + } | ||
87 | + } | ||
88 | + | ||
89 | + if (USE_CACHE) { | ||
90 | + // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | ||
91 | + if (empty($result)) { | ||
92 | + $result = Cache::get($key, 'slave'); | ||
93 | + } | ||
94 | + // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | ||
95 | + else { | ||
96 | + Cache::set($key, $result); | ||
97 | + } | ||
98 | + } | ||
99 | + return $result; | ||
27 | } | 100 | } |
28 | - | 101 | + |
102 | + //格式化订单商品 | ||
103 | + static function formatOrderGoods($orderGoods) { | ||
104 | + $arr = array(); | ||
105 | + foreach ($orderGoods as $key => $vo) { | ||
106 | + $arr[$key]['thumb'] = Helpers::getImageUrl($vo['goods_image'], 90, 120); | ||
107 | + $arr[$key]['name'] = $vo['product_name']; | ||
108 | + $arr[$key]['color'] = $vo['color_name']; | ||
109 | + $arr[$key]['size'] = $vo['size_name']; | ||
110 | + $arr[$key]['price'] = $vo['goods_price']; | ||
111 | + $arr[$key]['count'] = $vo['buy_number']; | ||
112 | + if ($vo['goods_type'] == 'gift') { | ||
113 | + $arr[$key]['gift'] = true; | ||
114 | + } elseif ($vo['goods_type'] == 'price_gift') { | ||
115 | + $arr[$key]['advanceBuy'] = true; | ||
116 | + } | ||
117 | + } | ||
118 | + return $arr; | ||
119 | + } | ||
120 | + | ||
29 | } | 121 | } |
@@ -103,8 +103,6 @@ class UserModel | @@ -103,8 +103,6 @@ class UserModel | ||
103 | 103 | ||
104 | // 处理用户订单数据 | 104 | // 处理用户订单数据 |
105 | if (isset($orderData['data']) && !empty($orderData['data'])) { | 105 | if (isset($orderData['data']) && !empty($orderData['data'])) { |
106 | - $result = $orderData['data']; | ||
107 | - | ||
108 | $oneOrder = array(); | 106 | $oneOrder = array(); |
109 | foreach ($orderData['data']['order_list'] as $val) { | 107 | foreach ($orderData['data']['order_list'] as $val) { |
110 | $oneOrder = array(); | 108 | $oneOrder = array(); |
@@ -120,21 +118,18 @@ class UserModel | @@ -120,21 +118,18 @@ class UserModel | ||
120 | $oneGoods = array(); | 118 | $oneGoods = array(); |
121 | $oneGoods['id'] = 1; | 119 | $oneGoods['id'] = 1; |
122 | $oneGoods['thumb'] = Helpers::getImageUrl($goods['goods_image'], 60, 80); | 120 | $oneGoods['thumb'] = Helpers::getImageUrl($goods['goods_image'], 60, 80); |
123 | - $oneGoods['name'] = $val['product_name']; | ||
124 | - $oneGoods['color'] = $val['color_name']; | ||
125 | - $oneGoods['size'] = $val['size_name']; | ||
126 | - $oneGoods['size_name'] = $val['size_name']; | ||
127 | - $oneGoods['price'] = $val['goods_price']; | ||
128 | - $oneGoods['count'] = $val['buy_number']; | ||
129 | - | ||
130 | - $result['goods'][] = $oneGoods; | 121 | + $oneGoods['name'] = $goods['product_name']; |
122 | + $oneGoods['color'] = $goods['color_name']; | ||
123 | + $oneGoods['size'] = $goods['size_name']; | ||
124 | + $oneGoods['price'] = $goods['goods_price']; | ||
125 | + $oneGoods['count'] = $goods['buy_number']; | ||
126 | + | ||
127 | + $oneOrder[] = $oneGoods; | ||
131 | } | 128 | } |
132 | 129 | ||
133 | $result['orders'][] = $oneOrder; | 130 | $result['orders'][] = $oneOrder; |
134 | } | 131 | } |
135 | - | ||
136 | } | 132 | } |
137 | - print_r($result); | ||
138 | 133 | ||
139 | return $result; | 134 | return $result; |
140 | } | 135 | } |
@@ -234,8 +234,8 @@ class NewsaleModel | @@ -234,8 +234,8 @@ class NewsaleModel | ||
234 | * @param string|null $sort 品类ID查询参数 | 234 | * @param string|null $sort 品类ID查询参数 |
235 | * @param integer|null $tab_id Tab的ID | 235 | * @param integer|null $tab_id Tab的ID |
236 | * @param boolean $notab 时候返回顶部tab的数据,默认返回 | 236 | * @param boolean $notab 时候返回顶部tab的数据,默认返回 |
237 | - * @param integer $limit 查询返回的最大限制数, 默认为50 | ||
238 | - * @param integer $page 分页第几页, 默认第1页 | 237 | + * @param integer $limit 查询返回的最大限制数 |
238 | + * @param integer $page 分页第几页 | ||
239 | * @return array 处理之后的数据 | 239 | * @return array 处理之后的数据 |
240 | */ | 240 | */ |
241 | public static function selectTopData($gender, $sort, $tab_id, $notab, $limit, $page) | 241 | public static function selectTopData($gender, $sort, $tab_id, $notab, $limit, $page) |
@@ -245,12 +245,7 @@ class NewsaleModel | @@ -245,12 +245,7 @@ class NewsaleModel | ||
245 | $data = NewsaleData::getTopProducts($gender, $sort, $tab_id, $limit, $page); | 245 | $data = NewsaleData::getTopProducts($gender, $sort, $tab_id, $limit, $page); |
246 | 246 | ||
247 | if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['product_list'])) { | 247 | if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['product_list'])) { |
248 | - $result = NewSaleProcess::newSaleData($data['data']); | ||
249 | - unset($result['filter']); | ||
250 | - | ||
251 | - if ($notab) { | ||
252 | - unset($result['tabs']); | ||
253 | - } | 248 | + $result = NewSaleProcess::topData($data['data'], $notab, $limit, $page); |
254 | } | 249 | } |
255 | 250 | ||
256 | return $result; | 251 | return $result; |
-
Please register or login to post a comment