• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    JavaScript
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easemob webim demo built on top of vue from scratch.

Easemob WebIM Demo

webim vue demo简介

webim-vue demo是基于环信sdk开发的一款具有单聊、群聊、聊天室、音视频等功能的应用,为了vue用户能够快速集成环信 im sdk和音视频sdk,我们特使用了vue+vuex,为大家提供参考,我们也提供了react版demo

运行起来

  • 说明:音视频功能需要使用https。
  • 环境:Node 版本要低于 12.x,建议使用 10.x
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm start || HTTPS=true npm start

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

项目结构

目录 说明
build 打包后的文件
config 项目的配置
node_modules 项目依赖
static 资源文件
travis CI脚本
src 项目源文件
components 项目组件
config 表情和项目中ui配置
pages 项目页面
router 路由
store vuex store
utils sdk 引入和配置

主要功能点说明

sdk集成

代码目录:src/utils/WebIM.js

  • 引入sdk和配置文件,实例化。
  • 注册监听事件

发送消息

代码目录:src/components/chat/index.vue

  • 在chat组件里实现发消息以及消息上屏,index为发送消息,message为显示消息上屏
  • 具体发送消息的方法在 src/store/chat

音视频

代码目录: src/components/emediaModal

  • index为单人音视频, multiAVModal为多人音视频,

群组

代码目录:src/components/group

  • 群组发送消息和单人是一样的只是type不同
  • group下为群组设置的代码

消息存储

  • 消息存储在 store > chat > msgList
  • 关于持久化:这个demo采用的sdk消息漫游的增值服务,可以拉取历史消息,当然你也可以采用indexdb来做本地存储,同时也可以开通实时回调服务,将消息同步到自己的服务器。

写在最后

第一期已经完成了绝大部门im基础功能,大家也可以取查看官方详细文档 当然由于接触vue时间有限,这个demo只是给大家一个参考,很多地方的实现并不是很多,大家就自行发挥吧,后续会持续优化和更新。

More Repositories

1

emchat-server-examples

PHP
523
star
2

web-im

环信 web im sdk
JavaScript
353
star
3

sdkdemoapp3.0_android

Java
312
star
4

easeui

Java
292
star
5

im_flutter_sdk

环信im flutter sdk, example中包含ui代码.
Dart
237
star
6

webim-weixin-xcx

JavaScript
200
star
7

webim-react-native

JavaScript
194
star
8

sdkdemoapp3.0_ios

Objective-C
144
star
9

easemob-demo-react

JavaScript
125
star
10

kefu-android-demo

demo app for help desk cloud
Java
94
star
11

sdk-ios-cocoapods

环信iOS SDK CocoaPod repo
Objective-C
78
star
12

webim-uniapp-demo

Vue
77
star
13

chat-android

Java
74
star
14

easeui_ios

Objective-C
74
star
15

livestream_demo_android

Java
69
star
16

kefu-ios-demo

demo app for easemob help desk cloud
Objective-C
53
star
17

livestream_demo_ios

直播demo iOS
Objective-C
49
star
18

kefu-webim

JavaScript
41
star
19

easeui-ios-hyphenate-cocoapods

cocoapods for Hyphenate EaseUI
Objective-C
35
star
20

SwallowKeeper

The description of the repo.
Python
34
star
21

easemob-demo-ios

Swift
22
star
22

easemob-im-server-sdk

IM server SDK
Java
20
star
23

videocall-android

Java
18
star
24

sdk-ios-cocoapods-integration

Objective-C
18
star
25

sdkdemoapp_windows

Windows demo
JavaScript
15
star
26

Circle-Demo-Web

JavaScript
13
star
27

www.easemob.com

环信
HTML
12
star
28

easemob_supercommunity

Java
11
star
29

easemob-demo-appserver

IM app-server.
Java
10
star
30

easecallkitui-android

Java
9
star
31

easemob-uikit-react

TypeScript
9
star
32

mua

Java
8
star
33

liveroom-android

Java
7
star
34

medical_treatment_demo

Vue
6
star
35

EasemobVoice

Java
6
star
36

easeui-ios-cocoapods

Objective-C
5
star
37

ease_call_kit

Easemob Callkit
Dart
5
star
38

emclient-unity

C#
5
star
39

Easemob2023-Innovation-Challenge

JavaScript
5
star
40

easemob-uikit-ios

Swift
5
star
41

learn-easemob

JavaScript
5
star
42

whiteboard_demo_web

JavaScript
4
star
43

kefu-agent-android

The description of the repo.
Java
4
star
44

easemob-push-server-sdk

Java
4
star
45

flutter_chat_uikit

Dart
4
star
46

videocall-web

JavaScript
4
star
47

EasemobCircle-2022-Innovation-Challenge

JavaScript
4
star
48

easemob-doc

Shell
3
star
49

easecallkitui-ios

Objective-C
3
star
50

Creative-Challenge-MQTT

MQTT challenge
3
star
51

kefu-agent-ios

The description of the repo.
Objective-C
3
star
52

voiceroom_demo_android

Java
2
star
53

easemob-demo-android

Kotlin
2
star
54

liveroom-ios

Objective-C
2
star
55

UIKit_Chatroom_ios

Swift
2
star
56

easemob-007-token

Java
2
star
57

easemob-support

Vue
2
star
58

UIKit_Chatroom_android

Kotlin
2
star
59

easemob-uikit-flutter

Dart
2
star
60

react-native-chat-sdk

TypeScript
2
star
61

easemob-uikit-reactnative

TypeScript
2
star
62

voiceroom_demo_ios

Swift
1
star
63

im-php-server-sdk

PHP Server SDK for IM.
PHP
1
star
64

easemob_flutter_chat

Flutter chat demo.
Dart
1
star
65

emclient-u3d

u3d sdk for Easemob IM
Objective-C
1
star
66

kefu-scripts

2023年4月4日已迁移至gitlab上
Shell
1
star
67

easemob-voiceroom

Java
1
star
68

livestream-demo-app-server

Java
1
star
69

docs

官网上的文档网站
PHP
1
star
70

Circle-Demo-Android

Java
1
star
71

kefu-vec-webim

JavaScript
1
star
72

whiteboard_demo_android

Java
1
star
73

videocall-ios

Objective-C
1
star
74

UIKit_Chatroom_flutter

Dart
1
star
75

UIKit_Chatroom_rn

TypeScript
1
star
76

Demo-ChattyAI

Java
1
star
77

flutter_chat_callkit

Dart
1
star
78

easemob-uikit-android

Kotlin
1
star