li лет назад: 7
Родитель
Сommit
42a0d353b7
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      app/js/leaveWords.js

+ 6 - 4
app/js/leaveWords.js

@ -25,14 +25,13 @@
25 25
		self.sid = module.sid;
26 26
		self.stype = module.stype;
27 27
		self.init();
28
		
29
		self.LwordTotal();
30 28
		var str=document.createElement("div");
31 29
		str.className="con-kong displayNone";
32 30
		var tNode=document.createTextNode("暂无留言")
33 31
		str.appendChild(tNode);
34 32
		document.getElementsByClassName('commentBlock')[0].parentNode.appendChild(str);
35 33
		self.bindEvent();
34
		self.LwordTotal();
36 35
	}
37 36

38 37
	function lgin() {
@ -152,6 +151,7 @@
152 151
				id: 0,
153 152
				rows: 500
154 153
			});
154
			self.LwordTotal();
155 155
		})
156 156
	}
157 157
	LeaveWord.prototype.bindEvent = function() {
@ -259,6 +259,7 @@
259 259
			uid: plus.storage.getItem('userid'),
260 260
			uname: plus.storage.getItem('name')
261 261
		}, "POST", function(data) {
262
			self.LwordTotal();
262 263
			document.getElementById("textInputThis").value = "";
263 264
			document.getElementById('textInput').style.display = "none";
264 265
			document.getElementById('operCol').style.display = "block";
@ -271,7 +272,7 @@
271 272
				id: 0,
272 273
				rows: 500
273 274
			});
274
			self.LwordTotal();
275
			
275 276
		})
276 277
	}
277 278
	LeaveWord.prototype.LwordDel = function($this, lid) {
@ -288,11 +289,12 @@
288 289
		ajaxRequist("/ajax/leavemsg/count", {
289 290
			sid: self.sid,
290 291
			stype: self.stype
291
		}, "get", function($data) {
292
		}, "get", function($data) {			
292 293
			if($data > 0) {
293 294
				document.getElementsByClassName('mui-badge')[0].innerHTML = $data;
294 295
				document.getElementsByClassName("con-kong")[0].classList.add("displayNone");
295 296
			}else{
297
				document.getElementsByClassName('mui-badge')[0].innerHTML = "";
296 298
				document.getElementsByClassName("con-kong")[0].classList.remove("displayNone");
297 299
			}
298 300
		})