1.api.openFrameGroup 窗口系統
打開frame組
若frame組已存在,則會把該frame組顯示到最前面。frame組打開後,當前頁面加載完成後,頁面會預加載後面指定個數頁面
場景:歡迎頁加載
2.api.openFrame 窗口系統
打開 frame
若 frame 已存在,則會把該窗口顯示到最前面並顯示,如果 url 和之前的 url 有變化,或者 reload 爲 true 時,頁面會刷新
此方法對 frameGroup 裏面的 frame 不起作用
場景:打開除頭部和底部的頁面
3api.setFrameAttr 窗口系統
設置frame屬性
場景:設置其餘頁面隱藏
4.api.sendEvent 消息事件
將任意一個自定義事件廣播出去,該事件可在任意頁面通過 addEventListener 監聽收到。
場景:地址變化監聽
5.api.addEventListener 消息事件
監聽事件,支持系統事件和自定義事件
6$api.getStorage('') $api.setStorage('city', '北京')
$api.addCls()
$api.removeCls()
https://docs.apicloud.com/Front-end-Framework/framework-dev-guide
$api是apicloud的js框架,類似jquery中的$
api是指apicloud的端api對象
h5js緩存
7.api.closeWidget 應用管理
關閉指定widget,也可以關閉應用
場景:退出應用
8, <div class="swipe-page-item open-win" win="shoplist" param='{"type":0,"shopType":-1}'>
<img src="../image/swipe/around.png">
<span>周邊</span>
</div>
跳轉
9. api.setFrameGroupIndex 窗口系統
設置 frame 組當前可見 frame
場景:切換tab