Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
16 changed files
with
90 additions
and
26 deletions
@@ -21,3 +21,23 @@ DATA: | @@ -21,3 +21,23 @@ DATA: | ||
21 | --------------- | 21 | --------------- |
22 | {"code":200,"message":"Last Search List.","data":{"product_list":[{"brand_id":144,"market_price":590,"vip_price":0,"sales_price":590,"vip_discount_type":1,"product_id":"150783","max_sort_id":3,"storage_num":38,"product_name":"VANS M JT CARGO\t ","cn_alphabet":"VANSMJTCARGOVN02NJCMA","product_skn":51088175,"brand_name":"VANS","is_new":"Y","is_discount":"N","is_advance":"N","is_soon_sold_out":"N","is_limited":"N","is_yohood":"N","sales_phrase":"","goods_list":[{"goods_id":"207531","color_name":"\u7eff\u8272","color_id":"6","color_code":"#47ba17","color_value":"","images_url":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02b2ed1aad22f35ed07f7d98a9de5d6ebf.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90","product_skc":"202881","is_default":"N"}],"tags":[],"default_images":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02b2ed1aad22f35ed07f7d98a9de5d6ebf.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90"},{"brand_id":144,"market_price":490,"vip_price":0,"sales_price":490,"vip_discount_type":1,"product_id":"150781","max_sort_id":3,"storage_num":3,"product_name":"VANS M WARRICK\t ","cn_alphabet":"VANSMWARRICKVN02NIBHH","product_skn":51088174,"brand_name":"VANS","is_new":"Y","is_discount":"N","is_advance":"N","is_soon_sold_out":"N","is_limited":"N","is_yohood":"N","sales_phrase":"","goods_list":[{"goods_id":"207529","color_name":"\u9ed1\u8272","color_id":"2","color_code":"#333333","color_value":"","images_url":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02f401305cc7af370a894d7a094bd6f64c.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90","product_skc":"202880","is_default":"N"}],"tags":[],"default_images":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02f401305cc7af370a894d7a094bd6f64c.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90"}],"page_total":2,"total":52,"page":1,"content_code":""},"md5":"b66258633f505562a520e0fccf0b8803"} | 22 | {"code":200,"message":"Last Search List.","data":{"product_list":[{"brand_id":144,"market_price":590,"vip_price":0,"sales_price":590,"vip_discount_type":1,"product_id":"150783","max_sort_id":3,"storage_num":38,"product_name":"VANS M JT CARGO\t ","cn_alphabet":"VANSMJTCARGOVN02NJCMA","product_skn":51088175,"brand_name":"VANS","is_new":"Y","is_discount":"N","is_advance":"N","is_soon_sold_out":"N","is_limited":"N","is_yohood":"N","sales_phrase":"","goods_list":[{"goods_id":"207531","color_name":"\u7eff\u8272","color_id":"6","color_code":"#47ba17","color_value":"","images_url":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02b2ed1aad22f35ed07f7d98a9de5d6ebf.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90","product_skc":"202881","is_default":"N"}],"tags":[],"default_images":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02b2ed1aad22f35ed07f7d98a9de5d6ebf.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90"},{"brand_id":144,"market_price":490,"vip_price":0,"sales_price":490,"vip_discount_type":1,"product_id":"150781","max_sort_id":3,"storage_num":3,"product_name":"VANS M WARRICK\t ","cn_alphabet":"VANSMWARRICKVN02NIBHH","product_skn":51088174,"brand_name":"VANS","is_new":"Y","is_discount":"N","is_advance":"N","is_soon_sold_out":"N","is_limited":"N","is_yohood":"N","sales_phrase":"","goods_list":[{"goods_id":"207529","color_name":"\u9ed1\u8272","color_id":"2","color_code":"#333333","color_value":"","images_url":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02f401305cc7af370a894d7a094bd6f64c.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90","product_skc":"202880","is_default":"N"}],"tags":[],"default_images":"http:\/\/img13.static.yhbimg.com\/goodsimg\/2015\/09\/25\/10\/02f401305cc7af370a894d7a094bd6f64c.jpg?imageMogr2\/thumbnail\/{width}x{height}\/extent\/{width}x{height}\/background\/d2hpdGU=\/position\/center\/quality\/90"}],"page_total":2,"total":52,"page":1,"content_code":""},"md5":"b66258633f505562a520e0fccf0b8803"} |
23 | 23 | ||
24 | + | ||
25 | + | ||
26 | +## 检测是否嵌入APP, APP里直接使用浏览器打开HTML5页面 | ||
27 | + | ||
28 | +URL: | ||
29 | +--------------- | ||
30 | +正式: http://m.yohobuy.com/appembed | ||
31 | +测试: http://buy.test.yoho.cn/appembed | ||
32 | + | ||
33 | +DATA: | ||
34 | +--------------- | ||
35 | +{ | ||
36 | + "open": "Y", | ||
37 | + "url": "http://m.yohobuy.com" | ||
38 | +} | ||
39 | +或 | ||
40 | +{ | ||
41 | + "open": "N", | ||
42 | + "url": "http://m.yohobuy.com" | ||
43 | +} |
@@ -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 static function getGradeData($gender, $channel, $uid) { |
23 | $urlList = array(); | 23 | $urlList = array(); |
24 | //获取会员等级数据 | 24 | //获取会员等级数据 |
25 | $param = Yohobuy::param(); | 25 | $param = Yohobuy::param(); |
@@ -70,7 +70,7 @@ class NewSaleProcess | @@ -70,7 +70,7 @@ class NewSaleProcess | ||
70 | $tabItem = array(); | 70 | $tabItem = array(); |
71 | $tabItem['title'] = $one; | 71 | $tabItem['title'] = $one; |
72 | $tabItem['dataId'] = $key; | 72 | $tabItem['dataId'] = $key; |
73 | - if ($key === 1) { | 73 | + if ($key === 0) { |
74 | $tabItem['focus'] = true; | 74 | $tabItem['focus'] = true; |
75 | } | 75 | } |
76 | $result['tabs'][] = $tabItem; | 76 | $result['tabs'][] = $tabItem; |
@@ -17,6 +17,12 @@ server | @@ -17,6 +17,12 @@ server | ||
17 | allow 172.16.0.0/16; | 17 | allow 172.16.0.0/16; |
18 | deny all; | 18 | deny all; |
19 | 19 | ||
20 | + #检测是否嵌入APP | ||
21 | + location = /appembed { | ||
22 | + default_type application/json; | ||
23 | + return 200 '{"open":"Y","url":"http://m.yohobuy.com"}'; | ||
24 | + } | ||
25 | + | ||
20 | #账号相关 | 26 | #账号相关 |
21 | location = /reg.html { | 27 | location = /reg.html { |
22 | root /Data/code/git/yohobuy/assets; | 28 | root /Data/code/git/yohobuy/assets; |
static/img/me/no-order.png
0 → 100644
1.62 KB
static/img/me/vip-se5df70ae85.png
deleted
100644 → 0
8.05 KB
@@ -37,7 +37,7 @@ function getOrders() { | @@ -37,7 +37,7 @@ function getOrders() { | ||
37 | } | 37 | } |
38 | 38 | ||
39 | inAjax = true; | 39 | inAjax = true; |
40 | - loading.show(); | 40 | + loading.showLoadingMask(); |
41 | 41 | ||
42 | $.ajax({ | 42 | $.ajax({ |
43 | type: 'GET', | 43 | type: 'GET', |
@@ -62,7 +62,7 @@ function getOrders() { | @@ -62,7 +62,7 @@ function getOrders() { | ||
62 | } | 62 | } |
63 | 63 | ||
64 | inAjax = false; | 64 | inAjax = false; |
65 | - loading.hide(); | 65 | + loading.hideLoadingMask(); |
66 | } | 66 | } |
67 | }); | 67 | }); |
68 | } | 68 | } |
@@ -20,7 +20,7 @@ goodsSwiper = new Swiper('.banner-swiper', { | @@ -20,7 +20,7 @@ goodsSwiper = new Swiper('.banner-swiper', { | ||
20 | lazyLoadingInPrevNext: true, | 20 | lazyLoadingInPrevNext: true, |
21 | loop: true, | 21 | loop: true, |
22 | paginationClickable: true, | 22 | paginationClickable: true, |
23 | - pagination: '.swiper-pagination', | 23 | + pagination: '.banner-top .pagination-inner', |
24 | nextButton: '.swiper-button-next', | 24 | nextButton: '.swiper-button-next', |
25 | prevButton: '.swiper-button-prev' | 25 | prevButton: '.swiper-button-prev' |
26 | }); | 26 | }); |
1 | -$vip: sprite-map("me/vip/*.png"); | ||
2 | .my-page { | 1 | .my-page { |
3 | background: #f0f0f0; | 2 | background: #f0f0f0; |
4 | 3 | ||
@@ -27,8 +26,8 @@ $vip: sprite-map("me/vip/*.png"); | @@ -27,8 +26,8 @@ $vip: sprite-map("me/vip/*.png"); | ||
27 | 26 | ||
28 | .vip-icon { | 27 | .vip-icon { |
29 | display: inline-block; | 28 | display: inline-block; |
30 | - width: pxToRem(70px); | ||
31 | - height: pxToRem(30px); | 29 | + width: pxToRem(72px); |
30 | + height: pxToRem(32px); | ||
32 | vertical-align: middle; | 31 | vertical-align: middle; |
33 | } | 32 | } |
34 | 33 |
1 | +$vip: sprite-map("me/vip/*.png", $spacing: 10px); | ||
2 | + | ||
1 | @import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service"; | 3 | @import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service"; |
2 | 4 |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | background: #f0f0f0; | 2 | background: #f0f0f0; |
3 | 3 | ||
4 | .order { | 4 | .order { |
5 | + position: relative; | ||
5 | display: block; | 6 | display: block; |
6 | background: #fff; | 7 | background: #fff; |
7 | margin: 30rem / $pxConvertRem 0; | 8 | margin: 30rem / $pxConvertRem 0; |
@@ -64,17 +65,38 @@ | @@ -64,17 +65,38 @@ | ||
64 | } | 65 | } |
65 | 66 | ||
66 | .no-order { | 67 | .no-order { |
68 | + position: absolute; | ||
69 | + background: #fff; | ||
67 | text-align: center; | 70 | text-align: center; |
68 | - color: #f0f0f0; | 71 | + top: 50%; |
72 | + margin-top: -220rem / $pxConvertRem; | ||
73 | + width: 100%; | ||
74 | + | ||
75 | + .icon { | ||
76 | + width: 153rem / $pxConvertRem; | ||
77 | + height: 196rem / $pxConvertRem; | ||
78 | + background: image-url('me/no-order.png') no-repeat; | ||
79 | + background-size: 100%; | ||
80 | + margin: 0 auto; | ||
81 | + } | ||
69 | 82 | ||
70 | - .iconfont { | ||
71 | - font-size: 50px; | 83 | + span { |
84 | + display: block; | ||
85 | + color: #b0b0b0; | ||
86 | + font-size: 24rem / $pxConvertRem; | ||
87 | + margin: 30rem / $pxConvertRem 0 110rem / $pxConvertRem; | ||
72 | } | 88 | } |
73 | 89 | ||
74 | .walk-way { | 90 | .walk-way { |
75 | display: block; | 91 | display: block; |
92 | + height: 80rem / pxConvertRem; | ||
93 | + line-height: 80rem / $pxConvertRem; | ||
94 | + width: 70%; | ||
95 | + margin: 0 auto; | ||
96 | + text-align: center; | ||
97 | + font-size: 30rem / $pxConvertRem; | ||
76 | color: #fff; | 98 | color: #fff; |
77 | - background: #fff; | 99 | + background: #444; |
78 | @include border-radius(5px); | 100 | @include border-radius(5px); |
79 | } | 101 | } |
80 | } | 102 | } |
1 | {{#if walkwayUrl}} | 1 | {{#if walkwayUrl}} |
2 | <div class="no-order"> | 2 | <div class="no-order"> |
3 | - <span class="iconfont"></span> | 3 | + <div class="icon"></div> |
4 | <span>你还没有订单</span> | 4 | <span>你还没有订单</span> |
5 | <a class="walk-way" href="{{walkwayUrl}}">随便逛逛</a> | 5 | <a class="walk-way" href="{{walkwayUrl}}">随便逛逛</a> |
6 | </div> | 6 | </div> |
@@ -353,19 +353,19 @@ class HomeController extends AbstractAction | @@ -353,19 +353,19 @@ class HomeController extends AbstractAction | ||
353 | * 意见反馈 | 353 | * 意见反馈 |
354 | */ | 354 | */ |
355 | public function suggestAction() { | 355 | public function suggestAction() { |
356 | + // 设置网站标题 | ||
357 | + $this->setTitle('意见反馈'); | ||
358 | + $this->setNavHeader('意见反馈', true, SITE_MAIN); | ||
359 | + | ||
356 | $udid = $this->getUdid(); | 360 | $udid = $this->getUdid(); |
357 | $page = $this->get('page', 1); | 361 | $page = $this->get('page', 1); |
358 | $limit = $this->get('limit', 30); | 362 | $limit = $this->get('limit', 30); |
359 | 363 | ||
360 | $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit); | 364 | $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit); |
361 | 365 | ||
362 | - //print_r($suggest); | 366 | + print_r($suggest); |
363 | $this->_view->display('suggest', array( | 367 | $this->_view->display('suggest', array( |
364 | 'suggestPage' => true, //加载js | 368 | 'suggestPage' => true, //加载js |
365 | - 'pageHeader' => array( | ||
366 | - 'navBack' => true, | ||
367 | - 'navTitle' => '意见反馈' | ||
368 | - ), | ||
369 | 'pageFooter' => true, | 369 | 'pageFooter' => true, |
370 | 'suggest' => true, | 370 | 'suggest' => true, |
371 | 'suggestContent' => array( | 371 | 'suggestContent' => array( |
@@ -15,7 +15,7 @@ class GradeModel | @@ -15,7 +15,7 @@ class GradeModel | ||
15 | * 获取个人中心-会员等级数据 | 15 | * 获取个人中心-会员等级数据 |
16 | */ | 16 | */ |
17 | 17 | ||
18 | - public function getGrade($gender, $channel, $uid) { | 18 | + public static function getGrade($gender, $channel, $uid) { |
19 | $result = array(); | 19 | $result = array(); |
20 | 20 | ||
21 | if (USE_CACHE) { | 21 | if (USE_CACHE) { |
@@ -27,6 +27,8 @@ class GradeModel | @@ -27,6 +27,8 @@ class GradeModel | ||
27 | } | 27 | } |
28 | //调用接口获取数据 | 28 | //调用接口获取数据 |
29 | $data = GradeData::getGradeData($gender, $channel, $uid); | 29 | $data = GradeData::getGradeData($gender, $channel, $uid); |
30 | + | ||
31 | + if (!empty($data['grade'])) { | ||
30 | switch (intval($data['grade']['current_vip_level'])) { | 32 | switch (intval($data['grade']['current_vip_level'])) { |
31 | case 0://普通会员 | 33 | case 0://普通会员 |
32 | $result['vipGrade']['vip0'] = true; | 34 | $result['vipGrade']['vip0'] = true; |
@@ -60,7 +62,7 @@ class GradeModel | @@ -60,7 +62,7 @@ class GradeModel | ||
60 | $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null); | 62 | $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null); |
61 | //当前vip等级享受的特权 | 63 | //当前vip等级享受的特权 |
62 | $result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential']; | 64 | $result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential']; |
63 | - | 65 | + } |
64 | 66 | ||
65 | if (USE_CACHE) { | 67 | if (USE_CACHE) { |
66 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 68 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
@@ -33,6 +33,7 @@ class UserModel | @@ -33,6 +33,7 @@ class UserModel | ||
33 | // 处理个人详情数据 | 33 | // 处理个人详情数据 |
34 | if (isset($userData['data']) && !empty($userData['data'])) { | 34 | if (isset($userData['data']) && !empty($userData['data'])) { |
35 | $result = $userData['data']; | 35 | $result = $userData['data']; |
36 | + $result['gender'] = $result['gender'] == 1 ? '男' : '女'; | ||
36 | $result['head_ico'] = Images::getImageUrl($result['head_ico'], 128, 128); | 37 | $result['head_ico'] = Images::getImageUrl($result['head_ico'], 128, 128); |
37 | } | 38 | } |
38 | 39 | ||
@@ -291,10 +292,10 @@ class UserModel | @@ -291,10 +292,10 @@ class UserModel | ||
291 | } else if (empty($consignee)) { | 292 | } else if (empty($consignee)) { |
292 | $result['code'] = 403; | 293 | $result['code'] = 403; |
293 | $result['message'] = '请输入收件人姓名'; | 294 | $result['message'] = '请输入收件人姓名'; |
294 | - } else if (!empty($email) && Helpers::verifyEmail($email)) { | 295 | + } else if (!empty($email) && !Helpers::verifyEmail($email)) { |
295 | $result['code'] = 404; | 296 | $result['code'] = 404; |
296 | $result['message'] = '输入的邮箱地址格式不正确'; | 297 | $result['message'] = '输入的邮箱地址格式不正确'; |
297 | - } else if (!empty($mobile) && Helpers::verifyMobile($mobile)) { | 298 | + } else if (!empty($mobile) && !Helpers::verifyMobile($mobile)) { |
298 | $result['code'] = 404; | 299 | $result['code'] = 404; |
299 | $result['message'] = '输入的手机号码格式不正确'; | 300 | $result['message'] = '输入的手机号码格式不正确'; |
300 | } else { | 301 | } else { |
@@ -302,7 +303,8 @@ class UserModel | @@ -302,7 +303,8 @@ class UserModel | ||
302 | $address = UserData::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code); | 303 | $address = UserData::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code); |
303 | // 处理返回结果 | 304 | // 处理返回结果 |
304 | if (isset($address['code']) && $address['code'] == 200) { | 305 | if (isset($address['code']) && $address['code'] == 200) { |
305 | - $result = $address['data']; | 306 | + $result['code'] = $address['code']; |
307 | + $result['message'] = $address['message']; | ||
306 | } | 308 | } |
307 | } | 309 | } |
308 | 310 | ||
@@ -348,7 +350,20 @@ class UserModel | @@ -348,7 +350,20 @@ class UserModel | ||
348 | 350 | ||
349 | // 处理意见反馈数据 | 351 | // 处理意见反馈数据 |
350 | if (isset($suggest['data']) && !empty($suggest['data'])) { | 352 | if (isset($suggest['data']) && !empty($suggest['data'])) { |
351 | - $result = $suggest['data']; | 353 | + $one = array(); |
354 | + foreach ($suggest['data']['list'] as $val) { | ||
355 | + $one = array(); | ||
356 | + $one['hasImage'] = $val['has_image']; | ||
357 | + $one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240); | ||
358 | + $one['title'] = $val['filter_content']; | ||
359 | + $one['content'] = $val['reply_content']; | ||
360 | + $one['good'] = $val['is_reliable']; | ||
361 | + $one['bad'] = !$val['is_reliable']; | ||
362 | + $one['goodNum'] = $val['reliable']; | ||
363 | + $one['badNum'] = $val['unreliable']; | ||
364 | + | ||
365 | + $result[] = $one; | ||
366 | + } | ||
352 | } | 367 | } |
353 | 368 | ||
354 | return $result; | 369 | return $result; |
-
Please register or login to post a comment