apicloud實現APP首次下載安裝開啟的引導頁面
阿新 • • 發佈:2019-01-25
引導頁由 guide_win.html 和 guide_frm.html 兩部分組成。
第一部分:guide_win.html
第二部分:guide_frm.htmlapiready = function() { api.parseTapmode(); var showGuide = $api.getStorage('showGuide'); //判斷條件 if (!showGuide) { openGuide();//首次下載安裝操作 } else { openWelcome();//不是首次操作 } } //開啟引導頁 function openGuide() { api.openFrame({ name: 'guide_frm', url: './guide_frm.html', bounces: false, rect: { x: 0, y: 0, w: 'auto', h: 'auto' } }); } //開啟啟動頁 function openWelcome() { api.openWin({ name: 'welcomePage_win', url: './welcomePage.html', slidBackEnabled: false }); }
$('#letGo').on('click', function() {
$api.setStorage('showGuide', '1');//設定值
api.openWin({
name: 'welcomePage_win',
url: './welcomePage.html',
slidBackEnabled: false
});
})