Commit 6c825f05 by 冷斌

update

parent a62b4e8c
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
var socket = new io("{$config['chatserver']}"); var socket = new io("{$config['chatserver']}");
$(".js-ajax-submit").on("click",function(){ $(".js-ajax-submit").on("click",function(){
var content=$.trim( $("#content").val() ); var content=$.trim( $("#content").val() );
if(!content){ if(!content){
alert("内容不能为空"); alert("内容不能为空");
...@@ -51,17 +51,18 @@ ...@@ -51,17 +51,18 @@
success:function(data){ success:function(data){
if(data.error==0){ if(data.error==0){
var data2 = {"token":"1234567","content":content}; var data2 = {"token":"1234567","content":content};
console.log(data2, "{$config['chatserver']}");
socket.emit("systemadmin",data2); socket.emit("systemadmin",data2);
alert("发送成功"); alert("发送成功");
}else{ }else{
alert(data.msg); alert(data.msg);
} }
} }
}) })
}) })
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment