Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron + NIM 网信云信随记 #5

Open
febobo opened this issue Aug 22, 2019 · 0 comments
Open

Electron + NIM 网信云信随记 #5

febobo opened this issue Aug 22, 2019 · 0 comments

Comments

@febobo
Copy link
Collaborator

febobo commented Aug 22, 2019

Electron 问题汇总

Mac 打exe需安装wine

1.brew install wine
2.package.json 新增script "build:win32": "node .electron-vue/build.js && electron-builder --platform=win32 --arch=ia32",
3.找包时下载winCodeSign失败,改为手动下载 trazyn/weweChat#26

细节相关

  • 多端开启不会执行actions
  plugins: [
    createPersistedState(),
    // createSharedMutations(),
    createLogger()
  ],
  • 托盘图标

图片要选择合适大小的图片, 否则很意外

网易云信汇总

NIM接收漫游消息需将DB设为false // 文档没写有点坑

      state.nim = SDK.NIM.getInstance({
        // debug: true,
        appKey: config.appkey,
        account: payload.accid,
        token: payload.token,
        db: false,
        onroamingmsgs: (msg) => {
          console.log('漫游', msg)
        },
        onconnect: (obj) => {
          console.log(obj)
        }
      })
  • 群组
  • 会话
  • 消息类型
  • 消息发送
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant