Nav apraksta

setup.js 825B

1234567891011121314151617181920212223242526272829303132333435
  1. //设置
  2. mui.ready(function() {
  3. /*定义全局变量*/
  4. var removeId = document.getElementById("removeid");
  5. var security = document.getElementById("security");
  6. security.addEventListener('tap',function(){
  7. mui.openWindow({
  8. url: '../html/security.html',
  9. id: '../html/security.html',
  10. show: {
  11. aniShow: "slide-in-right"
  12. }
  13. });
  14. });
  15. /*退出按钮*/
  16. removeId.addEventListener('tap', function() {
  17. var btn = ["退出", "取消"];
  18. mui.confirm("是否退出", "提示", btn, function(e) {
  19. if(e.index == 0) {
  20. plus.storage.removeItem("userid");
  21. var userId = "null";
  22. mui.currentWebview.close();
  23. var myaccountPage = plus.webview.getWebviewById('html/myaccount.html');
  24. mui.fire(myaccountPage, 'closeUser', {
  25. id: userId
  26. });
  27. }
  28. });
  29. })
  30. });