XMTT 7 years ago
parent
commit
e25f863596
1 changed files with 9 additions and 4 deletions
  1. 9 4
      app/js/qa-my-wendaTT.js

+ 9 - 4
app/js/qa-my-wendaTT.js

@ -156,6 +156,11 @@ mui.ready(function () {
156 156
                }
157 157
            } else {
158 158
                currentSelf.endPullUpToRefresh(true);
159
                var liLen=document.getElementById(aimId).querySelectorAll("li").length;
160
                removeAfter(aimId);
161
                if(dataStr.length == 0 && liLen == 0 ){
162
                    insertAfter(newStr,aimId);
163
                }
159 164
                return;
160 165
            }
161 166
        };
@ -272,17 +277,17 @@ mui.ready(function () {
272 277
                var kong = document.createElement("div");
273 278
                kong.className = "con-kong";
274 279
                kong.innerHTML = newStr;
275
                if (parent.lastChild.className == "con-kong") {
280
                if (parent.firstChild.className == "con-kong") {
276 281
                    return
277 282
                } else {
278
                    parent.insertBefore(kong, document.getElementById(targetE).nextSibling);
283
                    parent.insertBefore(kong,parent.firstChild);
279 284
                }
280 285
281 286
            },
282 287
            removeAfter = function (targetE) {
283 288
                var parent = document.getElementById(targetE).parentNode;
284
                if (parent.lastChild.className == "con-kong") {
285
                    parent.removeChild(parent.querySelector(".con-kong"));
289
                if (parent.firstChild.className == "con-kong") {
290
                    parent.removeChild(parent.firstChild);
286 291
                } else {
287 292
                    return
288 293
                }