https://github.com/kscript/yx-web-im-demo
基于网易云信开发的im 聊天工具 demo (基础版功能有限, 仅供参考)
https://github.com/kscript/yx-web-im-demo
demo im requirejs yunxin
Last synced: 12 days ago
JSON representation
基于网易云信开发的im 聊天工具 demo (基础版功能有限, 仅供参考)
- Host: GitHub
- URL: https://github.com/kscript/yx-web-im-demo
- Owner: kscript
- Created: 2018-10-23T03:22:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T20:56:46.000Z (about 1 year ago)
- Last Synced: 2025-03-04T15:47:58.849Z (about 1 year ago)
- Topics: demo, im, requirejs, yunxin
- Language: JavaScript
- Homepage: https://kscript.github.io/yx-web-im-demo/im/main.html
- Size: 6.86 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yx-web-im-demo
#### 项目介绍
网易云信im
#### 安装
```npm
cnpm i
```
#### 运行
```npm
npm run run
```
#### 打包 require
```npm
npm run rjs
```
#### 在github中查看
##### 1. 使用默认的项目配置
[点击进入](https://kscript.github.io/yx-web-im-demo/im/home)
##### 2. 使用自己的项目配置
首先, 访问 https://kscript.github.io 页面
然后, 在控制台给 localstorage 设置下 有效的uid, token, appkey属性 及 host 属性 ([im项目](https://kscript.github.io/yx-web-im-demo/im/main)所在目录)
设置完毕, 访问 [im项目登录页](https://kscript.github.io/yx-web-im-demo/im/login) 即可查看自己的im项目
#### 简单调试
```
void requirejs(['global'], function(global){
// 获取im实例
var yx = global('yunXin');
console.log(yx);
// 发送消息
yx.sendMessage({
to: 'ks2017',
text: '你好'
});
});
```