Authored by lore-w

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

@@ -28,7 +28,6 @@ var $action = $('.action'), @@ -28,7 +28,6 @@ var $action = $('.action'),
28 28
29 // 清除返回按钮原有链接 29 // 清除返回按钮原有链接
30 $backBtn.attr('href', 'javascript:void(0);'); 30 $backBtn.attr('href', 'javascript:void(0);');
31 -  
32 window.rePosFooter(); 31 window.rePosFooter();
33 32
34 // 自定义返回按钮事件 33 // 自定义返回按钮事件
@@ -39,6 +38,7 @@ $backBtn.on('touchend', function(e) { @@ -39,6 +38,7 @@ $backBtn.on('touchend', function(e) {
39 e.preventDefault(); 38 e.preventDefault();
40 currentPage = 'address'; 39 currentPage = 'address';
41 $navTitle.html('地址管理'); 40 $navTitle.html('地址管理');
  41 + window.rePosFooter();
42 } else if (currentPage === 'list') { 42 } else if (currentPage === 'list') {
43 $pageWrap.hide(); 43 $pageWrap.hide();
44 $editAddressPage.show(); 44 $editAddressPage.show();
@@ -60,9 +60,10 @@ function editAddress(data) { @@ -60,9 +60,10 @@ function editAddress(data) {
60 $addressForm.find('[name="address"]').val(data.address || ''); 60 $addressForm.find('[name="address"]').val(data.address || '');
61 61
62 currentPage = 'edit'; 62 currentPage = 'edit';
63 - $footer.hide();  
64 $pageWrap.hide(); 63 $pageWrap.hide();
65 $editAddressPage.show(); 64 $editAddressPage.show();
  65 +
  66 + $footer.addClass('bottom');
66 } 67 }
67 68
68 $confim.on('touchend', '.cancel', function() { 69 $confim.on('touchend', '.cancel', function() {
@@ -94,30 +95,7 @@ $confim.on('touchend', '.cancel', function() { @@ -94,30 +95,7 @@ $confim.on('touchend', '.cancel', function() {
94 }); 95 });
95 }); 96 });
96 97
97 -// 添加地址  
98 -$addAddress.on('touchend', function() {  
99 - if ($addressItem.length >= 5) {  
100 - tip.show('您最多添加5个收货地址');  
101 - return false;  
102 - }  
103 - editAddress();  
104 - $navTitle.html('添加新地址');  
105 -});  
106 -  
107 -// 编辑或删除  
108 -$action.on('touchend', '.edit', function() {  
109 - editAddress($(this).data());  
110 - $navTitle.html('修改地址');  
111 -}).on('touchend', '.del', function() {  
112 - deleteId = $(this).data('id');  
113 - $confim.show();  
114 -});  
115 -  
116 -$submit.on('touchend', function() {  
117 - $addressForm.submit();  
118 - return false;  
119 -});  
120 - 98 +// 提交表单请求
121 $addressForm.on('submit', function() { 99 $addressForm.on('submit', function() {
122 if (isSubmiting) { 100 if (isSubmiting) {
123 return false; 101 return false;
@@ -126,12 +104,14 @@ $addressForm.on('submit', function() { @@ -126,12 +104,14 @@ $addressForm.on('submit', function() {
126 // 简单的表单校验 104 // 简单的表单校验
127 if (!$(this).find('[name="consignee"]').val()) { 105 if (!$(this).find('[name="consignee"]').val()) {
128 tip.show('收件人不能为空'); 106 tip.show('收件人不能为空');
129 - $(this).find('[name="consignee"]').focus(); 107 +
  108 + // $(this).find('[name="consignee"]').focus();
130 return false; 109 return false;
131 } 110 }
132 if (!$(this).find('[name="mobile"]').val()) { 111 if (!$(this).find('[name="mobile"]').val()) {
133 tip.show('手机号不能为空'); 112 tip.show('手机号不能为空');
134 - $(this).find('[name="mobile"]').focus(); 113 +
  114 + // $(this).find('[name="mobile"]').focus();
135 return false; 115 return false;
136 } 116 }
137 if (!$(this).find('[name="area_code"]').val() || !$(this).find('[name="area"]').val()) { 117 if (!$(this).find('[name="area_code"]').val() || !$(this).find('[name="area"]').val()) {
@@ -140,7 +120,8 @@ $addressForm.on('submit', function() { @@ -140,7 +120,8 @@ $addressForm.on('submit', function() {
140 } 120 }
141 if (!$(this).find('[name="address"]').val()) { 121 if (!$(this).find('[name="address"]').val()) {
142 tip.show('地址不能为空'); 122 tip.show('地址不能为空');
143 - $(this).find('[name="address"]').focus(); 123 +
  124 + // $(this).find('[name="address"]').focus();
144 return false; 125 return false;
145 } 126 }
146 127
@@ -168,6 +149,34 @@ $addressForm.on('submit', function() { @@ -168,6 +149,34 @@ $addressForm.on('submit', function() {
168 return false; 149 return false;
169 }); 150 });
170 151
  152 +// 添加地址
  153 +$addAddress.on('touchend', function() {
  154 + if ($addressItem.length >= 5) {
  155 + tip.show('您最多添加5个收货地址');
  156 + return false;
  157 + }
  158 + editAddress();
  159 + $navTitle.html('添加新地址');
  160 +});
  161 +
  162 +// 编辑或删除
  163 +$action.on('touchend', '.edit', function() {
  164 + editAddress($(this).data());
  165 + $navTitle.html('修改地址');
  166 +}).on('touchend', '.del', function() {
  167 + deleteId = $(this).data('id');
  168 + $confim.show();
  169 +});
  170 +
  171 +$submit.on('touchend', function() {
  172 + $addressForm.submit();
  173 + return false;
  174 +}).on('touchstart', function() {
  175 + $(this).addClass('highlight');
  176 +}).on('touchend touchcancel', function() {
  177 + $(this).removeClass('highlight');
  178 +});
  179 +
171 // 省市区 180 // 省市区
172 $area.on('touchend', function() { 181 $area.on('touchend', function() {
173 $footer.hide(); 182 $footer.hide();
@@ -176,10 +185,9 @@ $area.on('touchend', function() { @@ -176,10 +185,9 @@ $area.on('touchend', function() {
176 currentPage = 'list'; 185 currentPage = 'list';
177 }); 186 });
178 187
  188 +// 省市区联动
179 $addressListPage.on('touchend', '.address', function() { 189 $addressListPage.on('touchend', '.address', function() {
180 - var caption = $(this).children('.caption').text();  
181 -  
182 - newArea.push(caption); 190 + newArea.push($(this).children('.caption').text());
183 $(this).siblings().hide(); 191 $(this).siblings().hide();
184 $(this).children('ul').show(); 192 $(this).children('ul').show();
185 return false; 193 return false;
@@ -193,6 +201,7 @@ $addressListPage.on('touchend', '.address', function() { @@ -193,6 +201,7 @@ $addressListPage.on('touchend', '.address', function() {
193 $editAddressPage.show(); 201 $editAddressPage.show();
194 currentPage = 'edit'; 202 currentPage = 'edit';
195 $navTitle.html('修改地址'); 203 $navTitle.html('修改地址');
  204 + $footer.show();
196 205
197 // 恢复默认的三级选择 206 // 恢复默认的三级选择
198 $addressListPage.hide(); 207 $addressListPage.hide();
@@ -201,3 +210,17 @@ $addressListPage.on('touchend', '.address', function() { @@ -201,3 +210,17 @@ $addressListPage.on('touchend', '.address', function() {
201 newArea = []; 210 newArea = [];
202 return false; 211 return false;
203 }); 212 });
  213 +
  214 +$($editAddressPage, $addressListPage).css('min-height', function() {
  215 + return $(window).height() - $('#yoho-header').height();
  216 +});
  217 +
  218 +$pageWrap.first().css('min-height', function() {
  219 + return $(window).height() - $('#yoho-header').height() - $footer.height();
  220 +});
  221 +
  222 +$('input, textarea').on('focus', function() {
  223 + $footer.hide();
  224 +}).on('blur', function() {
  225 + $footer.show();
  226 +});
@@ -18,3 +18,10 @@ $questionTab.on('touchend', function() { @@ -18,3 +18,10 @@ $questionTab.on('touchend', function() {
18 $('.question-list').removeClass('current'); 18 $('.question-list').removeClass('current');
19 $(clickTab).addClass('current'); 19 $(clickTab).addClass('current');
20 }); 20 });
  21 +
  22 +$('.yoho-page').on('touchstart', '.connect-item, .question-item', function() {
  23 + $(this).siblings().removeClass('highlight');
  24 + $(this).addClass('highlight');
  25 +}).on('touchend touchcancel', '.connect-item, .question-item', function() {
  26 + $(this).removeClass('highlight');
  27 +});
1 .my-address-page { 1 .my-address-page {
2 width: 100%; 2 width: 100%;
3 background: #f0f0f0; 3 background: #f0f0f0;
4 - padding-bottom: pxToRem(20px); 4 +
  5 + .page-wrap:first-child {
  6 + padding-bottom: pxToRem(10px);
  7 + }
5 8
6 .address-item { 9 .address-item {
7 padding: pxToRem(20px) pxToRem(30px); 10 padding: pxToRem(20px) pxToRem(30px);
@@ -169,6 +172,10 @@ @@ -169,6 +172,10 @@
169 text-align: center; 172 text-align: center;
170 font-size: pxToRem(32px); 173 font-size: pxToRem(32px);
171 line-height: pxToRem(88px); 174 line-height: pxToRem(88px);
  175 +
  176 + &.highlight {
  177 + background: rgba(0, 0, 0, 0.6);
  178 + }
172 } 179 }
173 } 180 }
174 181
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
31 margin: 0 rem(32); 31 margin: 0 rem(32);
32 border-left: 1px solid #b0b0b0; 32 border-left: 1px solid #b0b0b0;
33 } 33 }
  34 +
34 } 35 }
35 36
36 .question-list { 37 .question-list {
@@ -43,15 +44,15 @@ @@ -43,15 +44,15 @@
43 } 44 }
44 45
45 li { 46 li {
46 - margin-left: rem(30);  
47 - width: rem(610);  
48 font-size: rem(28); 47 font-size: rem(28);
49 line-height: rem(90); 48 line-height: rem(90);
50 - border-bottom: 1px solid #ccc;  
51 49
52 a { 50 a {
53 display: block; 51 display: block;
54 color: #444; 52 color: #444;
  53 + width: rem(610);
  54 + margin-left: rem(30);
  55 + border-bottom: 1px solid #ccc;
55 } 56 }
56 57
57 .iconfont { 58 .iconfont {
@@ -64,6 +65,10 @@ @@ -64,6 +65,10 @@
64 &:last-child { 65 &:last-child {
65 border-bottom: none; 66 border-bottom: none;
66 } 67 }
  68 +
  69 + &.highlight {
  70 + background: #eee;
  71 + }
67 } 72 }
68 } 73 }
69 74
@@ -112,6 +117,9 @@ @@ -112,6 +117,9 @@
112 content: none; 117 content: none;
113 } 118 }
114 } 119 }
  120 + &.highlight {
  121 + background: #eee;
  122 + }
115 } 123 }
116 .icon { 124 .icon {
117 display: inline-block; 125 display: inline-block;
@@ -132,6 +140,7 @@ @@ -132,6 +140,7 @@
132 border-bottom: 1px solid #c8c7cc; 140 border-bottom: 1px solid #c8c7cc;
133 color: #444; 141 color: #444;
134 background: #fff; 142 background: #fff;
  143 +
135 &:last-child { 144 &:last-child {
136 margin-bottom: 0; 145 margin-bottom: 0;
137 } 146 }
@@ -146,6 +155,7 @@ @@ -146,6 +155,7 @@
146 .question { 155 .question {
147 @extend %qa; 156 @extend %qa;
148 position: relative; 157 position: relative;
  158 + color: #000;
149 &:after { 159 &:after {
150 content: ''; 160 content: '';
151 position: absolute; 161 position: absolute;
@@ -256,6 +256,13 @@ @@ -256,6 +256,13 @@
256 } 256 }
257 } 257 }
258 } 258 }
  259 +
  260 + &.no-item{
  261 + height: pxToRem(200px);
  262 + line-height: pxToRem(200px);
  263 + color: #e0e0e0;
  264 + text-align: center;
  265 + }
259 } 266 }
260 } 267 }
261 268
@@ -100,8 +100,8 @@ $basicBtnC:#eb0313; @@ -100,8 +100,8 @@ $basicBtnC:#eb0313;
100 margin-left: .5px; 100 margin-left: .5px;
101 font-size: pxToRem(23px); 101 font-size: pxToRem(23px);
102 text-align: center; 102 text-align: center;
103 - line-height: pxToRem(35px);  
104 - padding: 0 8px; 103 + line-height: pxToRem(33px);
  104 + padding: 0 5px;
105 } 105 }
106 .new-tag { 106 .new-tag {
107 background-color: #78dc7e; 107 background-color: #78dc7e;
@@ -121,6 +121,7 @@ $basicBtnC:#eb0313; @@ -121,6 +121,7 @@ $basicBtnC:#eb0313;
121 } 121 }
122 .limit-tag { 122 .limit-tag {
123 border: 1px solid #000; 123 border: 1px solid #000;
  124 + background-color: #fff;
124 color: #000; 125 color: #000;
125 } 126 }
126 .soonSoldOut-tag { 127 .soonSoldOut-tag {
@@ -219,6 +220,7 @@ $basicBtnC:#eb0313; @@ -219,6 +220,7 @@ $basicBtnC:#eb0313;
219 .periodOfMarket { 220 .periodOfMarket {
220 font-size: pxToRem(24px); 221 font-size: pxToRem(24px);
221 float: right; 222 float: right;
  223 + color: #d0021b;
222 h1 { 224 h1 {
223 display: inline-block; 225 display: inline-block;
224 line-height: pxToRem(88px); 226 line-height: pxToRem(88px);
@@ -316,7 +318,7 @@ $basicBtnC:#eb0313; @@ -316,7 +318,7 @@ $basicBtnC:#eb0313;
316 .store-logo { 318 .store-logo {
317 // padding-right: 35rem/$pxConvertRem; 319 // padding-right: 35rem/$pxConvertRem;
318 img { 320 img {
319 - width: pxToRem(109px); 321 + width: auto;
320 height: pxToRem(68px); 322 height: pxToRem(68px);
321 margin-left: 0; 323 margin-left: 0;
322 margin-right: pxToRem(-25px); 324 margin-right: pxToRem(-25px);
@@ -390,9 +392,11 @@ $basicBtnC:#eb0313; @@ -390,9 +392,11 @@ $basicBtnC:#eb0313;
390 } 392 }
391 } 393 }
392 .recommend-for-you { 394 .recommend-for-you {
393 - margin-bottom: pxToRem(120px); 395 + margin-bottom: pxToRem(30px);
394 } 396 }
395 } 397 }
396 - 398 +.bottom-blank{
  399 + height: pxToRem(120px);
  400 +}
397 @import "comments-consults"; 401 @import "comments-consults";
398 @import "product-description"; 402 @import "product-description";
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="iHelp"> 2 <div class="iHelp">
3 <div class="helpSearch"> 3 <div class="helpSearch">
4 - <input type="text"> 4 + <input type="text" placeholder="查找关键字">
5 <i class="iconfont">&#xe60f;</i> 5 <i class="iconfont">&#xe60f;</i>
6 </div> 6 </div>
7 <ul> 7 <ul>
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
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 soonSoldOut-tag">即将售罄</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>
@@ -44,12 +44,12 @@ @@ -44,12 +44,12 @@
44 </div> 44 </div>
45 {{/ goodsPrice}} 45 {{/ goodsPrice}}
46 46
47 - {{# periodOfMarket}} 47 + {{#if periodOfMarket}}
48 <div class="periodOfMarket"> 48 <div class="periodOfMarket">
49 <h1>上市期:</h1> 49 <h1>上市期:</h1>
50 - <h1 >{{.}}</h1> 50 + <h1 >{{peridOfMarket}}</h1>
51 </div> 51 </div>
52 - {{/ periodOfMarket}} 52 + {{/if}}
53 </div> 53 </div>
54 54
55 {{# vipLevel}} 55 {{# vipLevel}}
@@ -140,4 +140,5 @@ @@ -140,4 +140,5 @@
140 {{/if}} 140 {{/if}}
141 141
142 </div> 142 </div>
143 -{{> layout/footer}}  
  143 +{{> layout/footer}}
  144 +<div class="bottom-blank"></div>
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 <span class="iconfont">&#xe604;</span></a> 55 <span class="iconfont">&#xe604;</span></a>
56 </div> 56 </div>
57 {{else}} 57 {{else}}
58 - <div class="comment-content-main content-main no-item"> 58 + <div class="consult-content-main content-main no-item">
59 <span class="iconfont">&#xe63c;</span>暂无咨询 59 <span class="iconfont">&#xe63c;</span>暂无咨询
60 </div> 60 </div>
61 <div class="consult-content-footer"> 61 <div class="consult-content-footer">