One-Stop Technical Documentation
LarkXR
Dev Platform
Use Case
WebSDK + DataChannel
Extra Param
DataChannel
WebGL DataChannel
-
+
首页
Extra Param
There are two additional parameter-passing formatsthe short dash format and the GNU long parameter format,providing us with better options for parameter passing.Lets take a look at the specific usage methods. • Short Dash FormatAppend the`&extraParam.cmdLineParamStyle=2`parameter to the URL. ``` http://[server_ip]:8181/enterAppli?appliId=[application_id]&extraParam.userName=zhangsan&extraParam.age=12&extraParam.cmdLineParamStyle=2 ```  • GNU Long Parameter FormatAppend the`&extraParam.cmdLineParamStyle=1`parameter to the URL. ``` http://[server_ip]:8181/enterAppli?appliId=[application_id]&extraParam.userName=zhangsan&extraParam.age=12&extraParam.cmdLineParamStyle=1 ```  • Do not append the`&extraParam.cmdLineParamStyle`parameter at all. ``` http://[server_ip]:8181/enterAppli?appliId=[application_id]&extraParam.userName=zhangsan&extraParam.age=12 ```  The effects of the three parameter - passing formats are demonstrated in the order of short dash,GNU long parameter,and default parameter .Additionally,we have introduced a feature to handle the encoding of special characters in additional parameters.The usage method is as follows: ``` "https://XXXX?extraParam.encoded.token=" + encodeURIComponent(jsonValue) ``` such as : ``` https://XXXX?appliId=**&extraParam.encoded.X=-ResX%3D2560&extraParam.encoded.Y=-ResY%3D1350 ``` The above is the trial method directly concatenated into URL parameters.If you are using WebSDK to pass additional parameters,please refer to the following methodsWebSDK provides multiple demos.For example,take the sample-plain-html and ui-mobile-vue-new demos.  **Sample 1:sample-plain-html** Open`sample-plain-html/index.html`and modify the code as follows ``` client.connect({ appliId: "925773094113509376", .... "extraParam.params": "zhangsan 12"** }) ``` **Sample 2:ui-mobile-vue-new** Open`ui-mobile-vue-new/src/App.vue`and add the following content to the`start()`method. ``` async start() { const { larksr } = this; try { let params = {}; params.appliId = '1420437156576362496' var extraParams = {}; extraParams['extraParam.test'] = "zhangsan 12"; if(Object.keys(extraParams).length>0) { params = Object.assign(params, extraParams) } .... ``` Or,when using the`larksr.connect`method to connect to the cloud rendering,add the following parameters. ``` client.connect({ appliId: "925773094113509376", .... "extraParam.params": "zhangsan 12" }) ```
admin
2025年10月9日 13:45
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
Word文件
PDF文档
PDF文档(打印)
分享
链接
类型
密码
更新密码
有效期