Authored by biao

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -21,7 +21,7 @@ use LibModels\Wap\Product\SearchData; @@ -21,7 +21,7 @@ use LibModels\Wap\Product\SearchData;
21 class PlusstarData 21 class PlusstarData
22 { 22 {
23 23
24 - const URI_BRANDLIST = 'guang/api/v1/plustar/getlist'; 24 + const URI_BRANDLIST = 'guang/api/v3/plustar/getlist';
25 const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/' 25 const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/'
26 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/'; 26 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
27 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/'; 27 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
@@ -45,19 +45,20 @@ class PlusstarData @@ -45,19 +45,20 @@ class PlusstarData
45 45
46 // 公共的参数 46 // 公共的参数
47 $param = Yohobuy::param(); 47 $param = Yohobuy::param();
48 - $param['brand_type'] = '1';  
49 $param['gender'] = $gender; 48 $param['gender'] = $gender;
50 $param['yh_channel'] = $channel; 49 $param['yh_channel'] = $channel;
51 50
52 // 构建推荐的品牌参数及调用接口的URL 51 // 构建推荐的品牌参数及调用接口的URL
53 $build = $param; 52 $build = $param;
54 - $build['is_recommend'] = '1'; 53 + $build['brand_type'] = '4';
  54 + //$build['is_recommend'] = '1';
55 $build['client_secret'] = Sign::getSign($build); 55 $build['client_secret'] = Sign::getSign($build);
56 $urlList['recom'] = Yohobuy::httpBuildQuery($url, $build); 56 $urlList['recom'] = Yohobuy::httpBuildQuery($url, $build);
57 57
58 // 构建所有的品牌参数及调用接口的URL 58 // 构建所有的品牌参数及调用接口的URL
59 $build = $param; 59 $build = $param;
60 - $build['is_recommend'] = '0'; 60 + $build['brand_type'] = '1';
  61 + //$build['is_recommend'] = '0';
61 $build['client_secret'] = Sign::getSign($build); 62 $build['client_secret'] = Sign::getSign($build);
62 $urlList['all'] = Yohobuy::httpBuildQuery($url, $build); 63 $urlList['all'] = Yohobuy::httpBuildQuery($url, $build);
63 64
@@ -101,6 +101,9 @@ $addressForm.on('submit', function() { @@ -101,6 +101,9 @@ $addressForm.on('submit', function() {
101 }); 101 });
102 102
103 $submit.on('touchend', function() { 103 $submit.on('touchend', function() {
  104 + if (security.hasDangerInput(false)) {
  105 + return false;
  106 + }
104 $input.blur(); 107 $input.blur();
105 $addressForm.submit(); 108 $addressForm.submit();
106 return false; 109 return false;
@@ -6,12 +6,9 @@ @@ -6,12 +6,9 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 tip = require('../plugin/tip'), 8 tip = require('../plugin/tip'),
9 - security = require('../plugin/security'),  
10 loading = require('../plugin/loading'); 9 loading = require('../plugin/loading');
11 10
12 var $action = $('.action'), 11 var $action = $('.action'),
13 - $addressForm = $('.edit-address'),  
14 - $submit = $('.submit'),  
15 $addAddress = $('.add-address'), 12 $addAddress = $('.add-address'),
16 $footer = $('#yoho-footer'), 13 $footer = $('#yoho-footer'),
17 $confim = $('.confim-mask'), 14 $confim = $('.confim-mask'),
@@ -24,12 +21,13 @@ $pageWrap.first().css('min-height', function() { @@ -24,12 +21,13 @@ $pageWrap.first().css('min-height', function() {
24 }); 21 });
25 window.rePosFooter(); 22 window.rePosFooter();
26 23
27 -$confim.on('touchend', '.cancel', function() { 24 +$confim.on('touchend', '.cancel', function(e) {
28 deleteId = null; 25 deleteId = null;
29 - $confim.hide(); 26 + $confim.fadeOut();
  27 + return false;
30 }).on('touchend', '.confim', function() { 28 }).on('touchend', '.confim', function() {
31 loading.showLoadingMask(); 29 loading.showLoadingMask();
32 - $confim.hide(); 30 + $confim.fadeOut();
33 $.ajax({ 31 $.ajax({
34 method: 'POST', 32 method: 'POST',
35 url: '/home/delAddress', 33 url: '/home/delAddress',
@@ -52,6 +50,7 @@ $confim.on('touchend', '.cancel', function() { @@ -52,6 +50,7 @@ $confim.on('touchend', '.cancel', function() {
52 }).always(function() { 50 }).always(function() {
53 deleteId = null; 51 deleteId = null;
54 }); 52 });
  53 + return false;
55 }); 54 });
56 55
57 56
@@ -69,17 +68,5 @@ $addAddress.on('touchend', function() { @@ -69,17 +68,5 @@ $addAddress.on('touchend', function() {
69 // 删除 68 // 删除
70 $action.on('touchend', '.del', function() { 69 $action.on('touchend', '.del', function() {
71 deleteId = $(this).data('id'); 70 deleteId = $(this).data('id');
72 - $confim.show();  
73 -});  
74 -  
75 -$submit.on('touchend', function() {  
76 - if (security.hasDangerInput(false)) {  
77 - return false;  
78 - }  
79 - $addressForm.submit();  
80 - return false;  
81 -}).on('touchstart', function() {  
82 - $(this).addClass('highlight');  
83 -}).on('touchend touchcancel', function() {  
84 - $(this).removeClass('highlight'); 71 + $confim.fadeIn();
85 }); 72 });
@@ -114,11 +114,13 @@ $page.on('touchstart', '.del-icon', function() { @@ -114,11 +114,13 @@ $page.on('touchstart', '.del-icon', function() {
114 }); 114 });
115 setTimeout(function() { 115 setTimeout(function() {
116 window.history.go(0); 116 window.history.go(0);
117 - }, 2500); 117 + }, 1200);
118 } 118 }
119 }, 119 },
120 complete: function() { 120 complete: function() {
121 - dialog.hideDialog(); //隐藏dialog 121 + setTimeout(function() {
  122 + dialog.hideDialog();
  123 + }, 1500);
122 } 124 }
123 }); 125 });
124 }); 126 });
@@ -37,7 +37,7 @@ function getOrders(option) { @@ -37,7 +37,7 @@ function getOrders(option) {
37 page: order.page + 1 37 page: order.page + 1
38 }; 38 };
39 39
40 - var show = option && option.showLoadingMask; 40 + var show = option && !option.noLoadingMask;
41 41
42 if (inAjax) { 42 if (inAjax) {
43 return; 43 return;
@@ -10,7 +10,14 @@ var $ = require('jquery'), @@ -10,7 +10,14 @@ var $ = require('jquery'),
10 var commentsNum,consultsNum; 10 var commentsNum,consultsNum;
11 11
12 var consultFooterEle = document.getElementById('consult-content-footer'), 12 var consultFooterEle = document.getElementById('consult-content-footer'),
13 - consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle); 13 + consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle),
  14 +
  15 + navtabEle = document.getElementById('nav-tab'),
  16 + navtabHammer = navtabEle && new Hammer(navtabEle),
  17 +
  18 + gotoConsultEle = document.getElementById('goto-consult'),
  19 + gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle);
  20 +
