Authored by hf

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

@@ -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 });
@@ -10,7 +10,10 @@ var $ = require('jquery'), @@ -10,7 +10,10 @@ 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);
14 17
15 18
16 (function() { 19 (function() {
@@ -36,26 +39,29 @@ var consultFooterEle = document.getElementById('consult-content-footer'), @@ -36,26 +39,29 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
36 39
37 })(); 40 })();
38 41
39 -$('#nav-tab li').on('touchend', function() {  
40 - var index = $(this).index(); 42 +if (navtabHammer) {
  43 + navtabHammer.on('tap', function(e) {
  44 + var $this = $(e.target).closest('li');
  45 + var index = $this.index();
41 46
42 - if ($(this).hasClass('comment-nav') && 0 === commentsNum) {  
43 - tip.show('暂无商品评价');  
44 - } else {  
45 - if (!$(this).hasClass('focus')) { 47 + if ($this.hasClass('comment-nav') && 0 === commentsNum) {
  48 + tip.show('暂无商品评价');
  49 + } else {
  50 + if (!$this.hasClass('focus')) {
46 51
47 - $('#nav-tab li').each(function() {  
48 - $(this).removeClass('focus');  
49 - });  
50 - $('#feedback-content .content').each(function() {  
51 - $(this).addClass('hide');  
52 - }); 52 + $('#nav-tab li').each(function() {
  53 + $this.removeClass('focus');
  54 + });
  55 + $('#feedback-content .content').each(function() {
  56 + $this.addClass('hide');
  57 + });
53 58
54 - $(this).addClass('focus');  
55 - $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); 59 + $this.addClass('focus');
  60 + $('#feedback-content .content:eq(' + index + ')').removeClass('hide');
  61 + }
56 } 62 }
57 - }  
58 -}); 63 + });
  64 +}
