求助,socket.io在苹果手机上面连不上啊,安卓,PC都没问题?

前端部分代码:

<script src="../common/zepto.min.js"\></script\>  
<script src="../common/zepto.weui.js"\></script\>  
<script src="../common/axios.min.js"\></script\>  
<script src="../common/eruda.js"\></script\>  
<script src="../common/socket.io.js"\></script\>  
<script src="../common/normal.js"\></script\>
<script src="./js/index.js"\></script\>

index.js代码:
const socket = io('http://www.cdrbcx.com.cn:3000');

nodejs代码

var app = require('express')();  
var http = require('http').createServer(app);  
var io = require('socket.io')(http);  
  
app.get('/', function (req, res) {  
  res.sendFile(__dirname + '/index.html');  
});  
  
io.on('connection', function (socket) {  
  socket.on('disconnect', function () {  
    console.log('user disconnected');  
  });  
});  
  
http.listen(3000, function () {  
  console.log('listening on *:3000');  
});

手机端eruda.js看到的请求
image.png
image.png

感谢各位大佬,很着急!!

待解决 悬赏分:10 - 离问题结束还有 506天23小时16分14秒
反对 0举报 0 收藏 0

我来回答

回答1