Authored by biao

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

@@ -109,18 +109,13 @@ $page.on('touchstart', '.del-icon', function() { @@ -109,18 +109,13 @@ $page.on('touchstart', '.del-icon', function() {
109 if (data.code === 200) { 109 if (data.code === 200) {
110 dialog.showDialog({ 110 dialog.showDialog({
111 dialogText: '删除浏览记录成功', 111 dialogText: '删除浏览记录成功',
112 - autoHide: true, 112 + autoHide: 2000,
113 fast: true 113 fast: true
114 }); 114 });
115 setTimeout(function() { 115 setTimeout(function() {
116 window.history.go(0); 116 window.history.go(0);
117 }, 1200); 117 }, 1200);
118 } 118 }
119 - },  
120 - complete: function() {  
121 - setTimeout(function() {  
122 - dialog.hideDialog();  
123 - }, 1500);  
124 } 119 }
125 }); 120 });
126 }); 121 });
@@ -37,6 +37,7 @@ exports.showDialog = function(data, callback) { @@ -37,6 +37,7 @@ exports.showDialog = function(data, callback) {
37 37
38 var dialogStr = dialogTemplate(data), 38 var dialogStr = dialogTemplate(data),
39 $dialogBox, 39 $dialogBox,
  40 + defaultHideDuraton,
40 dialogWrapperHammer; 41 dialogWrapperHammer;
41 42
42 $('.dialog-wrapper').remove(); 43 $('.dialog-wrapper').remove();
@@ -63,9 +64,13 @@ exports.showDialog = function(data, callback) { @@ -63,9 +64,13 @@ exports.showDialog = function(data, callback) {
63 64
64 //隐藏 65 //隐藏
65 if (data.autoHide) { 66 if (data.autoHide) {
  67 + defaultHideDuraton = 1000;
  68 + if (data.autoHide > 1) {
  69 + defaultHideDuraton = data.autoHide;
  70 + }
66 setTimeout(function() { 71 setTimeout(function() {
67 $dialogWrapper.fadeOut(); 72 $dialogWrapper.fadeOut();
68 - }, 1000); 73 + }, defaultHideDuraton);
69 } 74 }
70 75
71 dialogWrapperHammer.on('tap', function(event) { 76 dialogWrapperHammer.on('tap', function(event) {
@@ -76,9 +81,5 @@ exports.showDialog = function(data, callback) { @@ -76,9 +81,5 @@ exports.showDialog = function(data, callback) {
76 callback(); 81 callback();
77 } 82 }
78 }); 83 });
79 -  
80 }; 84 };
81 85
82 -exports.hideDialog = function() {  
83 - $dialogWrapper.fadeOut();  
84 -};