59 65
60 if (consultFooterHammer) { 66 if (consultFooterHammer) {
61 consultFooterHammer.on('tap', function() { 67 consultFooterHammer.on('tap', function() {
@@ -9,23 +9,30 @@ @@ -9,23 +9,30 @@
9 border: 1px solid #eee; 9 border: 1px solid #eee;
10 border-radius: 10rem / $pxConvertRem; 10 border-radius: 10rem / $pxConvertRem;
11 padding: (12rem / $pxConvertRem) (20rem / $pxConvertRem); 11 padding: (12rem / $pxConvertRem) (20rem / $pxConvertRem);
12 - display: flex;  
13 - align-items: center;  
14 margin-bottom: 20rem / $pxConvertRem; 12 margin-bottom: 20rem / $pxConvertRem;
15 13
  14 + @include flexbox((display: box, box-align: center), $version: 1);
  15 +
  16 + @include flexbox((display: flex, align-items: center));
  17 +
16 > div { 18 > div {
17 min-height: 40rem / $pxConvertRem; 19 min-height: 40rem / $pxConvertRem;
18 - display: flex;  
19 - align-items: center; 20 +
  21 + @include flexbox((box-flex: 1, display: box, bax-align: center), $version: 1);
  22 +
  23 + @include flexbox((display: flex, align-items: center));
20 } 24 }
21 25
22 .icon { 26 .icon {
23 width: 15%; 27 width: 15%;
24 28
  29 + @include flexbox((flex-basis: 15%));
  30 +
25 img { 31 img {
26 width: 60rem / $pxConvertRem; 32 width: 60rem / $pxConvertRem;
27 margin: 0; 33 margin: 0;
28 } 34 }
  35 +
29 > div { 36 > div {
30 width: 60rem / $pxConvertRem; 37 width: 60rem / $pxConvertRem;
31 height: 60rem / $pxConvertRem; 38 height: 60rem / $pxConvertRem;
@@ -39,19 +46,29 @@ @@ -39,19 +46,29 @@
39 46
40 .app { 47 .app {
41 width: 40%; 48 width: 40%;
  49 +
  50 + @include flexbox((flex-basis: 40%));
  51 +
42 font-size: 32rem / $pxConvertRem; 52 font-size: 32rem / $pxConvertRem;
43 color: #414141; 53 color: #414141;
44 } 54 }
45 55
46 .hint { 56 .hint {
47 width: 40%; 57 width: 40%;
  58 +
  59 + @include flexbox((flex-basis: 40%));
  60 +
48 font-size: 24rem / $pxConvertRem; 61 font-size: 24rem / $pxConvertRem;
49 color: #4b4b4b; 62 color: #4b4b4b;
50 } 63 }
51 64
52 .iconfont { 65 .iconfont {
53 width: 5%; 66 width: 5%;
54 - justify-content: flex-end; 67 +
  68 + @include flexbox((box-pack: end), $version: 1);
  69 +
  70 + @include flexbox((flex-basis: 5%, justify-content: flex-end));
  71 +
55 color: #e0e0e0; 72 color: #e0e0e0;
56 font-size: 28rem / $pxConvertRem; 73 font-size: 28rem / $pxConvertRem;
57 } 74 }
@@ -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 {
@@ -33,6 +33,11 @@ $basicBtnC:#eb0313; @@ -33,6 +33,11 @@ $basicBtnC:#eb0313;
33 line-height: pxToRem(36px); 33 line-height: pxToRem(36px);
34 &.table { 34 &.table {
35 @include flexbox(( 35 @include flexbox((
  36 + display: box,
  37 + box-lines: multiple,
  38 + box-pack: start
  39 + ), $version: 1);
  40 + @include flexbox((
36 display: flex, 41 display: flex,
37 flex-wrap: wrap, 42 flex-wrap: wrap,
38 justify-content: flex-start 43 justify-content: flex-start
@@ -42,11 +47,17 @@ $basicBtnC:#eb0313; @@ -42,11 +47,17 @@ $basicBtnC:#eb0313;
42 box-sizing: border-box; 47 box-sizing: border-box;
43 //padding: pxToRem(20px) pxToRem(12px); 48 //padding: pxToRem(20px) pxToRem(12px);
44 padding: 4% 3%; 49 padding: 4% 3%;
45 - //width: 50%; 50 + width: 49.9%;
46 border-bottom: pxToRem(4px) solid #fff; 51 border-bottom: pxToRem(4px) solid #fff;
47 border-right: pxToRem(4px) solid #fff; 52 border-right: pxToRem(4px) solid #fff;
48 font-size: pxToRem(24px); 53 font-size: pxToRem(24px);
49 background-color: $tableCellC; 54 background-color: $tableCellC;
  55 + word-wrap: break-word;
  56 + @include flexbox((
  57 + box-flex: 1.0,
  58 + display: box,
  59 + box-align: center
  60 + ), $version: 1);
50 @include flexbox(( 61 @include flexbox((
51 display: flex, 62 display: flex,
52 align-items: center, 63 align-items: center,
@@ -2,12 +2,7 @@ @@ -2,12 +2,7 @@
2 .goods-desc { 2 .goods-desc {
3 padding-bottom: pxToRem(20px); 3 padding-bottom: pxToRem(20px);
4 padding-top: pxToRem(20px); 4 padding-top: pxToRem(20px);
5 - &.page-block{  
6 - .table{  
7 - display: flex;  
8 - flex-wrap: wrap;  
9 - }  
10 - } 5 +
11 .service { 6 .service {
12 width: pxToRem(494px); 7 width: pxToRem(494px);
13 height: pxToRem(28px); 8 height: pxToRem(28px);
@@ -48,6 +43,10 @@ @@ -48,6 +43,10 @@
48 .material-item{ 43 .material-item{
49 margin: pxToRem(10px) 0; 44 margin: pxToRem(10px) 0;
50 @include flexbox(( 45 @include flexbox((
  46 + display: box,
  47 + box-align: center
  48 + ), $version: 1);
  49 + @include flexbox((
51 display: flex, 50 display: flex,
52 align-items: center 51 align-items: center
53 )); 52 ));
@@ -56,6 +55,12 @@ @@ -56,6 +55,12 @@
56 margin: 0; 55 margin: 0;
57 } 56 }
58 .material-image { 57 .material-image {
  58 + width: 23%;
  59 + @include flexbox((
  60 + box-flex: 1.0,
  61 + display: box,
  62 + box-pack: center
  63 + ), $version: 1);
59 @include flexbox(( 64 @include flexbox((
60 display: flex, 65 display: flex,
61 flex-basis: 23%, 66 flex-basis: 23%,
@@ -70,6 +75,12 @@ @@ -70,6 +75,12 @@
70 height: auto; 75 height: auto;
71 line-height: pxToRem(38px); 76 line-height: pxToRem(38px);
72 color: #4b4b4b; 77 color: #4b4b4b;
  78 + word-wrap: break-word;
  79 + width: 76.9;
  80 + @include flexbox((
  81 + box-flex: 1.0,
  82 + display: box
  83 + ), $version: 1);
73 @include flexbox(( 84 @include flexbox((
74 display: flex, 85 display: flex,
75 flex-basis: 76.9% 86 flex-basis: 76.9%