企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 前言 rubikx里,我们已经实现了部分客户端组件的调用。 ~~~ //Rubik-X 运行环境 rbk.platform = { /** * 扫码控件 */ QRCodeScanning: function(callBack,obj) { if (rbk.platform.getPlatform().platform == "native") { rbk.platform.callPlugin("NativeFunctionPlugins", "PluginQRCodeScanningArrayArgu", null, callBack); }else if(rbk.platform.getPlatform().platform == "weixin"){ if(!!obj){ wx.config({ debug: false, appId: obj.appId, timestamp: obj.timestamp, nonceStr: obj.nonceStr, signature: obj.signature, jsApiList: [ 'scanQRCode' ] }); wx.ready(function(){ if(!!callBack){ wx.scanQRCode({ needResult: 1, desc: 'scanQRCode desc', success: callBack }); }else{ wx.scanQRCode(); } }) } } }, /** * 拍照组件 */ accessCamera: function(callBack) { rbk.platform.callPlugin("NativeFunctionPlugins", "PluginAccessCameraArgu", null, callBack); } }; ~~~