Authored by hf

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

@@ -220,7 +220,7 @@ $yohoPage.on('touchstart', '.tap-hightlight', function() { @@ -220,7 +220,7 @@ $yohoPage.on('touchstart', '.tap-hightlight', function() {
220 }); 220 });
221 221
222 $('.nav-home').on('touchstart', function() { 222 $('.nav-home').on('touchstart', function() {
223 - $('.homebuttom').toggleClass('none'); 223 + $('.homebuttom').toggleClass('hide');
224 }); 224 });
225 225
226 (function() { 226 (function() {
@@ -28,9 +28,15 @@ $('.nav-btn').on('touchstart', function(event) { @@ -28,9 +28,15 @@ $('.nav-btn').on('touchstart', function(event) {
28 $mobileWrap.addClass('menu-open'); 28 $mobileWrap.addClass('menu-open');
29 $overlay.show().css('opacity', 0.3); 29 $overlay.show().css('opacity', 0.3);
30 $sideNav.addClass('on'); 30 $sideNav.addClass('on');
  31 + openSideNav = true;
31 event.preventDefault(); 32 event.preventDefault();
32 event.stopPropagation(); 33 event.stopPropagation();
33 - openSideNav = true; 34 +
  35 + //设置boy高宽,页面不能上下滑动
  36 + $('body').css({
  37 + height: $(window).height(),
  38 + overflow: 'hidden'
  39 + });
34 return false; 40 return false;
35 }); 41 });
36 42
@@ -41,6 +47,10 @@ function hideSideBar() { @@ -41,6 +47,10 @@ function hideSideBar() {
41 $('.overlay').hide(); 47 $('.overlay').hide();
42 $('.sub-nav').removeClass('show'); 48 $('.sub-nav').removeClass('show');
43 $sideNav.removeClass('on'); 49 $sideNav.removeClass('on');
  50 + $('body').css({
  51 + height: 'auto',
  52 + overflow: 'auto'
  53 + });
44 } 54 }
45 } 55 }
46 56
@@ -62,10 +72,6 @@ $sideNav.on('touchstart', 'li', function(e) { @@ -62,10 +72,6 @@ $sideNav.on('touchstart', 'li', function(e) {
62 } 72 }
63 }); 73 });
64 74
65 -$sideNav.on('touchmove', function(e) {  
66 - return false;  
67 -});  
68 -  
69 //返回一级导航,收起二级导航 75 //返回一级导航,收起二级导航
70 $subNav.each(function() { 76 $subNav.each(function() {
71 $(this).find('li').eq(0).on('touchstart', function() { 77 $(this).find('li').eq(0).on('touchstart', function() {
@@ -21,7 +21,7 @@ var appIconPosition = { @@ -21,7 +21,7 @@ var appIconPosition = {
21 bank: '-4rem' 21 bank: '-4rem'
22 }; 22 };
23 23
24 -//隐藏微信分享选项 24 +// 隐藏微信分享选项
25 if (window.wx) { 25 if (window.wx) {
26 wx.hideOptionMenu(); 26 wx.hideOptionMenu();
27 } 27 }
@@ -44,10 +44,10 @@ if (typeof WeixinJSBridge === undefined) { @@ -44,10 +44,10 @@ if (typeof WeixinJSBridge === undefined) {
44 onBridgeReady(); 44 onBridgeReady();
45 } 45 }
46 46
47 -//调用微信JS api 支付 47 +// 调用微信JS api 支付
48 function jsApiCall(orderCode, jsApiParameters) { 48 function jsApiCall(orderCode, jsApiParameters) {
49 49
50 - //防止重复操作弹框 50 + // 防止重复操作弹框
51 window.WeixinJSBridge && window.WeixinJSBridge.invoke( 51 window.WeixinJSBridge && window.WeixinJSBridge.invoke(
52 'getBrandWCPayRequest', 52 'getBrandWCPayRequest',
53 jsApiParameters, 53 jsApiParameters,
@@ -57,7 +57,7 @@ function jsApiCall(orderCode, jsApiParameters) { @@ -57,7 +57,7 @@ function jsApiCall(orderCode, jsApiParameters) {
57 ); 57 );
58 } 58 }
59 59
60 -//微信支付 60 +// 微信支付
61 function callpay(orderCode) { 61 function callpay(orderCode) {
62 var jsApiParameters; 62 var jsApiParameters;
63 63
@@ -92,11 +92,7 @@ function callpay(orderCode) { @@ -92,11 +92,7 @@ function callpay(orderCode) {
92 function isWXOpen() { 92 function isWXOpen() {
93 var ua = window.navigator.userAgent.toLowerCase(); 93 var ua = window.navigator.userAgent.toLowerCase();
94 94
95 - if (ua.indexOf('micromessenger') > 0) {  
96 - return true;  
97 - } else {  
98 - return false;  
99 - } 95 + return ua.indexOf('micromessenger') > 0;
100 } 96 }
101 97
102 function hideWeChatPay() { 98 function hideWeChatPay() {
@@ -138,9 +134,7 @@ function loadIcon() { @@ -138,9 +134,7 @@ function loadIcon() {
138 } 134 }
139 135
140 function showPage() { 136 function showPage() {
141 - var $pageList = $('.payapp-list');  
142 -  
143 - $pageList.css('visibility', 'visible'); 137 + $('.payapp-list').css('visibility', 'visible');
144 } 138 }
145 139
146 if (wxHammer) { 140 if (wxHammer) {
@@ -9,7 +9,7 @@ var $ = require('jquery'); @@ -9,7 +9,7 @@ var $ = require('jquery');
9 var $resend = $('#resend'); 9 var $resend = $('#resend');
10 10
11 var tip = require('../../plugin/tip'), 11 var tip = require('../../plugin/tip'),
12 - showErrTip = tip.show; 12 + showTip = tip.show;
13 13
14 $resend.on('touchstart', function(e) { 14 $resend.on('touchstart', function(e) {
15 e.preventDefault(); 15 e.preventDefault();
@@ -18,11 +18,7 @@ $resend.on('touchstart', function(e) { @@ -18,11 +18,7 @@ $resend.on('touchstart', function(e) {
18 url: $resend.data('url'), 18 url: $resend.data('url'),
19 type: 'GET', 19 type: 'GET',
20 success: function(data) { 20 success: function(data) {
21 - if (data.code === 200) {  
22 - showErrTip(data.message);  
23 - } else {  
24 - showErrTip(data.message);  
25 - } 21 + showTip(data.message);
26 } 22 }
27 }); 23 });
28 }); 24 });
@@ -21,32 +21,32 @@ var nickname = $('#nickname').val(), @@ -21,32 +21,32 @@ var nickname = $('#nickname').val(),
21 areaCode = $('#area-code').val().replace('+', ''); 21 areaCode = $('#area-code').val().replace('+', '');
22 22
23 function startBind(password) { 23 function startBind(password) {
24 - $.ajax({  
25 - url: '/passport/bind/bindMobile',  
26 - type: 'post',  
27 - data: {  
28 - areaCode: areaCode.replace('+', ''),  
29 - phoneNum: phoneNum,  
30 - openId: openId,  
31 - sourceType: sourceType,  
32 - nickname: nickname,  
33 - password: password  
34 - },  
35 - success: function(res) {  
36 - if (res.code === 200) {  
37 - tip.show('登录成功');  
38 - setTimeout(function() {  
39 - location.href = res.data.refer;  
40 - }, 2000);  
41 - } else {  
42 - tip.show(res.message);  
43 - }  
44 - },  
45 - error: function(err) {  
46 - tip.show('登录失败,请重试!'); 24 + $.ajax({
  25 + url: '/passport/bind/bindMobile',
  26 + type: 'post',
  27 + data: {
  28 + areaCode: areaCode.replace('+', ''),
  29 + phoneNum: phoneNum,
  30 + openId: openId,
  31 + sourceType: sourceType,
  32 + nickname: nickname,
  33 + password: password
  34 + },
  35 + success: function(res) {
  36 + if (res.code === 200) {
  37 + tip.show('登录成功');
  38 + setTimeout(function() {
  39 + location.href = res.data.refer;
  40 + }, 2000);
  41 + } else {
  42 + tip.show(res.message);
47 } 43 }
48 - });  
49 - } 44 + },
  45 + error: function(err) {
  46 + tip.show('登录失败,请重试!');
  47 + }
  48 + });
  49 +}
50 50
51 api.bindEyesEvt({ 51 api.bindEyesEvt({
52 status: 'open' //默认眼睛打开 52 status: 'open' //默认眼睛打开
@@ -152,18 +152,6 @@ @@ -152,18 +152,6 @@
152 } 152 }
153 } 153 }
154 154
155 - // li.new {  
156 - // margin: (19rem / $pxConvertRem) 0 0;  
157 - // border-top: 1px solid #e0e0e0;  
158 - //  
159 - // a {}  
160 - //  
161 - // i {  
162 - // background: image-url("side-nav/new.png") no-repeat left center;  
163 - // background-size: 100% 100%;  
164 - // }  
165 - // }  
166 -  
167 li.guang, li.trendfinder { 155 li.guang, li.trendfinder {
168 .nav-icon { 156 .nav-icon {
169 background: image-url("side-nav/guang.png") no-repeat left center; 157 background: image-url("side-nav/guang.png") no-repeat left center;
@@ -208,15 +196,6 @@ @@ -208,15 +196,6 @@
208 z-index: 2; 196 z-index: 2;
209 } 197 }
210 198
211 - /* img{  
212 - position: absolute;  
213 - max-width: 50rem / $pxConvertRem;  
214 - max-height: 50rem / $pxConvertRem;  
215 - left: 32rem / $pxConvertRem;  
216 - top: 50%;  
217 - margin-top: -25rem / $pxConvertRem;  
218 - border: none;  
219 - } */  
220 .nav-point { 199 .nav-point {
221 position: absolute; 200 position: absolute;
222 left: 0rem / $pxConvertRem; 201 left: 0rem / $pxConvertRem;
@@ -122,12 +122,13 @@ @@ -122,12 +122,13 @@
122 } 122 }
123 123
124 .homebuttom{ 124 .homebuttom{
125 - display: block;  
126 width: 100%; 125 width: 100%;
127 height: 90rem / $pxConvertRem; 126 height: 90rem / $pxConvertRem;
128 overflow: hidden; 127 overflow: hidden;
129 border-top: 1px solid rgba(255,255,255,0.5); 128 border-top: 1px solid rgba(255,255,255,0.5);
130 color: #fff; 129 color: #fff;
  130 + z-index: 2;
  131 + position: relative;
131 132
132 &.boys { 133 &.boys {
133 @include background-image(linear-gradient(#323232, #414141)); 134 @include background-image(linear-gradient(#323232, #414141));
@@ -169,10 +170,9 @@ @@ -169,10 +170,9 @@
169 overflow: hidden; 170 overflow: hidden;
170 display: block; 171 display: block;
171 line-height: 40rem / $pxConvertRem; 172 line-height: 40rem / $pxConvertRem;
  173 + color: #fff;
172 } 174 }
173 } 175 }
174 } 176 }
175 } 177 }
176 -.none{  
177 - display: none;  
178 -} 178 +
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 {{/navTitle}} 20 {{/navTitle}}
21 </header> 21 </header>
22 {{#navBtn}} 22 {{#navBtn}}
23 -<div class="homebuttom none {{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"> 23 +<div class="homebuttom hide {{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
24 <ul> 24 <ul>
25 <li> 25 <li>
26 <a href="{{ indexUrl }}"> 26 <a href="{{ indexUrl }}">
@@ -359,13 +359,19 @@ class UserModel @@ -359,13 +359,19 @@ class UserModel
359 { 359 {
360 $result = array('code' => 400, 'message' => '出错啦~'); 360 $result = array('code' => 400, 'message' => '出错啦~');
361 361
362 - $record = UserData::delRecord($uid, $skn); 362 + do {
  363 + if (empty($skn)) {
  364 + break;
  365 + }
363 366
364 - // 处理数据  
365 - if ($record && isset($record['code'])) {  
366 - $result['code'] = $record['code'];  
367 - $result['message'] = $record['message'];  
368 - } 367 + $record = UserData::delRecord($uid, $skn);
  368 +
  369 + // 处理数据
  370 + if ($record && isset($record['code'])) {
  371 + $result['code'] = $record['code'];
  372 + $result['message'] = $record['message'];
  373 + }
  374 + } while (false);
369 375
370 return $result; 376 return $result;
371 } 377 }
@@ -56,7 +56,7 @@ class BrandController extends AbstractAction @@ -56,7 +56,7 @@ class BrandController extends AbstractAction
56 public function searchAction() 56 public function searchAction()
57 { 57 {
58 $this->setTitle('品牌一览'); 58 $this->setTitle('品牌一览');
59 - $this->setNavHeader('品牌一览'); 59 + $this->setNavHeader('品牌一览', true, false);
60 60
61 $channel = Helpers::getChannelByCookie(); 61 $channel = Helpers::getChannelByCookie();
62 62