-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path123.txt
40 lines (39 loc) · 1.82 KB
/
123.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//合并成功
$("#submit").click(function(){
$.ajax({
type: "POST",
url: "search",
data: $("#Search").serialize(),
dataType: "json",
success: function(data){
$(".user_table").html("");
$(".remindinfo").html("");
if(data.length === 0){
$(".remindinfo").html("不存在此用户");
}
else{
for (let i=0; i<data.length; i++) {
$(".user_table").append("<tr>" + "<td>"+data[i].userNum +"</td>"+"<td>"+data[i].nickName+"</td>"+ "<td>"+"<input id='addfriend' data-num='"+data[i].userNum+ "' value='+ 好友' type='button'>"+"</td>"+"</tr>");
}
$("#addfriend").on("click",function(){
let preMsg = $("#checkmsg").val();
$("checkmsg").val('');
chatType = 5;
let json = {"msgTypeCode":chatType,"toUserNum":this.getAttribute("data-num"),"message":preMsg,"sendTime":new Date().getTime()};
ws.send(JSON.stringify(json));
$("#systeminfo").append("<div class='system-items'>"+"<p class='friend-comment-p'>"+ +"</p>"+"<p class='nickname-p'>"+ +"</p>"+"<p>"+ preMsg +"</p>"+"</div>"+"<div class='message-count'>"+"</div>");
})
}
}
})
})
$("我在tbl分支中对该文件做的修改").click(function(){
$("#systeminfo").hide(300);
$("#chattingmsg").show(300);
$(".message-part *").hide(300);
})
$("#applymsg").click(function(){
$("#chattingmsg").hide(300);
$("#systeminfo").show(300);
$(".message-part *").hide(300);
})