XMTT 7 years ago
parent
commit
8365ff709b
1 changed files with 17 additions and 17 deletions
  1. 17 17
      js/discover.js

+ 17 - 17
js/discover.js

73
                linkNum = $(this).index(".table-tab-slide");
73
                linkNum = $(this).index(".table-tab-slide");
74
                $(".haveData").find("ul").each(function () {
74
                $(".haveData").find("ul").each(function () {
75
                    $(this).html("");
75
                    $(this).html("");
76
                    $(this).parent().find(".continue").unbind("click");
77
                    $(this).parent().find(".continue").show();
76
                    $(this).parent().find("button").unbind("click");
77
                    $(this).parent().find("button").show();
78
                });
78
                });
79
                $("#table-item-"+linkNum).html("");
79
                $("#table-item-"+linkNum).html("");
80
                dataColNum=$(this).attr('data-col');
80
                dataColNum=$(this).attr('data-col');
175
			},
175
			},
176
			"beforeSend": function() {
176
			"beforeSend": function() {
177
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
177
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
178
                $("#table-item-"+index).parent().find(".continue").css("pointer-events", "none");
178
                $("#table-item-"+index).parent().find("button").attr("disabled",true);
179
			},
179
			},
180
			"complete":function () {
180
			"complete":function () {
181
                $("#table-item-"+index).parent().find(".continue").css("pointer-events", "");
181
                $("#table-item-"+index).parent().find("button").removeAttr("disabled");
182
            },
182
            },
183
			"success" : function(data) {
183
			"success" : function(data) {
184
				if (data.success){
184
				if (data.success){
203
					}
203
					}
204
					//分页
204
					//分页
205
					if(isbind==true){
205
					if(isbind==true){
206
                        $("#table-item-" + idItem).parent().find(".continue").on("click", function () {
206
                        $("#table-item-" + idItem).parent().find("button").on("click", function () {
207
                            listShow(obj, ++pageNo, colNum, false, idItem);
207
                            listShow(obj, ++pageNo, colNum, false, idItem);
208
                        });
208
                        });
209
					}
209
					}
210
                    if (pageNo >= Math.ceil(data.data.total / 10)) {
210
                    if (pageNo >= Math.ceil(data.data.total / 10)) {
211
                        $("#table-item-" + idItem).parent().find(".continue").unbind("click");
212
                        $("#table-item-" + idItem).parent().find(".continue").hide();
211
                        $("#table-item-" + idItem).parent().find("button").unbind("click");
212
                        $("#table-item-" + idItem).parent().find("button").hide();
213
					}
213
					}
214
					$(".loading").remove();
214
					$(".loading").remove();
215
				}
215
				}
234
            },
234
            },
235
            "beforeSend": function() {
235
            "beforeSend": function() {
236
                // $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
236
                // $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
237
                $("#table-item-0").parent().find(".continue").css("pointer-events", "none");
237
                $("#table-item-0").parent().find("button").attr("disabled",true);
238
            },
238
            },
239
			"complete":function () {
239
			"complete":function () {
240
                $("#table-item-0").parent().find(".continue").css("pointer-events", "");
240
                $("#table-item-0").parent().find("button").removeAttr("disabled");
241
            },
241
            },
242
            "success" : function(data) {
242
            "success" : function(data) {
243
                if (data.success){
243
                if (data.success){
268
                    }
268
                    }
269
                    //分页
269
                    //分页
270
                    if(isbind==true){
270
                    if(isbind==true){
271
                        $("#table-item-0").parent().find(".continue").on("click", function () {
271
                        $("#table-item-0").parent().find("button").on("click", function () {
272
                            firstListShow(false);
272
                            firstListShow(false);
273
                        });
273
                        });
274
                    }
274
                    }
275
                    if (dataStr.length < rows) {
275
                    if (dataStr.length < rows) {
276
                        $("#table-item-0").parent().find(".continue").unbind("click");
277
                        $("#table-item-0").parent().find(".continue").hide();
276
                        $("#table-item-0").parent().find("button").unbind("click");
277
                        $("#table-item-0").parent().find("button").hide();
278
                    }
278
                    }
279
                    $(".loading").remove();
279
                    $(".loading").remove();
280
                }
280
                }
298
			},
298
			},
299
			"beforeSend": function() {
299
			"beforeSend": function() {
300
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
300
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
301
                $("#table-item-3").parent().find(".continue").css("pointer-events", "none");
301
                $("#table-item-3").parent().find("button").attr("disabled",true);
302
			},
302
			},
303
			"complete":function () {
303
			"complete":function () {
304
                $("#table-item-3").parent().find(".continue").css("pointer-events", "");
304
                $("#table-item-3").parent().find("button").removeAttr("disabled");
305
            },
305
            },
306
			"success" : function(data) {
306
			"success" : function(data) {
307
				if (data.success){
307
				if (data.success){
323
					}
323
					}
324
					//分页
324
					//分页
325
                    if(isbind==true){
325
                    if(isbind==true){
326
                        $("#table-item-" + idItem).parent().find(".continue").on("click", function () {
326
                        $("#table-item-" + idItem).parent().find("button").on("click", function () {
327
                            getWenda(false);
327
                            getWenda(false);
328
                        });
328
                        });
329
                    }
329
                    }
330
                    if (dataStr.length < rows) {
330
                    if (dataStr.length < rows) {
331
                        $("#table-item-3").parent().find(".continue").unbind("click");
332
                        $("#table-item-3").parent().find(".continue").hide();
331
                        $("#table-item-3").parent().find("button").unbind("click");
332
                        $("#table-item-3").parent().find("button").hide();
333
                    }
333
                    }
334
                    $(".loading").remove();
334
                    $(".loading").remove();
335
				}
335
				}