Git Product home page Git Product logo

Comments (22)

cdasl avatar cdasl commented on July 26, 2024

image

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

请务必注意: 因为 Server 的地址是 HTTPS的, 由于小程序开发版本对域名的限制, 请在微信开发者工具 -> 详情 菜单中勾选 不校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

image

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

取消勾选

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

大佬可否分享一下server 端的代码?

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

Server 端使用的是 socket.io 官方的 chat demo 源码, 可以去看看

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

image

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

没有任何改动吗?

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

没有的,你重新编译刷新一下

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

依然不行=_=

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

你把URL换了?是什么意思?

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

const socket = (this.socket = io( 'https://vast-plateau-30681.herokuapp.com/' ))
把这个url换成了我自己的服务器的,上面有socket.io的chat demo

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

用我的URL也不行吗?

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

完全没问题,一换就出错

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

检查一下你的 Server或者 nginx配置

from socket.io-weapp-demo.

cdasl avatar cdasl commented on July 26, 2024

把我的https换成http就好了,原因不明

from socket.io-weapp-demo.

wfzong avatar wfzong commented on July 26, 2024

我也有同样的问题,在开发工具里OK,用手机预览就提示:xhr poll error

from socket.io-weapp-demo.

wfzong avatar wfzong commented on July 26, 2024

_20180619185009
直接用的你的URL也不行,求帮助、求提携~

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

模拟器需要勾选『不校验域名合法性』

真机需要开启 Debug 模式

from socket.io-weapp-demo.

wfzong avatar wfzong commented on July 26, 2024

开发者工具里,已经勾选 不校验域名合法性,并且可以正常运行。
在手机里“预览”和“远程调试”不行,您说的“真机需要开启 Debug 模式”,具体指的是什么呢?

from socket.io-weapp-demo.

gongzili456 avatar gongzili456 commented on July 26, 2024

wechatimg1

from socket.io-weapp-demo.

wfzong avatar wfzong commented on July 26, 2024

打开调试模式后好了,谢谢。
现在有点担心的是,发布线上会不会有问题,您有没有正式项目有应用过?

from socket.io-weapp-demo.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.