do home page view my order logistic
Showing
28 changed files
with
329 additions
and
192 deletions
@@ -24,8 +24,8 @@ class Yohobuy | @@ -24,8 +24,8 @@ class Yohobuy | ||
24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; |
25 | 25 | ||
26 | /* 测试环境 */ | 26 | /* 测试环境 */ |
27 | - const API_URL = 'http://devapi.yoho.cn:58078/'; | ||
28 | - const SERVICE_URL = 'http://devservice.yoho.cn:58077/'; | 27 | + const API_URL = 'http://testapi.yoho.cn:28078/'; |
28 | + const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; | ||
29 | const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 29 | const YOHOBUY_URL = 'http://www.yohobuy.com/'; |
30 | const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order/'; //我的订单 | 30 | const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order/'; //我的订单 |
31 | const API_URL_MYCENTER = 'http://192.168.102.205:8081/users/'; // 我的个人中心接口URL | 31 | const API_URL_MYCENTER = 'http://192.168.102.205:8081/users/'; // 我的个人中心接口URL |
@@ -18,7 +18,7 @@ class OrderData | @@ -18,7 +18,7 @@ class OrderData | ||
18 | * and open the template in the editor. | 18 | * and open the template in the editor. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | - static function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) | 21 | + public static function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) |
22 | { | 22 | { |
23 | //构建必传参数 | 23 | //构建必传参数 |
24 | $param = Yohobuy::param(); | 24 | $param = Yohobuy::param(); |
@@ -40,7 +40,7 @@ class OrderData | @@ -40,7 +40,7 @@ class OrderData | ||
40 | * and open the template in the editor. | 40 | * and open the template in the editor. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | - static function cancelOrderData($order_code, $uid, $gender, $yh_channel) | 43 | + public static function cancelOrderData($order_code, $uid, $gender, $yh_channel) |
44 | { | 44 | { |
45 | //构建必传参数 | 45 | //构建必传参数 |
46 | $param = Yohobuy::param(); | 46 | $param = Yohobuy::param(); |
@@ -60,7 +60,7 @@ class OrderData | @@ -60,7 +60,7 @@ class OrderData | ||
60 | * and open the template in the editor. | 60 | * and open the template in the editor. |
61 | */ | 61 | */ |
62 | 62 | ||
63 | - static function deleteOrderData($order_code, $uid, $gender, $yh_channel) | 63 | + public static function deleteOrderData($order_code, $uid, $gender, $yh_channel) |
64 | { | 64 | { |
65 | //构建必传参数 | 65 | //构建必传参数 |
66 | $param = Yohobuy::param(); | 66 | $param = Yohobuy::param(); |
@@ -76,17 +76,18 @@ class OrderData | @@ -76,17 +76,18 @@ class OrderData | ||
76 | 76 | ||
77 | /* | 77 | /* |
78 | * 我的订单-查看物流 | 78 | * 我的订单-查看物流 |
79 | - * To change this template file, choose Tools | Templates | ||
80 | - * and open the template in the editor. | 79 | + * |
80 | + * @param int $orderCode 订单号 | ||
81 | + * @param int $uid 用户ID | ||
82 | + * @return array | ||
81 | */ | 83 | */ |
82 | - | ||
83 | - static function LogisticsData() | 84 | + public static function LogisticsData($orderCode, $uid) |
84 | { | 85 | { |
85 | //构建必传参数 | 86 | //构建必传参数 |
86 | $param = Yohobuy::param(); | 87 | $param = Yohobuy::param(); |
87 | $param['method'] = 'app.express.li'; | 88 | $param['method'] = 'app.express.li'; |
88 | - //$param['gender'] = $gender; | ||
89 | - //$param['yh_channel'] = $yh_channel; | 89 | + $param['order_code'] = $orderCode; |
90 | + $param['uid'] = $uid; | ||
90 | $param['client_secret'] = Sign::getSign($param); | 91 | $param['client_secret'] = Sign::getSign($param); |
91 | //调用接口获得数据 | 92 | //调用接口获得数据 |
92 | return Yohobuy::get(Yohobuy::API_URL, $param); | 93 | return Yohobuy::get(Yohobuy::API_URL, $param); |
@@ -96,7 +97,7 @@ class OrderData | @@ -96,7 +97,7 @@ class OrderData | ||
96 | * 支付url | 97 | * 支付url |
97 | * To change this template file, choose Tools | Templates | 98 | * To change this template file, choose Tools | Templates |
98 | */ | 99 | */ |
99 | - static function paymentData($gender, $yh_channel, $code) | 100 | + public static function paymentData($gender, $yh_channel, $code) |
100 | { | 101 | { |
101 | //构建必传参数 | 102 | //构建必传参数 |
102 | $param = Yohobuy::param(); | 103 | $param = Yohobuy::param(); |
@@ -109,10 +110,11 @@ class OrderData | @@ -109,10 +110,11 @@ class OrderData | ||
109 | } | 110 | } |
110 | 111 | ||
111 | /* | 112 | /* |
112 | - * 随便逛逛url | ||
113 | - * To change this template file, choose Tools | Templates | 113 | + * 随便逛逛url |
114 | + * | ||
115 | + * 备注:暂不使用 | ||
114 | */ | 116 | */ |
115 | - static function strollData($gender, $yh_channel, $code) | 117 | + public static function strollData($gender, $yh_channel, $code) |
116 | { | 118 | { |
117 | //构建必传参数 | 119 | //构建必传参数 |
118 | $param = Yohobuy::param(); | 120 | $param = Yohobuy::param(); |
@@ -431,4 +431,35 @@ class UserData | @@ -431,4 +431,35 @@ class UserData | ||
431 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v1/help/getCategory', $param); | 431 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v1/help/getCategory', $param); |
432 | } | 432 | } |
433 | 433 | ||
434 | + /** | ||
435 | + * 帮助中心列表接口 | ||
436 | + * | ||
437 | + * @return array 接口返回的数据 | ||
438 | + */ | ||
439 | + public static function helpListData() | ||
440 | + { | ||
441 | + $param = Yohobuy::param(); | ||
442 | + $param['method'] = 'app.help.li'; | ||
443 | + $param['client_secret'] = Sign::getSign($param); | ||
444 | + | ||
445 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
446 | + } | ||
447 | + | ||
448 | + /** | ||
449 | + * 帮助详情接口 | ||
450 | + * | ||
451 | + * @param string $code 具体一条帮助的code | ||
452 | + * @return array 接口返回的数据 | ||
453 | + */ | ||
454 | + public static function helpDetailData($code) | ||
455 | + { | ||
456 | + $param = Yohobuy::param(); | ||
457 | + $param['method'] = 'app.help.detail'; | ||
458 | + $param['return_type'] = 'html'; | ||
459 | + $param['code'] = $code; | ||
460 | + $param['client_secret'] = Sign::getSign($param); | ||
461 | + | ||
462 | + return Yohobuy::get(Yohobuy::API_URL, $param, true, true); | ||
463 | + } | ||
464 | + | ||
434 | } | 465 | } |
@@ -313,7 +313,7 @@ class ListProcess | @@ -313,7 +313,7 @@ class ListProcess | ||
313 | { | 313 | { |
314 | $fieldArr = array(); | 314 | $fieldArr = array(); |
315 | foreach ($array as $k => $v) { | 315 | foreach ($array as $k => $v) { |
316 | - $fieldArr[$k] = $v[$field]; | 316 | + $fieldArr[$k] = isset($v[$field]) ? $v[$field] : ''; |
317 | } | 317 | } |
318 | $sort = $desc == false ? SORT_ASC : SORT_DESC; | 318 | $sort = $desc == false ? SORT_ASC : SORT_DESC; |
319 | array_multisort($fieldArr, $sort, $array); | 319 | array_multisort($fieldArr, $sort, $array); |
@@ -16,6 +16,7 @@ var $addressForm = $('.edit-address'), | @@ -16,6 +16,7 @@ var $addressForm = $('.edit-address'), | ||
16 | $footer = $('#yoho-footer'), | 16 | $footer = $('#yoho-footer'), |
17 | $backBtn = $('.nav-back'), | 17 | $backBtn = $('.nav-back'), |
18 | $navTitle = $('.nav-title'), | 18 | $navTitle = $('.nav-title'), |
19 | + $input = $('input, textarea'), | ||
19 | navTitle = $navTitle.html(), | 20 | navTitle = $navTitle.html(), |
20 | $area = $('.area'), | 21 | $area = $('.area'), |
21 | isSubmiting, | 22 | isSubmiting, |
@@ -101,6 +102,7 @@ $addressForm.on('submit', function() { | @@ -101,6 +102,7 @@ $addressForm.on('submit', function() { | ||
101 | }); | 102 | }); |
102 | 103 | ||
103 | $submit.on('touchend', function() { | 104 | $submit.on('touchend', function() { |
105 | + $input.blur(); | ||
104 | $addressForm.submit(); | 106 | $addressForm.submit(); |
105 | return false; | 107 | return false; |
106 | }).on('touchstart', function() { | 108 | }).on('touchstart', function() { |
@@ -109,26 +111,26 @@ $submit.on('touchend', function() { | @@ -109,26 +111,26 @@ $submit.on('touchend', function() { | ||
109 | $(this).removeClass('highlight'); | 111 | $(this).removeClass('highlight'); |
110 | }); | 112 | }); |
111 | 113 | ||
112 | -$('input, textarea').on('focus', function() { | 114 | +$input.on('focus', function() { |
113 | $footer.hide(); | 115 | $footer.hide(); |
114 | }).on('blur', function() { | 116 | }).on('blur', function() { |
115 | $footer.show(); | 117 | $footer.show(); |
116 | }); | 118 | }); |
117 | 119 | ||
118 | -// 省市区 | ||
119 | -$area.on('touchend', function() { | ||
120 | - $editAddressPage.hide(); | ||
121 | - $addressListPage.show(1, function() { | ||
122 | - $footer.hide(); | ||
123 | - }); | ||
124 | - currentPage = 'list'; | ||
125 | - $navTitle.html('地区选择'); | ||
126 | -}); | ||
127 | - | ||
128 | // 省市区列表异步加载 | 120 | // 省市区列表异步加载 |
129 | $.get('/home/locationList').then(function(html) { | 121 | $.get('/home/locationList').then(function(html) { |
130 | $addressListPage.html(html); | 122 | $addressListPage.html(html); |
131 | 123 | ||
124 | + // 省市区 | ||
125 | + $area.on('touchend', function() { | ||
126 | + $editAddressPage.hide(); | ||
127 | + $addressListPage.show(1, function() { | ||
128 | + $footer.hide(); | ||
129 | + }); | ||
130 | + currentPage = 'list'; | ||
131 | + $navTitle.html('地区选择'); | ||
132 | + }); | ||
133 | + | ||
132 | // touchend 在下滑的时候会触发 | 134 | // touchend 在下滑的时候会触发 |
133 | // 省市区联动 | 135 | // 省市区联动 |
134 | $addressListPage.find('.address').each(function(i, elem) { | 136 | $addressListPage.find('.address').each(function(i, elem) { |
@@ -137,6 +139,9 @@ $.get('/home/locationList').then(function(html) { | @@ -137,6 +139,9 @@ $.get('/home/locationList').then(function(html) { | ||
137 | addressHammer.on('tap', function(e) { | 139 | addressHammer.on('tap', function(e) { |
138 | var $this = $(e.target); | 140 | var $this = $(e.target); |
139 | 141 | ||
142 | + if (e.target.tagName !== 'li') { | ||
143 | + $this = $this.parent('li'); | ||
144 | + } | ||
140 | newArea.push($this.children('.caption').text()); | 145 | newArea.push($this.children('.caption').text()); |
141 | $this.siblings().hide(); | 146 | $this.siblings().hide(); |
142 | $this.children('ul').show().children('li').show(); | 147 | $this.children('ul').show().children('li').show(); |
@@ -23,8 +23,9 @@ | @@ -23,8 +23,9 @@ | ||
23 | width: 16rem / $pxConvertRem; | 23 | width: 16rem / $pxConvertRem; |
24 | height: 16rem / $pxConvertRem; | 24 | height: 16rem / $pxConvertRem; |
25 | margin: 0 (8rem / $pxConvertRem); | 25 | margin: 0 (8rem / $pxConvertRem); |
26 | - background: #efefef; | 26 | + background: #f0f0f0; |
27 | border-radius: 50%; | 27 | border-radius: 50%; |
28 | + opacity: 1; | ||
28 | } | 29 | } |
29 | 30 | ||
30 | span.swiper-pagination-bullet-active { | 31 | span.swiper-pagination-bullet-active { |
@@ -85,4 +86,4 @@ | @@ -85,4 +86,4 @@ | ||
85 | } | 86 | } |
86 | } | 87 | } |
87 | } | 88 | } |
88 | -} | ||
89 | +} |
@@ -32,7 +32,9 @@ | @@ -32,7 +32,9 @@ | ||
32 | height: 180rem / $pxConvertRem; | 32 | height: 180rem / $pxConvertRem; |
33 | overflow: hidden; | 33 | overflow: hidden; |
34 | margin: 20rem / $pxConvertRem auto; | 34 | margin: 20rem / $pxConvertRem auto; |
35 | - background: image-url('me/employ/employ.jpg') top center no-repeat; | 35 | + background-image: image-url('me/employ/employ.jpg'); |
36 | + background-position: top center; | ||
37 | + background-repeat:no-repeat; | ||
36 | background-size: 100% 100%; | 38 | background-size: 100% 100%; |
37 | color: #fff; | 39 | color: #fff; |
38 | position: relative; | 40 | position: relative; |
@@ -35,6 +35,9 @@ | @@ -35,6 +35,9 @@ | ||
35 | font-size: 48em / $pxConvertRem; | 35 | font-size: 48em / $pxConvertRem; |
36 | margin-right: 8%; | 36 | margin-right: 8%; |
37 | float: left; | 37 | float: left; |
38 | + text-overflow:ellipsis; | ||
39 | + white-space:nowrap; | ||
40 | + overflow:hidden; | ||
38 | .head-portrait{ | 41 | .head-portrait{ |
39 | width:90rem / $pxConvertRem; | 42 | width:90rem / $pxConvertRem; |
40 | height: 90rem / $pxConvertRem; | 43 | height: 90rem / $pxConvertRem; |
@@ -31,7 +31,7 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -31,7 +31,7 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
31 | 31 | ||
32 | //意见反馈主体 | 32 | //意见反馈主体 |
33 | .suggest-content { | 33 | .suggest-content { |
34 | - border-top: pxToRem(30px) solid #fff; | 34 | + border-top: 1px solid #e0e0e0; |
35 | 35 | ||
36 | .suggest-item { | 36 | .suggest-item { |
37 | width: 100%; | 37 | width: 100%; |
@@ -76,6 +76,7 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -76,6 +76,7 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
76 | &.suggest-active { | 76 | &.suggest-active { |
77 | > div { | 77 | > div { |
78 | width: 50%; | 78 | width: 50%; |
79 | + height: 100%; | ||
79 | float: left; | 80 | float: left; |
80 | text-align: left; | 81 | text-align: left; |
81 | padding-left: pxToRem(128px); | 82 | padding-left: pxToRem(128px); |
@@ -135,8 +136,29 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -135,8 +136,29 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
135 | line-height: pxToRem(88px); | 136 | line-height: pxToRem(88px); |
136 | text-align: center; | 137 | text-align: center; |
137 | font-size: pxToRem(30px); | 138 | font-size: pxToRem(30px); |
138 | - border-top: 1px solid #e0e0e0; | ||
139 | - border-bottom: 1px solid #e0e0e0; | 139 | + //border-top: 1px solid #e0e0e0; |
140 | + //border-bottom: 1px solid #e0e0e0; | ||
141 | + border-top: pxToRem(30px) solid #f0f0f0; | ||
142 | + border-bottom: pxToRem(30px) solid #f0f0f0; | ||
143 | + position: relative; | ||
144 | + &:after { | ||
145 | + content: ''; | ||
146 | + width: 100%; | ||
147 | + height: 1px; | ||
148 | + border-top: 1px solid #e0e0e0; | ||
149 | + position: absolute; | ||
150 | + left: 0; | ||
151 | + top: 0; | ||
152 | + } | ||
153 | + &:before { | ||
154 | + content: ''; | ||
155 | + width: 100%; | ||
156 | + height: 1px; | ||
157 | + border-bottom: 1px solid #e0e0e0; | ||
158 | + position: absolute; | ||
159 | + left: 0; | ||
160 | + bottom: 0; | ||
161 | + } | ||
140 | 162 | ||
141 | a { | 163 | a { |
142 | color: #444; | 164 | color: #444; |
@@ -38,7 +38,7 @@ $basicBtnC:#eb0313; | @@ -38,7 +38,7 @@ $basicBtnC:#eb0313; | ||
38 | .column { | 38 | .column { |
39 | box-sizing: border-box; | 39 | box-sizing: border-box; |
40 | display: table-cell; | 40 | display: table-cell; |
41 | - padding: pxToRem(16px) pxToRem(12px); | 41 | + padding: pxToRem(20px) pxToRem(12px); |
42 | width: 50%; | 42 | width: 50%; |
43 | border-bottom: 1px solid #fff; | 43 | border-bottom: 1px solid #fff; |
44 | border-right: 1px solid #fff; | 44 | border-right: 1px solid #fff; |
@@ -100,8 +100,10 @@ $basicBtnC:#eb0313; | @@ -100,8 +100,10 @@ $basicBtnC:#eb0313; | ||
100 | margin-left: .5px; | 100 | margin-left: .5px; |
101 | font-size: pxToRem(18px); | 101 | font-size: pxToRem(18px); |
102 | text-align: center; | 102 | text-align: center; |
103 | - line-height: pxToRem(30px); | ||
104 | - padding: 0 8px; | 103 | + line-height: pxToRem(24px); |
104 | + position: relative; | ||
105 | + vertical-align: middle; | ||
106 | + padding:0 5px; | ||
105 | } | 107 | } |
106 | .new-tag { | 108 | .new-tag { |
107 | background-color: #78dc7e; | 109 | background-color: #78dc7e; |
@@ -253,6 +255,7 @@ $basicBtnC:#eb0313; | @@ -253,6 +255,7 @@ $basicBtnC:#eb0313; | ||
253 | vertical-align: middle; | 255 | vertical-align: middle; |
254 | display: inline-block; | 256 | display: inline-block; |
255 | line-height: pxToRem(88px); | 257 | line-height: pxToRem(88px); |
258 | + padding-left: pxToRem(8px); | ||
256 | } | 259 | } |
257 | .vip-img { | 260 | .vip-img { |
258 | width: pxToRem(53px); | 261 | width: pxToRem(53px); |
@@ -394,9 +397,10 @@ $basicBtnC:#eb0313; | @@ -394,9 +397,10 @@ $basicBtnC:#eb0313; | ||
394 | // .recommend-for-you { | 397 | // .recommend-for-you { |
395 | // margin-bottom: pxToRem(30px); | 398 | // margin-bottom: pxToRem(30px); |
396 | // } | 399 | // } |
400 | + .yoho-tip{ | ||
401 | + top:40%; | ||
402 | + } | ||
397 | } | 403 | } |
398 | -.bottom-blank{ | ||
399 | - height: pxToRem(120px); | ||
400 | -} | 404 | + |
401 | @import "comments-consults"; | 405 | @import "comments-consults"; |
402 | @import "product-description"; | 406 | @import "product-description"; |
@@ -44,27 +44,24 @@ | @@ -44,27 +44,24 @@ | ||
44 | min-height: pxToRem(136px); | 44 | min-height: pxToRem(136px); |
45 | margin: pxToRem(10px) 0; | 45 | margin: pxToRem(10px) 0; |
46 | text-align: center; | 46 | text-align: center; |
47 | + display: flex; | ||
48 | + align-items: center; | ||
47 | 49 | ||
48 | // width: 100%; | 50 | // width: 100%; |
49 | // border-bottom:1px solid $borderC; | 51 | // border-bottom:1px solid $borderC; |
50 | img { | 52 | img { |
51 | - position:absolute; | ||
52 | - top:0; | ||
53 | - bottom:0; | ||
54 | - left:0; | ||
55 | - margin:auto; | 53 | + //position:absolute; |
54 | + //top:0; | ||
55 | + //bottom:0; | ||
56 | + //left:0; | ||
57 | + //margin:auto; | ||
56 | //width: pxToRem(90px); | 58 | //width: pxToRem(90px); |
57 | - height: auto; | ||
58 | - padding-right: pxToRem(20px); | 59 | + //height: auto; |
60 | + //padding-right: pxToRem(20px); | ||
59 | } | 61 | } |
60 | .material-image { | 62 | .material-image { |
61 | display: inline-block; | 63 | display: inline-block; |
62 | width: 23%; | 64 | width: 23%; |
63 | - min-height: pxToRem(136px); | ||
64 | - float: left; | ||
65 | - //background-size: 100%; | ||
66 | - background-position-x: center; | ||
67 | - background-repeat: no-repeat; | ||
68 | } | 65 | } |
69 | .material-desc { | 66 | .material-desc { |
70 | //padding-left:pxToRem(120px); | 67 | //padding-left:pxToRem(120px); |
@@ -84,17 +81,17 @@ | @@ -84,17 +81,17 @@ | ||
84 | } | 81 | } |
85 | } | 82 | } |
86 | .wash-tips{ | 83 | .wash-tips{ |
87 | - padding-top:pxToRem(18px); | 84 | + padding-top:pxToRem(20px); |
88 | &.page-block{ | 85 | &.page-block{ |
89 | // border-top: 0px; | 86 | // border-top: 0px; |
90 | padding-left: pxToRem(15px); | 87 | padding-left: pxToRem(15px); |
91 | padding-right: pxToRem(15px); | 88 | padding-right: pxToRem(15px); |
92 | } | 89 | } |
93 | - // padding-bottom:pxToRem(18px); | ||
94 | .tip{ | 90 | .tip{ |
95 | display: inline-block; | 91 | display: inline-block; |
96 | width: 16.6%; | 92 | width: 16.6%; |
97 | float:left; | 93 | float:left; |
94 | + //min-height: pxToRem(120px); | ||
98 | // margin-right: pxToRem(24px); | 95 | // margin-right: pxToRem(24px); |
99 | img{ | 96 | img{ |
100 | width: pxToRem(48px); | 97 | width: pxToRem(48px); |
@@ -106,7 +103,9 @@ | @@ -106,7 +103,9 @@ | ||
106 | padding: 0 pxToRem(13px); | 103 | padding: 0 pxToRem(13px); |
107 | font-size: pxToRem(18px); | 104 | font-size: pxToRem(18px); |
108 | line-height: pxToRem(22px); | 105 | line-height: pxToRem(22px); |
109 | - margin-bottom: pxToRem(18px); | 106 | + //margin-bottom: pxToRem(18px); |
107 | + min-height: pxToRem(44px); | ||
108 | + text-align:center; | ||
110 | } | 109 | } |
111 | } | 110 | } |
112 | 111 | ||
@@ -146,11 +145,12 @@ | @@ -146,11 +145,12 @@ | ||
146 | width: pxToRem(70px); | 145 | width: pxToRem(70px); |
147 | margin-top: pxToRem(66px); | 146 | margin-top: pxToRem(66px); |
148 | .avatar { | 147 | .avatar { |
149 | - line-height: pxToRem(40px); | 148 | + // line-height: pxToRem(40px); |
149 | + display: inline-block; | ||
150 | width: pxToRem(40px); | 150 | width: pxToRem(40px); |
151 | border-radius: 50%; | 151 | border-radius: 50%; |
152 | height: pxToRem(40px); | 152 | height: pxToRem(40px); |
153 | - margin: pxToRem(18px) 0; | 153 | + margin: pxToRem(12px) 0; |
154 | } | 154 | } |
155 | } | 155 | } |
156 | } | 156 | } |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="my-address-page yoho-page"> | 2 | <div class="my-address-page yoho-page"> |
3 | <div class="my-edit-address-page page-wrap"> | 3 | <div class="my-edit-address-page page-wrap"> |
4 | <form class="edit-address"> | 4 | <form class="edit-address"> |
5 | - <input type="hidden" name="id" value="{{address.address_id}}"> | 5 | + <input type="hidden" name="id" value="{{address.id}}"> |
6 | <label class="username"> | 6 | <label class="username"> |
7 | 收件人姓名 | 7 | 收件人姓名 |
8 | <input type="text" name="consignee" maxlength="20" value="{{address.consignee}}"> | 8 | <input type="text" name="consignee" maxlength="20" value="{{address.consignee}}"> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <span class="iconfont"></span> | 18 | <span class="iconfont"></span> |
19 | </label> | 19 | </label> |
20 | <label class="address"> | 20 | <label class="address"> |
21 | - 详细地址 | 21 | + 详细地址 |
22 | <textarea name="address" maxlength="255">{{address.address}}</textarea> | 22 | <textarea name="address" maxlength="255">{{address.address}}</textarea> |
23 | </label> | 23 | </label> |
24 | 24 | ||
@@ -28,7 +28,6 @@ | @@ -28,7 +28,6 @@ | ||
28 | 确认 | 28 | 确认 |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | - <div class="my-address-list-page page-wrap hide"> | ||
32 | - </div> | 31 | + {{> me/address/address-list}} |
33 | </div> | 32 | </div> |
34 | -{{> layout/footer}} | 33 | +{{> layout/footer}} |
1 | {{#coupons}} | 1 | {{#coupons}} |
2 | -<div class="employ-main" style="background:url('{{coupon_pic}}')"> | 2 | +<div class="employ-main" style="background-image:url('{{coupon_pic}}')"> |
3 | <span>{{ money}}</span> | 3 | <span>{{ money}}</span> |
4 | <p class="coupon-name">{{ coupon_name}}</p> | 4 | <p class="coupon-name">{{ coupon_name}}</p> |
5 | - <p>{{ couponValidity}}</p> | 5 | + <p>有效期:{{ couponValidity}}</p> |
6 | {{# used}}<i></i>{{/ used}} | 6 | {{# used}}<i></i>{{/ used}} |
7 | </div> | 7 | </div> |
8 | {{/coupons}} | 8 | {{/coupons}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | -<div class="yoho-page"> | ||
3 | - <div class="employ"> | ||
4 | - <span class="active">未使用</span> | ||
5 | - <span>已使用</span> | 2 | +<div class="employ"> |
3 | + <span class="active">未使用</span> | ||
4 | + <span>已使用</span> | ||
5 | +</div> | ||
6 | +{{# couponsUrl}} | ||
7 | + <div class="employ-list"> | ||
8 | + {{# used}} | ||
9 | + <div class="employ-main"> | ||
10 | + <span>{{ money}}</span> | ||
11 | + <p>{{ coupon_name}}</p> | ||
12 | + <p>{{ couponValidity}}</p> | ||
13 | + </div> | ||
14 | + {{/ used}} | ||
15 | + {{^ used}} | ||
16 | + <div class="null"> | ||
17 | + <i></i> | ||
18 | + <p>您还没有优惠券!</p> | ||
19 | + <a href="{{topURL}}">随便逛逛</a> | ||
20 | + </div> | ||
21 | + {{/ used}} | ||
6 | </div> | 22 | </div> |
7 | - <div id="employ"></div> | 23 | +<div class="employ-list not none"> |
24 | + {{# unused}} | ||
25 | + <div class="employ-main"> | ||
26 | + <span>{{ money}}</span> | ||
27 | + <p>{{ coupon_name}}</p> | ||
28 | + <p>{{ couponValidity}}</p> | ||
29 | + <i></i> | ||
30 | + </div> | ||
31 | + {{/ unused}} | ||
32 | + {{^ unused}} | ||
33 | + <div class="null"> | ||
34 | + <i></i> | ||
35 | + <p>您还没有使用的优惠券!</p> | ||
36 | + <a href="{{topURL}}">随便逛逛</a> | ||
37 | + </div> | ||
38 | + {{/ unused}} | ||
8 | </div> | 39 | </div> |
40 | +{{/ couponsUrl}} | ||
9 | {{> layout/footer}} | 41 | {{> layout/footer}} |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <div class="fav-load-more fav-load-background hide"></div> | 17 | <div class="fav-load-more fav-load-background hide"></div> |
18 | </div> | 18 | </div> |
19 | <div class="fav-type"> | 19 | <div class="fav-type"> |
20 | - <div class="fav-brand-swiper-wrapper"></div> | 20 | + <div class="fav-brand-swiper"></div> |
21 | <div class="fav-content-loading"></div> | 21 | <div class="fav-content-loading"></div> |
22 | 22 | ||
23 | <div class="fav-null-box hide"> | 23 | <div class="fav-null-box hide"> |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | {{#isLogin}}{{brand_favorite_total}}{{/isLogin}} | 28 | {{#isLogin}}{{brand_favorite_total}}{{/isLogin}} |
29 | <p>收藏的品牌</p> | 29 | <p>收藏的品牌</p> |
30 | </a> | 30 | </a> |
31 | - <a class="link-item" href="/home/record"> | 31 | + <a class="link-item" href="/home/"> |
32 | {{#isLogin}}{{product_browse}}{{/isLogin}} | 32 | {{#isLogin}}{{product_browse}}{{/isLogin}} |
33 | <p>浏览记录</p> | 33 | <p>浏览记录</p> |
34 | </a> | 34 | </a> |
@@ -44,23 +44,14 @@ | @@ -44,23 +44,14 @@ | ||
44 | <a class="type-item" href="/home/order?type=2"> | 44 | <a class="type-item" href="/home/order?type=2"> |
45 | <span class="iconfont"></span> | 45 | <span class="iconfont"></span> |
46 | <br>待付款 | 46 | <br>待付款 |
47 | - {{#if pendingPaymentCount}} | ||
48 | - <span class="num">{{pendingPaymentCount}}</span> | ||
49 | - {{/if}} | ||
50 | </a> | 47 | </a> |
51 | <a class="type-item" href="/home/order?type=3"> | 48 | <a class="type-item" href="/home/order?type=3"> |
52 | <span class="iconfont"></span> | 49 | <span class="iconfont"></span> |
53 | <br>待发货 | 50 | <br>待发货 |
54 | - {{#if dueOutGoodsCount}} | ||
55 | - <span class="num">{{dueOutGoodsCount}}</span> | ||
56 | - {{/if}} | ||
57 | </a> | 51 | </a> |
58 | <a class="type-item" href="/home/order?type=4"> | 52 | <a class="type-item" href="/home/order?type=4"> |
59 | <span class="iconfont"></span> | 53 | <span class="iconfont"></span> |
60 | <br>待收货 | 54 | <br>待收货 |
61 | - {{#if dueInGoodsCount}} | ||
62 | - <span class="num">{{dueInGoodsCount}}</span> | ||
63 | - {{/if}} | ||
64 | </a> | 55 | </a> |
65 | </div> | 56 | </div> |
66 | </div> | 57 | </div> |
@@ -103,7 +94,7 @@ | @@ -103,7 +94,7 @@ | ||
103 | </a> | 94 | </a> |
104 | </div> | 95 | </div> |
105 | <div class="group-list"> | 96 | <div class="group-list"> |
106 | - <a class="list-item" href="/help.html"> | 97 | + <a class="list-item" href="/home/IHelp"> |
107 | <span class="iconfont icon"></span> | 98 | <span class="iconfont icon"></span> |
108 | 帮助 | 99 | 帮助 |
109 | <span class="iconfont num"></span> | 100 | <span class="iconfont num"></span> |
@@ -115,4 +106,4 @@ | @@ -115,4 +106,4 @@ | ||
115 | </div> | 106 | </div> |
116 | 107 | ||
117 | {{> layout/download_app}} | 108 | {{> layout/download_app}} |
118 | -{{> layout/footer}} | 109 | +{{> layout/footer}} |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <div class="right"> | 8 | <div class="right"> |
9 | <div> | 9 | <div> |
10 | <span class='info'>物流公司:</span> | 10 | <span class='info'>物流公司:</span> |
11 | - <span >{{logisticCompany}}</span> | 11 | + <span>{{logisticCompany}}</span> |
12 | </div> | 12 | </div> |
13 | <div> | 13 | <div> |
14 | <span class='info'>快递单号:</span> | 14 | <span class='info'>快递单号:</span> |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <span class="timeline-node"></span> | 28 | <span class="timeline-node"></span> |
29 | <div class="timeline-info"> | 29 | <div class="timeline-info"> |
30 | <div class="timeline-info-row"> | 30 | <div class="timeline-info-row"> |
31 | - {{ city}} {{ status}} | 31 | + {{ status}} |
32 | </div> | 32 | </div> |
33 | <div class="timeline-info-row"> | 33 | <div class="timeline-info-row"> |
34 | {{date}} | 34 | {{date}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="online-service-detail-page yoho-page"> | 2 | <div class="online-service-detail-page yoho-page"> |
3 | <div class="qa-list"> | 3 | <div class="qa-list"> |
4 | - {{# service}} | ||
5 | {{# list}} | 4 | {{# list}} |
6 | <div class="question-item"> | 5 | <div class="question-item"> |
7 | <div class="question">Q:{{q}}</div> | 6 | <div class="question">Q:{{q}}</div> |
8 | <div class="answer">{{a}}</div> | 7 | <div class="answer">{{a}}</div> |
9 | </div> | 8 | </div> |
10 | - {{/ list}} | ||
11 | - {{/ service}} | 9 | + {{/ list}} |
12 | </div> | 10 | </div> |
13 | </div> | 11 | </div> |
14 | -{{> layout/footer}} | 12 | +{{> layout/footer}} |
@@ -10,20 +10,18 @@ | @@ -10,20 +10,18 @@ | ||
10 | {{# suggestContent}} | 10 | {{# suggestContent}} |
11 | <div class="suggest-item" data-id="{{suggest_id}}"> | 11 | <div class="suggest-item" data-id="{{suggest_id}}"> |
12 | {{#if imgUrl}} | 12 | {{#if imgUrl}} |
13 | - <div class="suggest-item-img"> | ||
14 | <img class="lazy" data-original="{{imgUrl}}" alt=""/> | 13 | <img class="lazy" data-original="{{imgUrl}}" alt=""/> |
15 | - </div> | ||
16 | {{/if}} | 14 | {{/if}} |
17 | <h2>{{title}}</h2> | 15 | <h2>{{title}}</h2> |
18 | <p>{{content}}</p> | 16 | <p>{{content}}</p> |
19 | 17 | ||
20 | - <div class="suggest-type suggest-good {{#good}}show{{/good}}"> | 18 | + <div class="suggest-type suggest-good"> |
21 | <div class="active"> | 19 | <div class="active"> |
22 | <span class="iconfont"></span> | 20 | <span class="iconfont"></span> |
23 | <span>靠谱,谢谢您的反馈</span> | 21 | <span>靠谱,谢谢您的反馈</span> |
24 | </div> | 22 | </div> |
25 | </div> | 23 | </div> |
26 | - <div class="suggest-type suggest-bad {{# bad}}show{{/ bad}}"> | 24 | + <div class="suggest-type suggest-bad"> |
27 | <div class="active"> | 25 | <div class="active"> |
28 | <span class="iconfont"></span> | 26 | <span class="iconfont"></span> |
29 | <span>不靠谱,谢谢您的反馈</span> | 27 | <span>不靠谱,谢谢您的反馈</span> |
@@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
2 | <div class="good-detail-page yoho-page"> | 2 | <div class="good-detail-page yoho-page"> |
3 | <div class="banner-container"> | 3 | <div class="banner-container"> |
4 | <div class="tag-container"> | 4 | <div class="tag-container"> |
5 | - <!-- <p class="good-tag new-tag">NEW</p> --> | 5 | + <p class="good-tag new-tag">NEW</p> |
6 | {{# tags}} | 6 | {{# tags}} |
7 | {{# is_new}} | 7 | {{# is_new}} |
8 | - <p class="good-tag new-tag">NEW</p> | 8 | + <!-- <p class="good-tag new-tag">NEW</p> --> |
9 | {{/ is_new}} | 9 | {{/ is_new}} |
10 | {{# is_advance}} | 10 | {{# is_advance}} |
11 | <p class="good-tag renew-tag">再到着</p> | 11 | <p class="good-tag renew-tag">再到着</p> |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | <ul class="vip-level clearfix"> | 56 | <ul class="vip-level clearfix"> |
57 | {{# list}} | 57 | {{# list}} |
58 | <li class="icons-item"> | 58 | <li class="icons-item"> |
59 | - <span class="vip-img" style="background-size:cover;"> | 59 | + <span class="vip-img" style="background-size:contain;"> |
60 | </span> | 60 | </span> |
61 | <span class="vip-price">{{text}}</span> | 61 | <span class="vip-price">{{text}}</span> |
62 | </li> | 62 | </li> |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | {{# savePrice}} | 15 | {{# savePrice}} |
16 | <div class="save-price save-price-number"> | 16 | <div class="save-price save-price-number"> |
17 | 比收藏时降价了<span>{{.}}</span> | 17 | 比收藏时降价了<span>{{.}}</span> |
18 | - <span class="del-fav"></span> | 18 | + <span class="del-fav iconfont"></span> |
19 | </div> | 19 | </div> |
20 | {{/ savePrice}} | 20 | {{/ savePrice}} |
21 | 21 |
@@ -277,14 +277,11 @@ | @@ -277,14 +277,11 @@ | ||
277 | </script> | 277 | </script> |
278 | {{/if}} | 278 | {{/if}} |
279 | {{#if browseRecordPage}} | 279 | {{#if browseRecordPage}} |
280 | -<<<<<<< HEAD | ||
281 | <script> | 280 | <script> |
282 | seajs.use('js/me/browse-record'); | 281 | seajs.use('js/me/browse-record'); |
283 | </script> | 282 | </script> |
284 | {{/if}} | 283 | {{/if}} |
285 | {{#if logisticInfoPage}} | 284 | {{#if logisticInfoPage}} |
286 | -======= | ||
287 | ->>>>>>> feature/hf | ||
288 | <script> | 285 | <script> |
289 | seajs.use('js/me/logistic'); | 286 | seajs.use('js/me/logistic'); |
290 | </script> | 287 | </script> |
@@ -105,7 +105,9 @@ | @@ -105,7 +105,9 @@ | ||
105 | <p class="material-desc"> | 105 | <p class="material-desc"> |
106 | {{desc}} | 106 | {{desc}} |
107 | </p>--> | 107 | </p>--> |
108 | - <div class="material-image" style="background-image:url({{img}})"></div> | 108 | + <div class="material-image"> |
109 | + <img src="{{img}}" alt="材质图"> | ||
110 | + </div> | ||
109 | <div class="material-desc"> | 111 | <div class="material-desc"> |
110 | {{desc}} | 112 | {{desc}} |
111 | </div> | 113 | </div> |
@@ -628,6 +628,7 @@ class HomeController extends AbstractAction | @@ -628,6 +628,7 @@ class HomeController extends AbstractAction | ||
628 | * 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders) | 628 | * 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders) |
629 | * | 629 | * |
630 | */ | 630 | */ |
631 | + | ||
631 | public function orderAction() | 632 | public function orderAction() |
632 | { | 633 | { |
633 | // 审判跳转登录页 | 634 | // 审判跳转登录页 |
@@ -660,7 +661,7 @@ class HomeController extends AbstractAction | @@ -660,7 +661,7 @@ class HomeController extends AbstractAction | ||
660 | if (!$this->isAjax()) { | 661 | if (!$this->isAjax()) { |
661 | echo ' '; | 662 | echo ' '; |
662 | } | 663 | } |
663 | - | 664 | + |
664 | //获取基本参数:type 1:全部 2:待付款 3:待发货 4:待收货 5:待评论 7:失败 取消 订单 | 665 | //获取基本参数:type 1:全部 2:待付款 3:待发货 4:待收货 5:待评论 7:失败 取消 订单 |
665 | $type = $this->get('type', 1); | 666 | $type = $this->get('type', 1); |
666 | $page = $this->get('page', 1); | 667 | $page = $this->get('page', 1); |
@@ -669,7 +670,7 @@ class HomeController extends AbstractAction | @@ -669,7 +670,7 @@ class HomeController extends AbstractAction | ||
669 | $uid = $this->getUid(true); | 670 | $uid = $this->getUid(true); |
670 | $gender = Helpers::getGenderByCookie(); | 671 | $gender = Helpers::getGenderByCookie(); |
671 | $channel = Helpers::getChannelByCookie(); | 672 | $channel = Helpers::getChannelByCookie(); |
672 | - $data = OrderModel::getOrder($type, $page, 10, $gender, $channel, $uid); | 673 | + $data = OrderModel::getOrder($type, $page, 10, $gender, $channel, 5772257); |
673 | /* 如果取不到订单数据时,分两种情况: | 674 | /* 如果取不到订单数据时,分两种情况: |
674 | 1、page>1时,echo一个空格字符串到浏览器。 | 675 | 1、page>1时,echo一个空格字符串到浏览器。 |
675 | 2、page=1时,就给一个随便逛逛的链接。 | 676 | 2、page=1时,就给一个随便逛逛的链接。 |
@@ -739,38 +740,22 @@ class HomeController extends AbstractAction | @@ -739,38 +740,22 @@ class HomeController extends AbstractAction | ||
739 | } | 740 | } |
740 | } | 741 | } |
741 | 742 | ||
742 | - /* | ||
743 | - * 我的订单-查看物流详情 | ||
744 | - */ | ||
745 | - | ||
746 | - public function getLogisticsAction() | ||
747 | - { | ||
748 | - $order_code = $this->get('order_code'); | ||
749 | - $order_code = '1509143619'; | ||
750 | - $data = OrderModel::Logistics($order_code); | ||
751 | - } | ||
752 | - | ||
753 | /** | 743 | /** |
754 | - * 物流信息页面 | 744 | + * 我的订单-查看物流信息 |
755 | */ | 745 | */ |
756 | public function logisticAction() | 746 | public function logisticAction() |
757 | { | 747 | { |
758 | - $data = array( | ||
759 | - 'logisticInfoPage' => true, | ||
760 | - 'pageFooter' => true, | ||
761 | - 'logisticImg' => 'http://localhost:8000/img/me/logistic/sf-icon.jpg', | ||
762 | - 'logisticCompany' => '顺丰0909', | ||
763 | - 'logisticNumber' => '999999999', | ||
764 | - 'logisticDetail' => array( | ||
765 | - array('city' => '南京市', 'status' => '派送中派送中派送', 'date' => '2015-12-01 22:03:30'), | ||
766 | - array('city' => '南京市', 'status' => '派送中', 'date' => '2015-12-01 22:03:30'), | ||
767 | - array('city' => '南京市', 'status' => '派送中', 'date' => '2015-12-01 22:03:30') | ||
768 | - ) | ||
769 | - ); | 748 | + // 审判跳转登录页 |
749 | + $this->auditJumpLogin(); | ||
770 | 750 | ||
771 | $this->setTitle('物流详情'); | 751 | $this->setTitle('物流详情'); |
772 | $this->setNavHeader('物流详情'); | 752 | $this->setNavHeader('物流详情'); |
773 | 753 | ||
754 | + $orderCode = $this->get('order_code'); | ||
755 | + $data = OrderModel::Logistics($orderCode, $this->_uid); | ||
756 | + $data['logisticInfoPage'] = true; | ||
757 | + $data['pageFooter'] = true; | ||
758 | + | ||
774 | $this->_view->display('logistic', $data); | 759 | $this->_view->display('logistic', $data); |
775 | } | 760 | } |
776 | 761 | ||
@@ -783,9 +768,9 @@ class HomeController extends AbstractAction | @@ -783,9 +768,9 @@ class HomeController extends AbstractAction | ||
783 | // OrderModel::payment($gender, $yh_channel); | 768 | // OrderModel::payment($gender, $yh_channel); |
784 | // } | 769 | // } |
785 | 770 | ||
786 | - /* | ||
787 | - * 我的订单-确认收货 | ||
788 | - */ | 771 | +// /* |
772 | +// * 我的订单-确认收货 | ||
773 | +// */ | ||
789 | // private function confirmAction(){ | 774 | // private function confirmAction(){ |
790 | // // | 775 | // // |
791 | // $gender = Helpers::getGenderByCookie(); | 776 | // $gender = Helpers::getGenderByCookie(); |
@@ -107,8 +107,8 @@ class BrandModel | @@ -107,8 +107,8 @@ class BrandModel | ||
107 | $build['list'] = array(); | 107 | $build['list'] = array(); |
108 | foreach ($value as $row) { | 108 | foreach ($value as $row) { |
109 | $list['name'] = $row['brand_name']; | 109 | $list['name'] = $row['brand_name']; |
110 | - $list['isHot'] = ($row['is_hot'] === 'Y') ? true : false; | ||
111 | - $list['isNew'] = ($row['is_show_new'] === 'Y') ? true : false; | 110 | + $list['isHot'] = (isset($row['is_hot']) && $row['is_hot'] === 'Y') ? true : false; |
111 | + $list['isNew'] = (isset($row['is_show_new']) && $row['is_show_new'] === 'Y') ? true : false; | ||
112 | $list['url'] = Helpers::url('', null, $row['brand_domain']); | 112 | $list['url'] = Helpers::url('', null, $row['brand_domain']); |
113 | $build['list'][] = $list; | 113 | $build['list'][] = $list; |
114 | } | 114 | } |
@@ -4,13 +4,6 @@ namespace Home; | @@ -4,13 +4,6 @@ namespace Home; | ||
4 | 4 | ||
5 | use LibModels\Wap\Home\OrderData; | 5 | use LibModels\Wap\Home\OrderData; |
6 | use Plugin\Helpers; | 6 | use Plugin\Helpers; |
7 | -use Configs\CacheConfig; | ||
8 | - | ||
9 | -/* | ||
10 | - * To change this license header, choose License Headers in Project Properties. | ||
11 | - * To change this template file, choose Tools | Templates | ||
12 | - * and open the template in the editor. | ||
13 | - */ | ||
14 | 7 | ||
15 | /** | 8 | /** |
16 | * Description of Order | 9 | * Description of Order |
@@ -18,7 +11,6 @@ use Configs\CacheConfig; | @@ -18,7 +11,6 @@ use Configs\CacheConfig; | ||
18 | */ | 11 | */ |
19 | class OrderModel | 12 | class OrderModel |
20 | { | 13 | { |
21 | - /* 频道选择页取背景图片的位置码 */ | ||
22 | 14 | ||
23 | const CODE_PAYMENT = '04cf5abaa7c20178325a07c4a833782c'; //支付订单资源码 | 15 | const CODE_PAYMENT = '04cf5abaa7c20178325a07c4a833782c'; //支付订单资源码 |
24 | const CODE_STROLL = 'a7989369aa86681c678bc40f171b8f1d'; //随便逛逛url地址资源码 | 16 | const CODE_STROLL = 'a7989369aa86681c678bc40f171b8f1d'; //随便逛逛url地址资源码 |
@@ -26,12 +18,18 @@ class OrderModel | @@ -26,12 +18,18 @@ class OrderModel | ||
26 | /** | 18 | /** |
27 | * 订单相关数据处理 | 19 | * 订单相关数据处理 |
28 | */ | 20 | */ |
29 | - public static function getOrder($type, $page, $limit, $gender, $yh_channel, $uid) { | 21 | + |
22 | + public static function getOrder($type, $page, $limit, $gender, $yh_channel, $uid) | ||
23 | + { | ||
30 | $result = array(); | 24 | $result = array(); |
31 | //调用接口获得数据 | 25 | //调用接口获得数据 |
32 | $data = OrderData::getOrderData($type, $page, $limit, $gender, $yh_channel, $uid); | 26 | $data = OrderData::getOrderData($type, $page, $limit, $gender, $yh_channel, $uid); |
27 | + // 判断是否还有数据, 没有数据则返回空 | ||
28 | + if (isset($data['data']['page_total']) && $page > $data['data']['page_total']) { | ||
29 | + return $result; | ||
30 | + } | ||
33 | //检查数据返回是否正常,正常则处理数据 | 31 | //检查数据返回是否正常,正常则处理数据 |
34 | - if ($data['code'] == 200 && isset($data['data'])) { | 32 | + if (!empty($data['data']['order_list'])) { |
35 | foreach ($data['data']['order_list'] as $key => $vo) { | 33 | foreach ($data['data']['order_list'] as $key => $vo) { |
36 | //订单号,支付状态,订单商品数量,订单总价格 | 34 | //订单号,支付状态,订单商品数量,订单总价格 |
37 | $result[$key]['orderNum'] = $vo['order_code']; | 35 | $result[$key]['orderNum'] = $vo['order_code']; |
@@ -48,8 +46,8 @@ class OrderModel | @@ -48,8 +46,8 @@ class OrderModel | ||
48 | break; | 46 | break; |
49 | } | 47 | } |
50 | /* 先判断订单付款方式,根据不同的付款方式计算订单状态。(注:货到付款没有待付款状态) | 48 | /* 先判断订单付款方式,根据不同的付款方式计算订单状态。(注:货到付款没有待付款状态) |
51 | - * 付款方式:1 => 在线支付,2 => 货到付款,3 => 现金支付,4 => 抵消支付; | ||
52 | - */ | 49 | + * 付款方式:1 => 在线支付,2 => 货到付款,3 => 现金支付,4 => 抵消支付; |
50 | + */ | ||
53 | //支付方式为非货到付款时,计算订单状态。 | 51 | //支付方式为非货到付款时,计算订单状态。 |
54 | if ($vo['payment_type'] != 2) { | 52 | if ($vo['payment_type'] != 2) { |
55 | switch ($vo['status']) { | 53 | switch ($vo['status']) { |
@@ -61,35 +59,13 @@ class OrderModel | @@ -61,35 +59,13 @@ class OrderModel | ||
61 | case 2: | 59 | case 2: |
62 | case 3: | 60 | case 3: |
63 | //已付款状态不给查看物流URL | 61 | //已付款状态不给查看物流URL |
64 | - $result[$key]['unreceived'] = true; | 62 | + $result[$key]['unreceived'] = true; |
65 | break; | 63 | break; |
66 | case 4: | 64 | case 4: |
67 | case 5: | 65 | case 5: |
68 | //已发货状态,给查看物流URL | 66 | //已发货状态,给查看物流URL |
69 | $result[$key]['unreceived'] = true; | 67 | $result[$key]['unreceived'] = true; |
70 | - $result[$key]['logisticsUrl'] = "暂无logisticsUrl数据"; | ||
71 | - break; | ||
72 | - case 6: | ||
73 | - $result[$key]['completed'] = true; | ||
74 | - break; | ||
75 | - default: | ||
76 | - break; | ||
77 | - } | ||
78 | - } elseif ($vo['payment_type'] == 2) { | ||
79 | - //订单为货到付款订单时,计算订单状态。(货到付款没有待付款状态) | ||
80 | - switch ($vo['status']) { | ||
81 | - case 0: | ||
82 | - case 1: | ||
83 | - case 2: | ||
84 | - case 3: | ||
85 | - //备货中、已付款状态不给查看物流链接 | ||
86 | - $result[$key]['unreceived'] = true; | ||
87 | - break; | ||
88 | - case 4: | ||
89 | - case 5: | ||
90 | - //待收货状态,给查看物流url | ||
91 | - $result[$key]['unreceived'] = true; | ||
92 | - $resault[$key]['logisticsUrl'] = "备注:暂无logisticsUrl数据"; | 68 | + $result[$key]['logisticsUrl'] = Helpers::url('/home/logistic', array('order_code' => $vo['order_code'])); |
93 | break; | 69 | break; |
94 | case 6: | 70 | case 6: |
95 | $result[$key]['completed'] = true; | 71 | $result[$key]['completed'] = true; |
@@ -97,6 +73,29 @@ class OrderModel | @@ -97,6 +73,29 @@ class OrderModel | ||
97 | default: | 73 | default: |
98 | break; | 74 | break; |
99 | } | 75 | } |
76 | + break; | ||
77 | + } | ||
78 | + | ||
79 | + //订单为货到付款订单时,计算订单状态。(货到付款没有待付款状态) | ||
80 | + switch ($vo['status']) { | ||
81 | + case 0: | ||
82 | + case 1: | ||
83 | + case 2: | ||
84 | + case 3: | ||
85 | + //备货中、已付款状态不给查看物流链接 | ||
86 | + $result[$key]['unreceived'] = true; | ||
87 | + break; | ||
88 | + case 4: | ||
89 | + case 5: | ||
90 | + //待收货状态,给查看物流url | ||
91 | + $result[$key]['unreceived'] = true; | ||
92 | + $result[$key]['logisticsUrl'] = Helpers::url('/home/logistic', array('order_code' => $vo['order_code'])); | ||
93 | + break; | ||
94 | + case 6: | ||
95 | + $result[$key]['completed'] = true; | ||
96 | + break; | ||
97 | + default: | ||
98 | + break; | ||
100 | } | 99 | } |
101 | } while (false); | 100 | } while (false); |
102 | } | 101 | } |
@@ -105,39 +104,67 @@ class OrderModel | @@ -105,39 +104,67 @@ class OrderModel | ||
105 | return $result; | 104 | return $result; |
106 | } | 105 | } |
107 | 106 | ||
107 | + /** | ||
108 | + * 获得支付链接 | ||
109 | + */ | ||
110 | + public static function payment($gender, $yh_channel) | ||
111 | + { | ||
112 | + $code = self::CODE_PAYMENT; | ||
113 | + $data = OrderData::paymentData($gender, $yh_channel, $code); | ||
114 | + } | ||
108 | 115 | ||
109 | - | ||
110 | - //根据type值设置nav属性 | ||
111 | - static function getNavs($type) { | ||
112 | - $navType = array(1=>'全部',2=>'待付款',3=>'待发货',4=>'待收货'); | 116 | + /** |
117 | + * 查看物流 | ||
118 | + * | ||
119 | + * @param int $orderCode 订单编号 | ||
120 | + * @param int $uid 用户ID | ||
121 | + * @return array | ||
122 | + */ | ||
123 | + public static function Logistics($orderCode, $uid) | ||
124 | + { | ||
125 | + $result = array(); | ||
126 | + | ||
127 | + if (isset($orderCode) && is_numeric($uid)) { | ||
128 | + $logistics = OrderData::LogisticsData($orderCode, $uid); | ||
129 | + if (!empty($logistics['data'])) { | ||
130 | + $result['logisticUrl'] = $logistics['data']['url']; | ||
131 | + $result['logisticImg'] = $logistics['data']['logo']; | ||
132 | + $result['logisticCompany'] = $logistics['data']['caption']; | ||
133 | + $result['logisticNumber'] = $logistics['data']['express_number']; | ||
134 | + | ||
135 | + $build = array(); | ||
136 | + foreach ($logistics['data']['express_detail'] as $value) { | ||
137 | + $build['status'] = $value['accept_address']; | ||
138 | + $build['date'] = $value['acceptTime']; | ||
139 | + $result['logisticDetail'][] = $build; | ||
140 | + } | ||
141 | + } | ||
142 | + } | ||
143 | + | ||
144 | + return $result; | ||
145 | + } | ||
146 | + | ||
147 | + /** | ||
148 | + * 根据type值设置nav属性 | ||
149 | + */ | ||
150 | + public static function getNavs($type) | ||
151 | + { | ||
152 | + $navType = array(1 => '全部', 2 => '待付款', 3 => '待发货', 4 => '待收货'); | ||
113 | $nav = array(); | 153 | $nav = array(); |
114 | foreach ($navType as $key => $value) { | 154 | foreach ($navType as $key => $value) { |
115 | $act = false; | 155 | $act = false; |
116 | - if($type == $key){ | 156 | + if ($type == $key) { |
117 | $act = true; | 157 | $act = true; |
118 | } | 158 | } |
119 | - $tmp = array( | ||
120 | - 'name'=>$value, | ||
121 | - 'typeId'=>$key, | ||
122 | - 'active'=>$act, | ||
123 | - 'url'=> Helpers::url('/home/order',array('type'=>$key)) | 159 | + $nav[] = array( |
160 | + 'name' => $value, | ||
161 | + 'typeId' => $key, | ||
162 | + 'active' => $act, | ||
163 | + 'url' => Helpers::url('/home/order', array('type' => $key)) | ||
124 | ); | 164 | ); |
125 | - $nav[] = $tmp; | ||
126 | } | 165 | } |
127 | - | ||
128 | - return $nav; | ||
129 | - } | ||
130 | - | ||
131 | 166 | ||
132 | - //获得支付链接 | ||
133 | - static function payment($gender, $yh_channel) { | ||
134 | - $code = self::CODE_PAYMENT; | ||
135 | - $data = OrderData::paymentData($gender, $yh_channel, $code); | 167 | + return $nav; |
136 | } | 168 | } |
137 | 169 | ||
138 | - //查看物流 | ||
139 | -// static function Logistics(){ | ||
140 | -// OrderData::LogisticsData(); | ||
141 | -// } | ||
142 | - | ||
143 | } | 170 | } |
@@ -142,10 +142,10 @@ class HomeModel | @@ -142,10 +142,10 @@ class HomeModel | ||
142 | 142 | ||
143 | // 调用接口获取数据 | 143 | // 调用接口获取数据 |
144 | $banner = IndexData::getBannerStart($resource); | 144 | $banner = IndexData::getBannerStart($resource); |
145 | - if (isset($banner['code']) && $banner['code'] == 200) { | 145 | + if (isset($banner['code']) && $banner['code'] == 200 && $banner['data']['total'] > 0) { |
146 | $result = array(); | 146 | $result = array(); |
147 | // 处理数据 | 147 | // 处理数据 |
148 | - foreach ($banner['data'] as $val) { | 148 | + foreach ($banner['data']['list'] as $val) { |
149 | foreach ($val['data'] as $single) { | 149 | foreach ($val['data'] as $single) { |
150 | $result['url'] = ($channel === 2) ? Helpers::url('/boys') : Helpers::url('/girls'); | 150 | $result['url'] = ($channel === 2) ? Helpers::url('/boys') : Helpers::url('/girls'); |
151 | $result['img'] = Helpers::getImageUrl($single['src'], 640, 200); | 151 | $result['img'] = Helpers::getImageUrl($single['src'], 640, 200); |
@@ -725,4 +725,42 @@ class UserModel | @@ -725,4 +725,42 @@ class UserModel | ||
725 | return $result; | 725 | return $result; |
726 | } | 726 | } |
727 | 727 | ||
728 | + /** | ||
729 | + * 处理帮助中心列表数据 | ||
730 | + * | ||
731 | + * @return array|mixed 处理之后的返回 | ||
732 | + */ | ||
733 | + public static function getHelpListData() | ||
734 | + { | ||
735 | + $result = array(); | ||
736 | + | ||
737 | + $helpListData = UserData::helpListData(); | ||
738 | + | ||
739 | + if (isset($helpListData['data']) && !empty($helpListData['data'])) { | ||
740 | + $help = $helpListData['data']; | ||
741 | + | ||
742 | + $one = array(); | ||
743 | + foreach ($help as $val) { | ||
744 | + $one = array(); | ||
745 | + $one['name'] = $val['caption']; | ||
746 | + $one['url'] = Helpers::url('/home/helpdetail/', array('code' => $val['code'])); | ||
747 | + | ||
748 | + $result['iHelp'][] = $one; | ||
749 | + } | ||
750 | + } | ||
751 | + | ||
752 | + return $result; | ||
753 | + } | ||
754 | + | ||
755 | + /** | ||
756 | + * 处理帮助详情数据 | ||
757 | + * | ||
758 | + * @param string $code 具体一条帮助的code | ||
759 | + * @return array|mixed 处理之后的返回 | ||
760 | + */ | ||
761 | + public static function getHelpDetailData($code) | ||
762 | + { | ||
763 | + return UserData::helpDetailData($code); | ||
764 | + } | ||
765 | + | ||
728 | } | 766 | } |
-
Please register or login to post a comment