Problems encountered in integrating rongyun applets SDK

Integrated version

Originally integrated with 3.0.5, it was finally updated to 3.0.7.1

Documents: the docs. Rongcloud. Cn/v4 / views/im…

Question list

1. The link returns 31012

The security domain name 31012 is incorrect. Please check the security domain name in the developer background

But small program development, should not involve secure domain name issues. So we can only go to rongyun developer background to find work order to solve the problem

After consulting the result, the reason is as follows: In the small program environment of Rongyun 3.0.5 SDK, the current environment is wrongly thought to be Web, and my own AppKey does set a secure domain name in the developer background of Rongyun. This limitation is the result

There are two solutions:

  • Update the SDK to the latest 3.0.7.1. The latest SDK has fixed this issue
  • Remove my own cloud developer background security domain name

Choose one or the other

2. There is no problem running in the simulator, and the real machine cannot be linked when running

Through wechat developer tools + real machine debugging, found an error wechat legitimate domain name limit

After the legitimate domain name is configured according to the Rongyun document, the problem is solved

Documents: the docs. Rongcloud. Cn/v4 / views/im…

3, send picture message, mobile terminal can not display, but the small program can display normally

Through the document, it is found that when the applet side sends the picture message, the content does not contain the thumbnail field

The default of IMKit is to display thumbnails, but the render logic in this mini program is to display remoteUrl, which ultimately caused this problem

This problem is resolved when the Content field is added as per the document

Documents: the docs. Rongcloud. Cn/v4 / views/im…