Authored by Lynnic

修改商品图片微信内置浏览器显示bug

@@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) { @@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
38 } 38 }
39 39
40 //goods-discount下拉按钮点击事件 40 //goods-discount下拉按钮点击事件
41 -$('.goodsDiscount .dropdown').on('click', function() { 41 +$('.goodsDiscount .dropdown').on('touchend', function() {
42 if ($discountFolder.is(':hidden')) { 42 if ($discountFolder.is(':hidden')) {
43 $discountArrow.removeClass('icon-down').addClass('icon-up').html(''); 43 $discountArrow.removeClass('icon-down').addClass('icon-up').html('');
44 $discountFolder.slideDown(); 44 $discountFolder.slideDown();
@@ -3,100 +3,101 @@ @@ -3,100 +3,101 @@
3 * @author: Lynnic 3 * @author: Lynnic
4 * @date: 2015/11/25 4 * @date: 2015/11/25
5 */ 5 */
6 -var $ = require('jquery'),  
7 - loading = require('../../plugin/loading'),  
8 - tip = require('../../plugin/tip');  
9 -  
10 -var loadMoreUrl = $('#loadMoreUrl').val(),  
11 - $commentsDiv = $('#goods-comments'),  
12 - $consultsDiv = $('#goods-consults'),  
13 - winH = $(window).height(),  
14 - searching = false,  
15 - end = false;  
16 -  
17 -var jsonObj;  
18 -  
19 -//插入评论列表底部  
20 -function insertCommentsDiv(json) {  
21 - var html = '';  
22 - var i;  
23 -  
24 -  
25 - for (i = 0; i < json.length; i++) {  
26 - html += '<div class="comment-item">';  
27 - html += '<span class="user-name">' + json[i].userName + '</span>';  
28 - html += '<span class="goods-spec">' + json[i].desc + '</span>';  
29 - html += '<span class="goods-spec">' + json[i].content + '</span>';  
30 - html += '<span class="goods-spec">' + json[i].time + '</span>';  
31 - }  
32 - $commentsDiv.append(html);  
33 -}  
34 -  
35 -//插入咨询列表底部  
36 -function insertConsultsDiv(json) {  
37 - var html = '';  
38 - var i;  
39 -  
40 -  
41 - for (i = 0; i < json.length; i++) {  
42 - html += '<div class="consult-item"> ';  
43 - html += '<div class="question"> ';  
44 - html += '<span class="iconfont">&#xe639;</span> ';  
45 - html += '<p> ';  
46 - html += json[i].question + '<br> ';  
47 - html += '<span class="time">' + json[i].time + '</span> ';  
48 - html += '</p> ';  
49 - html += '</div> ';  
50 -  
51 - html += '<div class="answer"> ';  
52 - html += '<span class="iconfont">&#xe63c;</span> ';  
53 - html += '<p>' + json[i].answer + '</p> ';  
54 - html += '</div> ';  
55 - html += '</div> ';  
56 - }  
57 - $consultsDiv.append(html);  
58 -}  
59 -  
60 -function search() {  
61 - if (searching || end) {  
62 - return;  
63 - }  
64 - searching = true;  
65 -  
66 - loading.showLoadingMask();  
67 -  
68 - $.ajax({  
69 - type: 'GET',  
70 - url: loadMoreUrl,  
71 - success: function(data) {  
72 - if (data.length > 0) {  
73 - jsonObj = JSON.parse(data);  
74 - if ($commentsDiv.length > 0) {  
75 - insertCommentsDiv(jsonObj);  
76 - } else if ($consultsDiv.length > 0) {  
77 - insertConsultsDiv(jsonObj);  
78 - }  
79 - }  
80 - searching = false;  
81 - end = true;  
82 - loading.hideLoadingMask();  
83 - },  
84 - error: function() {  
85 - tip.show('网络断开连接了~');  
86 - searching = false;  
87 - loading.hideLoadingMask();  
88 - }  
89 - });  
90 -}  
91 -  
92 -  
93 -function scrollHandler() {  
94 - if (!end || $(window).scrollTop() + winH >= $(document).height() - 50) {  
95 - search();  
96 - }  
97 -}  
98 -  
99 -//srcoll to load more  
100 -$(window).scroll(function() {  
101 - window.requestAnimationFrame(scrollHandler);  
102 -});  
  6 +
  7 +// var $ = require('jquery'),
  8 +// loading = require('../../plugin/loading'),
  9 +// tip = require('../../plugin/tip');
  10 +
  11 +// var loadMoreUrl = $('#loadMoreUrl').val(),
  12 +// $commentsDiv = $('#goods-comments'),
  13 +// $consultsDiv = $('#goods-consults'),
  14 +// winH = $(window).height(),
  15 +// searching = false,
  16 +// end = false;
  17 +
  18 +// var jsonObj;
  19 +
  20 +// //插入评论列表底部
  21 +// function insertCommentsDiv(json) {
  22 +// var html = '';
  23 +// var i;
  24 +
  25 +
  26 +// for (i = 0; i < json.length; i++) {
  27 +// html += '<div class="comment-item">';
  28 +// html += '<span class="user-name">' + json[i].userName + '</span>';
  29 +// html += '<span class="goods-spec">' + json[i].desc + '</span>';
  30 +// html += '<span class="goods-spec">' + json[i].content + '</span>';
  31 +// html += '<span class="goods-spec">' + json[i].time + '</span>';
  32 +// }
  33 +// $commentsDiv.append(html);
  34 +// }
  35 +
  36 +// //插入咨询列表底部
  37 +// function insertConsultsDiv(json) {
  38 +// var html = '';
  39 +// var i;
  40 +
  41 +
  42 +// for (i = 0; i < json.length; i++) {
  43 +// html += '<div class="consult-item"> ';
  44 +// html += '<div class="question"> ';
  45 +// html += '<span class="iconfont">&#xe639;</span> ';
  46 +// html += '<p> ';
  47 +// html += json[i].question + '<br> ';
  48 +// html += '<span class="time">' + json[i].time + '</span> ';
  49 +// html += '</p> ';
  50 +// html += '</div> ';
  51 +
  52 +// html += '<div class="answer"> ';
  53 +// html += '<span class="iconfont">&#xe63c;</span> ';
  54 +// html += '<p>' + json[i].answer + '</p> ';
  55 +// html += '</div> ';
  56 +// html += '</div> ';
  57 +// }
  58 +// $consultsDiv.append(html);
  59 +// }
  60 +
  61 +// function search() {
  62 +// if (searching || end) {
  63 +// return;
  64 +// }
  65 +// searching = true;
  66 +
  67 +// loading.showLoadingMask();
  68 +
  69 +// $.ajax({
  70 +// type: 'GET',
  71 +// url: loadMoreUrl,
  72 +// success: function(data) {
  73 +// if (data.length > 0) {
  74 +// jsonObj = JSON.parse(data);
  75 +// if ($commentsDiv.length > 0) {
  76 +// insertCommentsDiv(jsonObj);
  77 +// } else if ($consultsDiv.length > 0) {
  78 +// insertConsultsDiv(jsonObj);
  79 +// }
  80 +// }
  81 +// searching = false;
  82 +// end = true;
  83 +// loading.hideLoadingMask();
  84 +// },
  85 +// error: function() {
  86 +// tip.show('网络断开连接了~');
  87 +// searching = false;
  88 +// loading.hideLoadingMask();
  89 +// }
  90 +// });
  91 +// }
  92 +
  93 +
  94 +// function scrollHandler() {
  95 +// if (!end || $(window).scrollTop() + winH >= $(document).height() - 50) {
  96 +// search();
  97 +// }
  98 +// }
  99 +
  100 +// //srcoll to load more
  101 +// $(window).scroll(function() {
  102 +// window.requestAnimationFrame(scrollHandler);
  103 +// });
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
44 padding: 0 pxToRem(28px); 44 padding: 0 pxToRem(28px);
45 height: pxToRem(120px); 45 height: pxToRem(120px);
46 background-color: #ffffff; 46 background-color: #ffffff;
  47 + border-bottom: 1px solid $borderC;
47 i, 48 i,
48 span, 49 span,
49 a { 50 a {
@@ -64,6 +65,8 @@ @@ -64,6 +65,8 @@
64 margin-top: pxToRem(30px); 65 margin-top: pxToRem(30px);
65 padding: pxToRem(20px) pxToRem(28px); 66 padding: pxToRem(20px) pxToRem(28px);
66 background-color: #fff; 67 background-color: #fff;
  68 + border-bottom: 1px solid $borderC;
  69 + border-top: 1px solid $borderC;
67 .question { 70 .question {
68 font-size: pxToRem(24px); 71 font-size: pxToRem(24px);
69 color: $mainFontC; 72 color: $mainFontC;
@@ -169,7 +169,7 @@ $basicBtnC:#eb0313; @@ -169,7 +169,7 @@ $basicBtnC:#eb0313;
169 overflow: hidden; 169 overflow: hidden;
170 ul { 170 ul {
171 position: relative; 171 position: relative;
172 - height: 100%; 172 + height: auto;
173 li { 173 li {
174 float: left; 174 float: left;
175 } 175 }
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div class="goto-consult"> 3 <div class="goto-consult">
4 <i class="iconfont consult-logo">&#xe639;</i> 4 <i class="iconfont consult-logo">&#xe639;</i>
5 <span>我要咨询</span> 5 <span>我要咨询</span>
6 - <a href="{{consultUrl}}" class="iconfont enter-consult-page">&#xe604;</a> 6 + <a href="/product/detail/consultform" class="iconfont enter-consult-page">&#xe604;</a>
7 </div> 7 </div>
8 {{# consults}} 8 {{# consults}}
9 <div class="goods-consults" id="goods-consults"> 9 <div class="goods-consults" id="goods-consults">
@@ -26,9 +26,9 @@ @@ -26,9 +26,9 @@
26 <span class="iconfont">&#xe63c;</span>暂无评论 26 <span class="iconfont">&#xe63c;</span>暂无评论
27 </div> 27 </div>
28 {{/if}} 28 {{/if}}
29 - <div class="comment-content-footer"> 29 + <!-- <div class="comment-content-footer">
30 <a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a> 30 <a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
31 - </div> 31 + </div> -->
32 </div> 32 </div>
33 33
34 <div class="consult-content content hide "> 34 <div class="consult-content content hide ">
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 {{/ consults}} 50 {{/ consults}}
51 </div> 51 </div>
52 <div class="consult-content-footer"> 52 <div class="consult-content-footer">
53 - <a href="{{link}}"> 53 + <a href="/product/detail/consults">
54 查看更多 54 查看更多
55 <span class="iconfont">&#xe604;</span></a> 55 <span class="iconfont">&#xe604;</span></a>
56 </div> 56 </div>