GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - litian129/wechat-chat: 微信小程序版聊天室

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
pages/index
pages/index
 
 
utils
utils
 
 
README.md
README.md
 
 
app.js
app.js
 
 
app.json
app.json
 
 
app.wxss
app.wxss
 
 

Repository files navigation

wechat-chat

本项目使用 Gorilla WebSocket 作为聊天室后台 , Gorilla WebSocket 基于go语言开发,提供的demo实例中有聊天室源码,不需要任何修改就能生成一个聊天室项目(包含后台+web前台)

demo:
http://121.42.51.70:8080

##一、聊天室服务搭建步骤:
如果不想搭建服务器,可以跳过这个步骤,直接使用我的服务

  1. 安装 golang , 安装1.6以上版本,低版本问题较多。注:下载golang需要翻墙

  2. 安装Gorilla WebSocket模块

    go get github.com/gorilla/websocket
    
  3. 启动聊天室

    $ go get github.com/gorilla/websocket    
    $ cd `go list -f '{{.Dir}}' github.com/gorilla/   websocket/examples/chat`
    $ go run *.go  
    
  4. web客户端
    访问:http://ip:8080

##二、微信小程序客户端

  1. git clone https://github.com/ericzyh/wechat-chat.git

  2. 使用微信web开发者工具导入项目

  3. 修改服务地址 wechat-chat/utils/websockets.js 行1

##三、小程序开发问题 (Q&A)

  1. 如何通过js获取到某个组件? (发送消息后,清空输入框)
    A:

  2. text存英文超过屏幕宽度后,会出现横向滚动条?
    A: 和css一样加上样式:word-break:break-all;

  3. 有没有办法在view里通过js动态加入view?
    A:

##四、todo

  1. 发送消息后,清空输入框
  2. 名字可点击,实现1v1通讯
  3. 加入聊天间

About

微信小程序版聊天室

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.