14 21
15 22
16 (function() { 23 (function() {
@@ -36,29 +43,38 @@ var consultFooterEle = document.getElementById('consult-content-footer'), @@ -36,29 +43,38 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
36 43
37 })(); 44 })();
38 45
39 -$('#nav-tab li').on('touchend', function() {  
40 - var index = $(this).index(); 46 +if (navtabHammer) {
  47 + navtabHammer.on('tap', function(e) {
  48 + var $this = $(e.target).closest('li');
  49 + var index = $this.index();
41 50
42 - if ($(this).hasClass('comment-nav') && 0 === commentsNum) {  
43 - tip.show('暂无商品评价');  
44 - } else {  
45 - if (!$(this).hasClass('focus')) { 51 + if ($this.hasClass('comment-nav') && 0 === commentsNum) {
  52 + tip.show('暂无商品评价');
  53 + } else {
  54 + if (!$this.hasClass('focus')) {
46 55
47 - $('#nav-tab li').each(function() {  
48 - $(this).removeClass('focus');  
49 - });  
50 - $('#feedback-content .content').each(function() {  
51 - $(this).addClass('hide');  
52 - }); 56 + $('#nav-tab li').each(function() {
  57 + $(this).removeClass('focus');
  58 + });
  59 + $('#feedback-content .content').each(function() {
  60 + $(this).addClass('hide');
  61 + });
53 62
54 - $(this).addClass('focus');  
55 - $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); 63 + $this.addClass('focus');
  64 + $('#feedback-content .content:eq(' + index + ')').removeClass('hide');
  65 + }
56 } 66 }
57 - }  
58 -}); 67 + });
  68 +}
