No Description

setup.js 842B

123456789101112131415161718192021222324252627282930313233343536
  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. mui.back();
  24. var myaccountPage = plus.webview.getWebviewById('html/myaccount.html');
  25. mui.fire(myaccountPage, 'closeUser', {
  26. id: userId
  27. });
  28. }
  29. });
  30. })
  31. });