説明なし

setup.js 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //设置
  2. mui.ready(function() {
  3. /*定义全局变量*/
  4. var removeId = document.getElementById("removeid");
  5. var security = document.getElementById("security");
  6. var userAgreement = document.getElementById("userAgreement");
  7. var about = document.getElementById("about");
  8. var kefu = document.getElementById("kefu");
  9. /*账户与安全*/
  10. security.addEventListener('tap',function(){
  11. plus.nativeUI.showWaiting();//显示原生等待框
  12. webviewShow = plus.webview.create("../html/security.html","../html/security.html");
  13. });
  14. /*关于科袖*/
  15. about.addEventListener('tap',function(){
  16. mui.openWindow({
  17. url: '../html/aboutus.html',
  18. id: '../html/aboutus.html',
  19. show: {
  20. aniShow: "slide-in-right"
  21. }
  22. });
  23. });
  24. /*用户协议*/
  25. userAgreement.addEventListener('tap',function(){
  26. mui.openWindow({
  27. url: '../html/privacy.html',
  28. id: '../html/privacy.html',
  29. show: {
  30. aniShow: "slide-in-right"
  31. }
  32. });
  33. });
  34. /*退出按钮*/
  35. removeId.addEventListener('tap', function() {
  36. var btn = ["退出", "取消"];
  37. mui.confirm("是否退出", "提示", btn, function(e) {
  38. if(e.index == 0) {
  39. plus.storage.removeItem("userid");
  40. //plus.cache.clear();
  41. //plus.storage.clear();
  42. var userId = "null";
  43. mui.currentWebview.close();
  44. mui.back();
  45. var myaccountPage = plus.webview.getWebviewById('html/myaccount.html');
  46. mui.fire(myaccountPage, 'closeUser', {
  47. id: userId
  48. });
  49. }
  50. });
  51. });
  52. /*客服帮助*/
  53. kefu.addEventListener('tap',function(){
  54. mui.openWindow({
  55. url: '../html/kefuhelp.html',
  56. id: '../html/kefuhelp.html',
  57. show: {
  58. aniShow: "slide-in-right"
  59. }
  60. });
  61. });
  62. });