Authored by whb

loading

@@ -300,9 +300,16 @@ define('mobile', function(require, exports) { @@ -300,9 +300,16 @@ define('mobile', function(require, exports) {
300 if ($(window).scrollTop() >= $(document).height() - $(window).height() - 50) { 300 if ($(window).scrollTop() >= $(document).height() - $(window).height() - 50) {
301 if (total > limit && times < total_times && page <= totalPage) { 301 if (total > limit && times < total_times && page <= totalPage) {
302 $.ajax({ 302 $.ajax({
  303 + beforeSend:function() {
  304 + if($(".loading").size() == 0)
  305 + {
  306 + $(".main-layout").append('<div class="loading"><img src="'+ YohoConfig.resUrl + '/images/yohood/loading.gif'+'" /></div>');
  307 + }
  308 + },
303 type: "get", 309 type: "get",
304 url: url + "/page/" + (parseInt(ajaxPage) + 1), 310 url: url + "/page/" + (parseInt(ajaxPage) + 1),
305 success: function(data) { 311 success: function(data) {
  312 + $(".loading").remove();
306 var news_page = $(data); 313 var news_page = $(data);
307 if ($(".main-layout").attr("page") != news_page.attr("page") && news_page.html() != "") { 314 if ($(".main-layout").attr("page") != news_page.attr("page") && news_page.html() != "") {
308 $(".main-layout").append(news_page.html()); 315 $(".main-layout").append(news_page.html());