ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## 设置控件是否响应滑动事件 ``` // 0:允许滑动手势切换子页面,1:禁止滑动手势切换子页面 只能在appcan.ready(function () {})里执行 setMultilPopoverFlippingEnbaled ``` ## 订阅一个频道 ``` appcan.window.subscribe('3',function(msg){ if (msg == 'guan') { uexWindow.setMultilPopoverFlippingEnbaled(0) } else if(msg == 'kai'){uexWindow.setMultilPopoverFlippingEnbaled(1) }; }); ``` ## 打开一个页面 ``` appcan.openWinWithUrl('Mystarch','Mystarch.html') ``` ``` appcan.window.open({ name:'MyConcerned', dataType:0, /// 数据的格式 是HTML页面 aniId:5, data:'MyConcerned.html' }); ``` thisuser_realname ## 关闭当前的窗口 ``` appcan.window.close(-1) ``` ``` appcan.window.close({ aniId:17, animDuration:1000 }); ``` ## 向指定的信道发布消息 ``` // channelId:发送指定消息的通道 msg:要发送的消息内容 appcan.window.publish("1",'shuack'); ``` 向指定频道发送消息 ``` ## 退出登录后关闭所有的页面 ``` appcan.ready(function() { //alert(appcan.locStorage.val("selectNzwzl_id")); appcan.window.subscribe('1',function(msg){ console.log('这是index2'+msg); appcan.window.close(-1); }); }); appcan.window.publish("1",'hello'); ```