//公众号: 声色视觉
//webSite: www.softboyo.cn
//date:2022-08-18
$(function(){var a=ExtractURL("id");GetServiceData("GetMsg/"+a+"/"+localStorage.getItem("caketoken"),function(b){b=b.result[0];null!=b?FillSearch(b):self.location="login.html"})});function FillSearch(a){var b=$("#msg");b.html("");for(key in a.lid)b.append(String.format(Fill,a.name[key]+"\uff1a"+a.phone[key],a.msg[key],$.formatDT(a.postdate[key],1)))}var Fill='\x3cdiv class\x3d"card-body"\x3e\x3cp class\x3d"text-primary fw-bold m-0"\x3e{0}\x3c/p\x3e\x3cdiv class\x3d"d-flex" id\x3d"some-message"\x3e\x3cdiv class\x3d"content"\x3e\x3cstrong\x3e{1}\x3c/strong\x3e\x3chr\x3e\x3cp class\x3d"text-uppercase text-primary fw-bold text-xs mb-1"\x3e\u7559\u8a00\u65e5\u671f\uff1a{2}\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e';$(".btn-primary").click(function(a){var b="";a=$("input").filter(".bg-light");for(var c=0;c<a.length;c++)if(""!=a[c].value){b=a[c].value;break}GetServiceData("MsgSearch/"+b+"/"+localStorage.getItem("caketoken"),function(a){a=a.result[0];0<a.lid.length?(FillSearch(a),msgbox("\u627e\u5230"+a.lid.length+"\u9879\u4e0e"+b+"\u6709\u5173\u7684\u7559\u8a00")):msgbox("\u672a\u627e\u5230"+b)})});function msgpast(a){GetServiceData("msgsw/"+a+"/"+localStorage.getItem("caketoken"),function(b){b=b.result[0];if(0<b.lid.length)switch(FillSearch(b),a){case 1:msgbox("\u5171\u6709"+b.lid.length+"\u6761\u5df2\u8bfb\u7559\u8a00");break;case 2:msgbox("\u5171\u6709"+b.lid.length+"\u6761\u7559\u8a00")}else switch(a){case 0:msgbox("\u6ca1\u6709\u672a\u8bfb\u7559\u8a00");break;case 1:msgbox("\u6ca1\u6709\u5df2\u8bfb\u7559\u8a00");break;case 2:msgbox("\u6ca1\u6709\u7559\u8a00")}})};