59 69
60 if (consultFooterHammer) { 70 if (consultFooterHammer) {
61 consultFooterHammer.on('tap', function() { 71 consultFooterHammer.on('tap', function() {
62 location.href = $(consultFooterEle).find('a').attr('href'); 72 location.href = $(consultFooterEle).find('a').attr('href');
63 }); 73 });
  74 +}
  75 +
  76 +if (gotoConsultHammer) {
  77 + gotoConsultHammer.on('tap', function() {
  78 + location.href = $(gotoConsultEle).find('a').attr('href');
  79 + });
64 } 80 }
@@ -47,14 +47,15 @@ @@ -47,14 +47,15 @@
47 font-size: 50px; 47 font-size: 50px;
48 } 48 }
49 p{ 49 p{
50 - width: 55.517241%; 50 + width: 59.517241%;
51 height: auto; 51 height: auto;
52 - padding: 0 5% 18em / $pxConvertRem; 52 + margin: 0 3% 16em / $pxConvertRem;
53 float: left; 53 float: left;
54 &:first-of-type{ 54 &:first-of-type{
55 - padding-top: 0.75rem; 55 + margin-top: 0.75rem;
56 font-size: 18px; 56 font-size: 18px;
57 - height: 76rem / $pxConvertRem; 57 + height: auto;
  58 + min-height: 42px;
58 display: -webkit-box; 59 display: -webkit-box;
59 -webkit-line-clamp: 2; 60 -webkit-line-clamp: 2;
60 -webkit-box-orient: vertical; 61 -webkit-box-orient: vertical;
@@ -310,7 +310,6 @@ @@ -310,7 +310,6 @@
310 line-height: pxToRem(65px); 310 line-height: pxToRem(65px);
311 text-align: center; 311 text-align: center;
312 font-size: pxToRem(22px); 312 font-size: pxToRem(22px);
313 - color: #fff;  
314 313
315 .price-discount { 314 .price-discount {
316 span { 315 span {
@@ -53,8 +53,8 @@ @@ -53,8 +53,8 @@
53 display: block; 53 display: block;
54 position: relative; 54 position: relative;
55 i{ 55 i{
56 - width:80rem / $pxConvertRem;  
57 - height: 30rem / $pxConvertRem; 56 + width:72rem / $pxConvertRem;
  57 + height: 32rem / $pxConvertRem;
58 overflow: hidden; 58 overflow: hidden;
59 display: block; 59 display: block;
60 position: absolute; 60 position: absolute;
@@ -13,21 +13,28 @@ @@ -13,21 +13,28 @@
13 .basic-info { 13 .basic-info {
14 padding-top: 30rem / $pxConvertRem; 14 padding-top: 30rem / $pxConvertRem;
15 padding-bottom: 25rem / $pxConvertRem; 15 padding-bottom: 25rem / $pxConvertRem;
  16 + p{
  17 + width: 100%;
  18 + height: auto;
  19 + overflow: hidden;
  20 + display: block;
  21 + }
  22 + span{
  23 + float: left;
  24 + overflow: hidden;
  25 + }
16 .user-name { 26 .user-name {
17 max-width: 240rem / $pxConvertRem; 27 max-width: 240rem / $pxConvertRem;
18 text-overflow:ellipsis; 28 text-overflow:ellipsis;
19 white-space:nowrap; 29 white-space:nowrap;
20 font-size: 25rem / $pxConvertRem; 30 font-size: 25rem / $pxConvertRem;
21 margin-right: 0.5rem; 31 margin-right: 0.5rem;
22 - display: inline-block;  
23 - overflow: hidden;  
24 } 32 }
25 33
26 .vip-icon { 34 .vip-icon {
27 - display: inline-block;  
28 width: pxToRem(72px); 35 width: pxToRem(72px);
29 height: pxToRem(32px); 36 height: pxToRem(32px);
30 - vertical-align: sub; 37 + line-height: 36rem / $pxConvertRem;
31 } 38 }
32 39
33 .vip-3 { 40 .vip-3 {
1 {{#coupons}} 1 {{#coupons}}
2 -<div class="employ-main" style="background-image:url('{{coupon_pic}}')"> 2 +<div class="employ-main">
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>
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="goods-consults-page yoho-page"> 2 <div class="goods-consults-page yoho-page">
3 - <div class="goto-consult">  
4 - <i class="iconfont consult-logo">&#xe639;</i>  
5 - <span>我要咨询</span>  
6 - <a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>  
7 - </div> 3 + <div class="goto-consult" id="goto-consult">
  4 + <i class="iconfont consult-logo">&#xe639;</i>
  5 + <span>我要咨询</span>
  6 + <a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
  7 + </div>
8 {{# consults}} 8 {{# consults}}
9 <div class="goods-consults" id="goods-consults"> 9 <div class="goods-consults" id="goods-consults">
10 {{#list}} 10 {{#list}}
@@ -30,7 +30,7 @@ class HomeController extends AbstractAction @@ -30,7 +30,7 @@ class HomeController extends AbstractAction
30 { 30 {
31 $uid = $this->getUid($useSession); 31 $uid = $this->getUid($useSession);
32 if (!$uid) { 32 if (!$uid) {
33 - $this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')))); 33 + $this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
34 } 34 }
35 } 35 }
36 36
@@ -785,7 +785,7 @@ class HomeController extends AbstractAction @@ -785,7 +785,7 @@ class HomeController extends AbstractAction
785 if (empty($orderCode)) { 785 if (empty($orderCode)) {
786 $this->error(); 786 $this->error();
787 } 787 }
788 - 788 +
789 $this->_view->display('pay', array( 789 $this->_view->display('pay', array(
790 'payCenterPage' => true, 790 'payCenterPage' => true,
791 'payAppInfo' => array( 791 'payAppInfo' => array(
@@ -807,6 +807,7 @@ class HomeController extends AbstractAction @@ -807,6 +807,7 @@ class HomeController extends AbstractAction
807 ), 807 ),
808 ), 808 ),
809 'orderCode' => $orderCode, 809 'orderCode' => $orderCode,
  810 + 'hasWxShare' => strpos($this->_request->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false
810 )); 811 ));
811 } 812 }
812 813
@@ -51,7 +51,7 @@ class PlusstarModel @@ -51,7 +51,7 @@ class PlusstarModel
51 } 51 }
52 52
53 $result = array(); 53 $result = array();
54 - $brandList = PlusstarData::firstBrandList($gender, $channel); 54 + $brandList = PlusstarData::firstBrandList($gender, $channel);
55 if (!empty($brandList['recom']['data']['list'][0]['data'])) { 55 if (!empty($brandList['recom']['data']['list'][0]['data'])) {
56 $result['ps']['star'] = self::formatData($brandList['recom']['data']['list'][0]['data'], $gender, true); 56 $result['ps']['star'] = self::formatData($brandList['recom']['data']['list'][0]['data'], $gender, true);
57 //$result['ps']['sName'] = isset($brandList['recom']['data']['brand_type_name']) ? $brandList['recom']['data']['brand_type_name'] : ''; 57 //$result['ps']['sName'] = isset($brandList['recom']['data']['brand_type_name']) ? $brandList['recom']['data']['brand_type_name'] : '';
@@ -107,7 +107,7 @@ class PlusstarModel @@ -107,7 +107,7 @@ class PlusstarModel
107 } 107 }
108 108
109 $result = array(); 109 $result = array();
110 - $brandList = PlusstarData::brandList($gender, $channel); 110 + $brandList = PlusstarData::brandList($gender, $channel);
111 if (!empty($brandList['star']['data']['list'][0]['data'])) { 111 if (!empty($brandList['star']['data']['list'][0]['data'])) {
112 $result['ps']['star'] = self::formatData($brandList['star']['data']['list'][0]['data'], $gender, false); 112 $result['ps']['star'] = self::formatData($brandList['star']['data']['list'][0]['data'], $gender, false);
113 //$result['ps']['pName'] = isset($brandList['star']['data']['brand_type_name']) ? $brandList['star']['data']['brand_type_name'] : ''; 113 //$result['ps']['pName'] = isset($brandList['star']['data']['brand_type_name']) ? $brandList['star']['data']['brand_type_name'] : '';
@@ -251,7 +251,7 @@ class UserModel @@ -251,7 +251,7 @@ class UserModel
251 $product['link'] = isset($one['goods'][0]) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : ''; 251 $product['link'] = isset($one['goods'][0]) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
252 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : ''; 252 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
253 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0; 253 $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
254 - $product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0; 254 + $product['discount'] = ($one['market_price'] > $one['sales_price']) ? '¥' . $one['sales_price'] : false;
255 255
256 $brand['productList'][] = $product; 256 $brand['productList'][] = $product;
257 } 257 }
@@ -23,16 +23,16 @@ class NewsaleModel @@ -23,16 +23,16 @@ class NewsaleModel
23 /* 男生频道取新品到着及折扣专区数据的位置码 */ 23 /* 男生频道取新品到着及折扣专区数据的位置码 */
24 24
25 const CODE_TOP_NEW_BOYS = '3cf2c1be5217fbab6009ce83959e1e12'; 25 const CODE_TOP_NEW_BOYS = '3cf2c1be5217fbab6009ce83959e1e12';
26 - const CODE_TOP_SALE_BOYS = 'e9c9be32d72e2906d404a72ee24cb523'; 26 + const CODE_TOP_SALE_BOYS = '153180b9a88c0b565848850c523bb637';
27 /* 女生频道取新品到着及折扣专区数据的位置码 */ 27 /* 女生频道取新品到着及折扣专区数据的位置码 */
28 const CODE_TOP_NEW_GIRLS = '1cf7f9f10e2a2670e73d05c568793ad9'; 28 const CODE_TOP_NEW_GIRLS = '1cf7f9f10e2a2670e73d05c568793ad9';
29 - const CODE_TOP_SALE_GIRLS = '785c0e6aab746949073c4ffb9d5106ac'; 29 + const CODE_TOP_SALE_GIRLS = '0b2d133419a0f7c381306fd3522365e1';
30 /* 潮童频道取新品到着及折扣专区数据的位置码 */ 30 /* 潮童频道取新品到着及折扣专区数据的位置码 */
31 const CODE_TOP_NEW_KIDS = '57457adececa6c748b29c90cad0ae940'; 31 const CODE_TOP_NEW_KIDS = '57457adececa6c748b29c90cad0ae940';
32 - const CODE_TOP_SALE_KIDS = 'ad1bb67a6007819c86f737d74172fd2e'; 32 + const CODE_TOP_SALE_KIDS = 'de23648d28ee1e8a3f087a9dbac506f8';
33 /* 创意生活频道取新品到着及折扣专区数据的位置码 */ 33 /* 创意生活频道取新品到着及折扣专区数据的位置码 */
34 const CODE_TOP_NEW_LIFESTYLE = '04953a61cbf1db426a681e55d496d2fe'; 34 const CODE_TOP_NEW_LIFESTYLE = '04953a61cbf1db426a681e55d496d2fe';
35 - const CODE_TOP_SALE_LIFESTYLE = '8132c7db3adbeb7b0d0002de9691c753'; 35 + const CODE_TOP_SALE_LIFESTYLE = '01269e498ff5b07756e0733ec0e88c75';
36 36
37 /** 37 /**
38 * 获取新品到着的焦点图资源数据 38 * 获取新品到着的焦点图资源数据