Commit 7fac3b36 authored by 何硕's avatar 何硕

Merge branch 'heshuo' into 'master'

test

See merge request !13
parents 7dfd613d 86f3a14f
......@@ -6,14 +6,14 @@ var io = require('socket.io')(http);
let fs = require("fs");
app.all('*', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Content-Type,Content-Length, Authorization, Accept,X-Requested-With");
res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
res.header("X-Powered-By",' 3.2.1');
res.header("Content-Type", "application/json;charset=utf-8");
next();
});
// app.all('*', function(req, res, next) {
// res.header("Access-Control-Allow-Origin", "*");
// res.header("Access-Control-Allow-Headers", "Content-Type,Content-Length, Authorization, Accept,X-Requested-With");
// res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
// res.header("X-Powered-By",' 3.2.1');
// res.header("Content-Type", "application/json;charset=utf-8");
// next();
// });
// var BaseUrl = "http://localhost/api/";
var BaseUrl = "https://zhibo.xueyoubangedu.com/api/";
......@@ -30,7 +30,7 @@ app.get('/', function(req, res){
});
io.on('connection', function(socket){
console.log("connection");
//监听用户登录
socket.on('login', function(obj){
var userid = obj.userid;
......
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