Giter Site home page Giter Site logo

chat-client's Introduction

chat-client

聊天客户端

先上图

登录界面

1

登录成功

2

聊天界面

3

游戏界面

4

##使用

electron

vue

websocket

需要后端配合go-server

登录走普通接口/login ,登录成功后获取token(uid和name构成)

客户端缓存保存uid和name

websocket的onmessage接收数据

根据type的不同做不同的处理

暂时定义了 msg,userJoin,userOut

msg 消息

userJoin 有新用户加入

userOut 用户退出

目录:

E:.
  App.vue(略过)
  config.js(配置文件)
  main.js(略过)

├─assets(静态文件目录)
  ├─chat
        time.png
  
  ├─games
        tank.png
  
  ├─header
        close.png
        close_hover.png
        goback.png
        min.png
        min_hover.png
        out.png
  
  └─style
          reset.css

├─components(略过)
  └─message(封装的消息提示组件)
        index.js
      
      └─src
              index.js
              message.vue

├─game(坦克游戏)
      Bullet.js(子弹类)
      Direction.js(方向)
      EnemyTank.js(敌方坦克类)
      Game.js(游戏类)
      main.js(入口)
      Tank.js(坦克类)
      Tool.js(工具函数)

├─page
      chat.vue(聊天界面)
      header.vue(头部)
      login.vue(登录界面)

├─router
      index.js(略过)

├─store(略过)
    index.js
  
  └─modules
          Counter.js
          index.js

└─utils
        Storage.js(localStorage)
        ws.js(简单封装了一下websocket)

chat-client's People

Contributors

bbfpl avatar

Watchers

James Cloos avatar  avatar

Forkers

2018doudou

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.