猿大师中间件网络标准版功能测试文档
开发文档 admin 发布时间:2021-04-20 15:16:12 浏览: 次
猿大师中间件网络标准版功能测试:
1、请下载猿大师中间件网络版安装包后执行安装,安装时需要管理员权限运行,安装完成时会启动猿大师中间件服务,在安装目录下的Data子目录有ZbaService.txt(单机版是WrlService.txt)日志文件输出运行情况;
2、启动Chrome等浏览器并打开网页 http://test.yuanmaster.com/ 进行测试(HTTPS网站测试请打开 https://test.yuanmaster.com/ ,HTTPS网站请把连接的通讯协议 ws: 改为 wss: 再执行),如在IE等浏览器中测试,如提示启用ActiveX控件,请选择是;
3、测试连接猿大师中间件系统服务,下面是参数说明:
sid是唯一连接标识(小程序服务支持同时多个连接,需要用唯一标识进行区分)
pid是连接小程序的唯一标识(在小程序配置文件PluginConfig.json中定义的PID值),不传时表示连接主服务
flag是连接控制掩码,1指定输出调试日志,2指示通讯数据进行GZip压缩(网页JS需要进行同步处理),3代表1+2,4用管理员权限启动(仅限于启动弹窗或内嵌窗口小程序)。
请求连接猿大师中间件主服务:ws://test.yuanmaster.com:83?sid=123&flag=1 点击连接按钮会输出连接结果,在HTTP网页中,test.yuanmaster.com可替换为localhost进行连接,如果您的电脑83端口已经被占用,服务侦听端口会自动切换为84,那么连接地址请修改为:ws://test.yuanmaster.com:84?sid=123&flag=1;
连接猿大师中间件主服务后支持的功能协议:
1)、获取或对比版本信息
Mac为1时获取本机Mac地址信息,More取更多信息(当前登录用户、键盘和鼠标空闲时间、当前电脑制造商及型号等),Router为1时获取当前网络路由器MAC地址,Config为1时获取中间件的一些配置参数。
说明:连接主服务后可执行,返回当前软件版本、当前系统版本、唯一标识、授权有效期、授权客户名称、当前系统启动后运行时间、程序运行路径等;
获取版本信息举例:
{"req":"Wrl_Version","rid":1,"para":{"Mac" : 1,"More" : 0,"Config" : 1,"Router" : 1}}
协议中的rid代表此请求序号(长整型),请求返回的结果json中也会带这个参数,因为ws请求和返回是异步执行的,这样可以确保请求和结果的一一对应关系,下同
返回:{"ret":0,"rid":1,"req":"Wrl_Version","data":{"Version":"2.1.2.2","ValidDay":"2021-03-21","AuthName":"成都佐罗软件","Type":8,"OS":"10.0.18363.2","Win64":1,"UniID":"C69C5505AD73EFDD7A6BA38D83665889","Time":8103544,"TickCount":17184796,"Adv":1,"RunPath":"D:/Zorro/WRL/","Mac":[{"Card":"802.11n USB Wireless LAN Card","Mac":"38:B84:9E:2F:38:6A"}],"Router":["90:6F:AB:8F:BB:58"],"Config":{"NoService":0,"Localhost":1,"Delay":1,"Monitor":60,"Mac":1,"UDisk":0,"Lang":"CHS"}}}
对比是否有新版本举例:
{"req":"Wrl_Version","rid":1,"para":{"Version" : "1.0.1.1"}} 给定新版本号,判断当前中间件版本是否需要升级,返回节点字段Update为1时需要升级,0不需要升级
{"req":"Wrl_Version","rid":1,"para":{"PID" : "F90B1CF0-8485-40ec-B4E8-B87598AAB35D","Version" : "1.0.1.1"}} 指定PID的小程序新版本号,判断小程序是否需要升级,返回节点字段Update为1时需要升级,0不需要升级,2代表小程序还未安装
2)、指定浏览器打开指定Url:
分别指定浏览器类型Type(1代表IE 2代表Chrome 4代表Firefox 8代表Opera 16代表Edge(Chromium内核) 32代表360急速浏览器 33代表360安全浏览器 34代表360企业安全浏览器 50代表QQ浏览器 60代表搜狗浏览器)和Url地址;
Flag意义:0代表标签页打开,1代表新窗口打开(360等不支持);
Show显示窗口类型,默认1正常显示,2最小化显示 3最大化显示。
此功能主要用于强制IE打开指定网页;
举例1:
强制用IE9兼容模式内核浏览器打开 http://www.yuanmaster.com/
9999是IE9标准模式 8888是IE8标准模式 8000是IE8兼容模式 7000是IE7 详细定义参考:https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN#browser_emulation
{"req":"Wrl_OpenUrl","rid":2,"para":{"Type":"1","Url": "http://www.yuanmaster.com/","Flag":"1","Version":"9000"}}
举例2:
Chrome浏览器新窗口打开http://www.yuanmaster.com/ Flag为1新窗口打开,否则是新标签打开
{"req":"Wrl_OpenUrl","rid":3,"para":{"Type":"2","Url": "http://www.yuanmaster.com/","Flag":"0"}}
举例3,请求FireFox浏览器打开指定URL:
{"req":"Wrl_OpenUrl","rid":5,"para":{"Type":"4","Url": "http://www.yuanmaster.com/"}}
举例4,请求360极速浏览器打开指定URL:
{"req":"Wrl_OpenUrl","rid":6,"para":{"Type":"32","Url": "http://www.yuanmaster.com/"}}
举例5,请求360安全浏览器打开指定URL:
{"req":"Wrl_OpenUrl","rid":7,"para":{"Type":"33","Url": "http://www.yuanmaster.com/"}}
举例6,请求Edge新内核浏览器打开指定URL:
{"req":"Wrl_OpenUrl","rid":8,"para":{"Type":"16","Url": "http://www.yuanmaster.com/"}}
3)、请求使用关联程序打开指定文件:
指定本地文件全路径,使用本地电脑默认关联的程序打开,路径用反斜杠或双斜杠。
为安全起见,这些扩展名文件不支持:*.exe *.msi *.js *.jar *.inf *.com *.bat *.vbs *.py,如实在需要支持这些文件的启动,请购买单独发现的文件操作小程序授权,具体请联系客服。
举例:
{"req":"Wrl_OpenFile","rid":9,"para":{"File" : "D:/Zorro/Ver/TestWrl.txt"}}
说明:连接主服务后可执行;
4)、单选(多选)磁盘文件/设置文件保存位置:
可指定选择文件对话框标题、筛选文件类型、最大可选文件数量、初始化路径等参数。
Type 操作方式 0代表选择文件 1代表设置文件保存路径
Single 是否单选 选择文件时有效
Ext 文件类型,默认为 图像文件(*.jpg;*.gif;*.bmp;*.png;*.tif)\r*.jpg;*.gif;*.bmp;*.png;*.tif;*.jpeg\r所有文件(*.*)\r*.*
Title 对话框标题,默认为 请选择文件
Name 文件保存默认名称 选择文件时无效
BtnText 按钮文字 设置文件保存位置时无效
Path 初始化显示路径,默认为 当前用户文档目录
举例:
选择文件
{"req":"Wrl_SelectFile","rid":10,"para":{"Type" : 0,"Single" : 1,"Title" : "单选文件","BtnText" : "确定(&O)","Ext" : "所有文件(*.*)\r*.*","Path" : "E:/WRL/"}}
设置文件保存位置
{"req":"Wrl_SelectFile","rid":11,"para":{"Type" : 1,"Title" : "请选择文件保存位置","Ext" : "文本文件(*.txt)\r*.txt","Path" : "E:/WRL/","Name" : "测试"}}
说明:连接主服务后可执行,由于此请求有对话框阻塞行为,执行后的结果通过事件推送方式返回,定义如下:
{"event":"Wrl_SelectFile","rid":12,"data":[{"File":"E:/WRL/测试.txt"}]}
取消时推送:{"event":"Wrl_SelectFile","rid":12,"err":"被取消"}
5)、选择目录:
可指定对话框标题等参数。
Title 对话框标题,默认为 请选择文件
BtnText 按钮文字 设置文件保存位置时无效
举例:
{"req":"Wrl_SelectFolder","rid":13,"para":{"Title" : "选择本地目录","BtnText" : "确定(&O)"}}
说明:连接主服务后可执行,由于此请求有对话框阻塞行为,执行后的结果通过事件推送方式返回,定义如下:
{"event":"Wrl_SelectFolder","rid":13,"data":[{"Folder":"E:/WRL/"}]}
取消时推送:{"event":"Wrl_SelectFolder","rid":6,"err":"被取消"}
6)、请求获取指定文件大小、版本、文件属性、MD5、创建时间、修改时间等信息:
指定本地文件全路径,路径用反斜杠或双斜杠,如果是图片文件,还会返回高度和宽度信息。
举例:
{"req":"Wrl_GetFileInfo","rid":14,"para":{"File" : "D:/Zorro/WebRunLocal/Bin/Test/css/top.png"}}
说明:连接主服务后可执行;
7)、请求重新注册中间件或小程序:
如指定PID代表重新注册指定的小程序,否则执行重新执行中间件安装批处理(连接会断开),可能因为一些工具或手工误删除了注册表等,用于修复本中间件使用配置。如用于重新配置中间件正式版需要添加TK校验,具体规则请参考SDK包中文档“PluginOK中间件安全解决方案.doc”,可在SDK包中的打包程序ZbaPackage.exe的中间件维护生成带TK的请求。
举例:
{"req":"Wrl_RegCom","rid":15,"para":{"PID" : "A22E18F1-95F8-4FDB-99D2-188E5FB12B23"}} 重新注册小程序
{"req":"Wrl_RegCom","rid":15,"para":{"NoService" : "1"}} 以非系统服务方式重新安装中间件
说明:连接主服务后可执行;
8)、请求当前浏览器类型和版本等信息:
举例:
{"req":"Wrl_BrowserInfo","rid":16,"para":{}}
说明:连接主服务后可执行;
返回:{"ret":0,"rid":16,"data":{"Type":2,"PID":6324,"Ver":"83.0.4103.61"}}
Type为浏览器类型 PID为当前进程ID Ver为版本
9)、列出当前已授权的小程序列表:
举例:{"req":"Plugin_Authed","rid":17,"para":{}}
说明:连接主服务后可执行,可获取当前已授权所有小程序列表;
10)、列出已安装所有小程序:
举例:{"req":"Plugin_List","rid":18,"para":{"Detail" : 0}}
说明:连接主服务后可执行,可获取当前已安装所有小程序信息,Detail为1时返回小程序程序全路径;
11)、判断某个小程序是否已存在
举例:{"req":"Plugin_Exist","rid":19,"para":{"PID" : "F90B1CF0-8485-40ec-B4E8-B87598AAB35D"}}
说明:连接主服务后可执行,PID为小程序唯一标识;
12)、请求重新加载指定小程序
使用场景:不用重启服务即可扫描新增小程序使用;或小程序调试时,程序及配置更新需要重新加载时
举例:{"req":"Plugin_Refresh","rid":20,"para":{"PID" : "F90B1CF0-8485-40ec-B4E8-B87598AAB35D"}}
说明:连接主服务后可执行,PID为小程序唯一标识;
13)、前端请求配置参数。
举例:{"req":"Wrl_Config","rid":21,"para":{"Monitor" : "30"}}
Monitor配置服务无响应超时时间,一旦超过服务会自动重启
说明:连接主服务后可执行;
14)、前端请求启动中间件,网页中点击以下链接,可启动中间件主程序。
<a href="BrowserApplet://DeskRun">点击这里启动PluginOK网络版</a>
15)、安装范例小程序
请在输入框中,分别输入如下请求,然后点击发送,完成四个范例小程序的安装:
{"req":"Plugin_Install","rid":1,"para":{"Name":"DLL小程序范例(C++语言)","PID":"A22E18F1-95F8-4FDB-99D2-188E5FB12B23","Date":"2021-03-27","Desc":"无窗小程序(C++语言)-读写TXT记事本及获取当前系统信息","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginComDll.pid","MD5":"C9295CC5BAF13D75FAC291E0CCEF606F","Version":"2.1.3.1","Size":557056,"HideIns":0,"Type":1,"Cookie":"","Auth":"","TK":"3AA87C8AB190326CB37F394DE66316890F5DB37C9242F961255FBDBE2E9A9F38734C5D8AE5359794F0ACA15F3A122B960D0FCB7FF0B5F7FF7535FB5BD66538E06B6D1CCDF4E02886C6A9CBFEF3D9D6BC8F515E1B9525BA8BC7C699AA8BF4CE9C0CEBF75F1FAAC874EC3C9A54E82085AEB2BB02AF783AA2F6DED3CCFB1232BC0DD3AE82439545DDB22030FE03519057ED3FF6F2406A7663246D7593DF18B34C1DB23E2BE83F0F42477C4CFC02BAFF254EC4BC7BAA2AF225ACD2F9F6A869836D4D296C8B8F103734D2A07E71F1EE3827A237411E46C0D83046F9542C2D59A2FAB0538B97A675E051FCFA261242DB9A9560A87A8723AA931FEF883E596B36B90CEE"}}
{"req":"Plugin_Install","rid":1,"para":{"Name":"弹窗小程序范例(C++语言)","PID":"PluginWinExe","Date":"2021-03-27","Desc":"弹窗小程序(C++语言)-演示脚本请求打开指定网站","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginWinExe.pid","MD5":"0C934E2D8D069C433827423CC3719773","Version":"2.1.3.1","Size":622592,"HideIns":0,"Type":2,"Cookie":"","Auth":"","TK":"B6DA5B980B23CA78BF41C1155E42148373223DF93BA50C033EE2B13D8E23B04DD413E237DE00626A9B6C4CD253277CA32D13A496B9E9013E0771B08DE932AE5E064988910106C1A265D77C62D4E87418E5D169A727DFF72064FBFE577DB448F56FF8F60937AD25206D358D8123FE0589555F3EB3CC0884AD6EB42046CDDF3249299921C1B7E230C0E072717C7ADD787CB282B33F88C91E44F5D1CE08E5D4C91E7C2C363D48C54E792DEBC751B7CAFF8E7FECFC70FFD60B15020CA4C866D5857E508C48429858391693E75E52B00992BFC1526DCDF3541207E0A4E8ECC209E9210DAEA1AB7861E84B5CFB226C35A76B971A3EEB7BE0A354AE6B837570E74FC8BF"}}
{"req":"Plugin_Install","rid":1,"para":{"Name":"DLL小程序范例(C#语言)","PID":"D10495F4-DF0F-44FA-8647-91275347214A","Date":"2021-03-27","Desc":"无窗口小程序范例(C#语言)","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginNetDll.pid","MD5":"9F7C25376469CDF4A39705BEF46E7927","Version":"2.1.3.1","Size":393216,"HideIns":0,"Type":1,"Cookie":"","Auth":"","TK":"B71DB0A19E291BB6551C37AB5A9AFE61A70A29F01CF1366B19D5884FCC1CF1C41D0077D8AEBF0B126E8A64B2C6EA1B90AC9780803419AF978C6594F5819FD9AE425A0A134DAD866CDEB79A9033AAC43EB83DD0D902EA947E801A0D988D0A0E5ECF6D4E4295C870260A0840B29DC5D11A58D3A125EEDC060FA5424A483097B49A7A1C9E21F1A7A7D5649A14CBA5414BC4617EF18432ABECD1F5A410DFE99675B9713D6ADD9EDB5F53A7BDF526C792A41F78136130BCD41A8AC440321FE09F23C5170A27D75239D426E37D39179CF2B3180A1861B17B4AEF65A891B58D7603B9F448A9908226CC24C8029DB079AFF0BD0EFF2CA2BCA8341DCEB9C9A09D30AB54B9"}}
{"req":"Plugin_Install","rid":1,"para":{"Name":"弹窗小程序范例(C#语言)","PID":"PluginExeDemo","Date":"2021-03-27","Desc":"弹窗小程序范例(C#语言)-演示脚本请求打开指定网站","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginExeDemo.pid","MD5":"AE394DCF6E1442F9110B102CFD942269","Version":"2.1.3.1","Size":622592,"HideIns":0,"Type":2,"Cookie":"","Auth":"","TK":"147CCBE979A334AAF85C2C50F15708F13BE46CE93C37EC59090B3DD7160B274DDDAF4964EF87C194FFE63A5DB04753A6E3C2E55AB08D30F8C4CEF29B28AFBDC6221683D31468818CDBFB67C57128F1D6E004ABD60304DEA17203B7534010FC80EEFE5E6E7D14BA4F98CC441BA87F21D09F3199230A538A6B0D441A136A66C3D38CE4C4C120F07EF4830A7F27EEDFA80997C6460E11C5E9DF4A67A5A15A83C18C26F576E3D18D799C3F0F4B24EED1122E168E860F79B9F67A6EAD8EDEAA5CDAC74C8529233B3C416BB4553CB9E58942C2E722D673754A077AB12407D1B85F75650610947136273FEE915D790FC682BABAD10F28C01A1A934A7079834E1F028F54"}}
16)、范例小程序升级请求:
{"req":"Plugin_Update","rid":1,"para":{"Name":"DLL小程序范例(C++语言)","PID":"A22E18F1-95F8-4FDB-99D2-188E5FB12B23","Date":"2021-03-27","Desc":"无窗小程序(C++语言)-读写TXT记事本及获取当前系统信息","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginComDll_Update.pid","MD5":"99F20406088AA15E6C651781B37F3E99","Version":"2.1.3.1","Size":557056,"HideIns":0,"Type":1,"Cookie":"","Auth":"","TK":"53967949EC1D2498B0A3E8532AEF6BB4A63AC1340917B8A8F638043A01E4229019D3DB447FA9AE90C66FC6E2F50E71CC763EA44687D8B49DAE8D3E0484F11C79E155631163F2C948D167A84E20BF9F4F3D0B82E645F06BEFBFA7FB04B55D35A4FAC0C6B26585EEA75C3814321EE696EF3383F887259FBCA0AC5B82273F9AE4399442F5FF4C44D1A6F2FEE03AF51D2081C0A2EE6980D6DE0F1ED54B83BD5A8CEEE707A4A31BD73C67E87B2F32E13B22C0F502C3EFE9F9421516EA6BE2E10C769C562C362BBF8E783BE97DB0A0B886011086C9DE6CE359AC52A070DAAF1F9E68263A15F1F6500C079229C4726897714ECF7EC40930A46CC526A78B9064A4E97813"}}
{"req":"Plugin_Update","rid":1,"para":{"Name":"弹窗小程序范例(C++语言)","PID":"PluginWinExe","Date":"2021-03-27","Desc":"弹窗小程序(C++语言)-演示脚本请求打开指定网站","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginWinExe_Update.pid","MD5":"FCDC612547583BE889B27E5621598AEB","Version":"2.1.3.1","Size":622592,"HideIns":0,"Type":2,"Cookie":"","Auth":"","TK":"4299DAD320535A457B337202EC9126A5E26936F4B6DC5D4A9676919E753C984CD8089C6BC34F2AF9DFF4590C6FABF35BE628AAD4205A22A0CDBB13BEDF2F0674B312765E8460157E0686636F047C3F8281B59BCBAB6D7A9B25F1FCF545AFB708DF4270A9540749F86A300C917017BB8699443713AD6DB1A496A9FE6D0CAECDB2286ADFBFA4E0E0D6E4B495422DA7D6390933BB8F5E25496BBDC61D8D933B2B44FF468722CE4AD4D14637F282BC5877110D92E7D15795EB8B79F169F805C9E03167E5EBB927ED8A99F2760C7DF8AAF1566C9DD858F3FAC6DFB2E7EC0F73D7AC0965131721C50F92AA72383FE6DE8460BAC4E8E2D7B3607EF18D1B4A0D86A3EEC6"}}
{"req":"Plugin_Update","rid":1,"para":{"Name":"DLL小程序范例(C#语言)","PID":"D10495F4-DF0F-44FA-8647-91275347214A","Date":"2021-03-27","Desc":"无窗口小程序范例(C#语言)","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginNetDll_Update.pid","MD5":"4F843C23DB02FB5E697ECE0A00DC8CCB","Version":"2.1.3.1","Size":393216,"HideIns":0,"Type":1,"Cookie":"","Auth":"","TK":"4DE2287086CE47C581DD9AF4374EA5F657AFD6D6C6908CAA818D3D3FC121BB2EDA41039A3840F921B1B3CC0D38FEEE9CA5EE9428377F1748C8ED44996E6ECBC4322E5AB04DE169CBBD8F8E6C2ECF088C718DC8C04E3B8D35A66D642D819F4BF3B4904B5DFFEDCE018DFA05422804C8E21F4FBDFB265ED3EF9C65E81195793228E36363388D1DC5A8A87C840AB5248BA49109892174B0C397778C9CB2A36A0E8D0FDC7FE3A94AAADE0C2271D4CA2D8C1FF19084D051DCE3315227BA9E140AEA1E201F4E4166534E5538A8271148270E50D792B04A0F2EB852926BABD6C8E84FF8B842D5B4E1A5D3BF85CE60362EA6673B553A2F95C461E8DAFF0D8372032B9EE0"}}
{"req":"Plugin_Update","rid":1,"para":{"Name":"弹窗小程序范例(C#语言)","PID":"PluginExeDemo","Date":"2021-03-27","Desc":"弹窗小程序范例(C#语言)-演示脚本请求打开指定网站","DownAddr":"http://local.zorrosoft.com/Files/Net/PluginExeDemo_Update.pid","MD5":"5A3BFD0DB3E824A0CC7A5E9F65EF375A","Version":"2.1.3.1","Size":622592,"HideIns":0,"Type":2,"Cookie":"","Auth":"","TK":"BA3915DE669E925992E2AA01D7FC114EEF59766A898FB5B502FC5D4DEE461A41BDAF1BC130D936BB5AF5B35275FB18DBA4C59D144952764345F376886ECFF45612C93BE098CB8CB8E3E26649E9FBC2BF5AAF343484FE9A68D4D91FE215BBB65A584CF988B6DA3EB89FC4F3C18ACA06DD1BE1E11D9CE0ED8E232FF47F935619710AB5AE40DA7F90BB2448EFF9C323AC297B9A4B4668DA6FB0D23AEEE4A37E87CC862B84EA58262577814FEB4FD15103C75E5796618F60106AAB642A261E16C4BA57055BC5222822DE5C985E33504DA00DD0003B23B6B5D09378B91350DE01E4447523EB20B19DF8C21521519EAC7242639F652A23053D82FE0974001F4E3AD254"}}
17)、卸载小程序:
举例:
{"req":"Plugin_Remove","rid":50,"para":{"PID":"99225C6D-B7A3-441c-AEFB-3EE23ACA2209","Type":2}}
{"req":"Plugin_Remove","rid":51,"para":{"PID":"F90B1CF0-8485-40ec-B4E8-B87598AAB35D","Type":2}}
{"req":"Plugin_Remove","rid":52,"para":{"PID":"A22E18F1-95F8-4FDB-99D2-188E5FB12B23","Type":1}}
{"req":"Plugin_Remove","rid":53,"para":{"PID":"D10495F4-DF0F-44FA-8647-91275347214A","Type":1}}
18)、前端请求卸载中间件:
正式版需要添加TK校验,具体规则请参考SDK包中文档“PluginOK中间件安全解决方案.doc”,可在SDK包中的打包程序ZbaPackage.exe的中间件维护生成带TK的请求。
举例:
{"req":"Wrl_Remove","rid":22,"para":{}}
说明:连接主服务后可执行;
19)、移除本机中间件授权并卸载程序:
正式版需要添加TK校验,具体规则请参考SDK包中文档“PluginOK中间件安全解决方案.doc”,可在SDK包中的打包程序ZbaPackage.exe的中间件维护生成带TK的请求。
举例:
{"req":"Wrl_RemoveAuth","rid":23,"para":{}}
说明:连接主服务后可执行;
4、PluginOK(牛插)中间件升级请求:
{"req":"Wrl_Update","rid":1,"para":{"Name":"BrowserApplet升级包","Date":"2021-03-30","Desc":"1、实现在浏览器网页中内嵌窗口小程序运行,支持同时加载多个运行,支持上下左右滚动小程序;2、实现在Chrome、Firefox、Edge、Opera、IE、360、QQ等浏览器加载IE指定版本内核的控件小程序或标签小程序运行;3、发布在主流浏览器中可内嵌运行的微软Office及金山WPS小程序...","DownAddr":"http://local.zorrosoft.com/Files/Update/Zba_Update.pid","MD5":"268BC584F9A10539CCBC35C08A4C3354","Version":"2.1.3.1","Size":15499264,"HideIns":0,"Cookie":"","Auth":"","TK":"46D82B2A0A7A25ABCB1E0AEF5F4751C8B3727A0686E7B40EBABD7C7583FEB8C3D5ADA3F32AAE84C3E2C45F543EA95A053A9F608A1A9CE430D6ABD2C34F5C09F1435730FF6F465448106CD9469A56BF05A88502ED40D6EF310D549A22011745BFFEF79AD9BC5CFE0ECD3549827EBC0C33B3B8B7341CAC2A1325181A95DB877794B0FEF9E6380A7DE0019DF734460CBA30F82E5FC67010E0B945B9C1CB36A66C1879FF94EE0B7FBB9FAB8B4B5F83C1478878626DB21D0A2FE5B60202160D15A3002BF236074291E8976C16ED009BC4A821AE6F67DA7AA43C1442751D32574DE8035BFCCEF0DE70CE15C5CCE5BCAD81A60A92FFA2292A3E37B23B1A7433E836ACC2"}}
5、请求启动弹窗小程序(C++语言)服务,下面以IE控件(ActiveX)演示调用流程及范例:
1)、打开测试网页,输入连接地址:
ws://wrl.zorrosoft.com:83?sid=321&pid=PluginWinExe&flag=1
执行连接,会直接启动PluginWinExe.exe程序,界面会返回小程序使用的端口,默认12800;
2)、再次打开一个测试网页,输入连接地址:
ws://wrl.zorrosoft.com:12800?sid=888&flag=1
执行连接,小程序会提示有新连接;
3)、请求打开指定网站:
在测试网页中输入内容:
{"req":"Demo_OpenUrl","rid":1,"para":{"url" : "http://www.baidu.com"}}
然后点击发送,小程序PluginWinExe.exe会自动打开指定的网页
4)、将连接pid替换为PluginExeDemo,可以测试C#版实现的类似小程序功能,默认侦听端口是12900。
6、请求启动无窗口小程序(C++语言)服务:
1)、打开测试网页,输入连接地址:
ws://wrl.zorrosoft.com:83?sid=666&pid=C38672FA-B5C8-4D9D-89B5-2D71F0760661&flag=1
连接请求指定pid的服务;
2)、发送框输入内容以下内容并发送,实现写入内容到我的文档目录记事本文件中:
{"req":"Demo_WriteFile","rid":20,"para":{"Name" : "文件小程序.txt","Content" : "这是测试写入的内容!"}}
3)、发送框输入内容以下内容并发送,实现写读取指定文件内容:
{"req":"Demo_ReadFile","rid":21,"para":{"Name" : "文件小程序.txt"}}
7、请求启动无窗口小程序(C#语言)服务,连接地址:
ws://wrl.zorrosoft.com:83?sid=666&pid=FCADA8A7-D975-42c6-B5D3-FA40F6FE1286&flag=1
其它步骤参考 无窗口小程序(C++语言)。
8、请求启动弹窗小程序(C#语言)服务,连接地址:
ws://wrl.zorrosoft.com:83?sid=666&pid=PluginExeDemo&flag=1
其它步骤参考 弹窗小程序(C++语言)。
请求参数的JSON数据包,请确保是UTF-8无签名的编码。如还有疑问,联系在线客服提供技术支持服务