login.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Namespace.register("U.Control.login"); //登录页面的命名空间
  2. //登录页面
  3. U.Control.login.init = function () {
  4. //外框
  5. var U_L_warp = $$("div", { "className": "U_L_warp" });
  6. var U_L_w_logindiv = $$("div", { "className": "U_L_w_logindiv" }, U_L_warp);
  7. //登录云端
  8. var U_L_w_l_titlediv = $$("div", { "className": "U_L_w_l_titlediv" }, U_L_w_logindiv);
  9. $$("div", { "className": "U_L_w_l_title", "innerHTML": "登录云端" }, U_L_w_l_titlediv);
  10. //注册账号
  11. var U_L_w_l_register = $$("div", { "className": "U_L_w_l_register", "innerHTML": "注册账号>" }, U_L_w_l_titlediv);
  12. //账号
  13. var U_L_w_l_np = $$("div", { "className": "U_L_w_l_np" }, U_L_w_logindiv);
  14. var U_L_w_l_name = $$("div", { "className": "U_L_w_l_name" }, U_L_w_l_np);
  15. $$("div", { "className": "U_L_w_l_n_img" }, U_L_w_l_name);
  16. $$("input", { "className": "U_L_w_l_n_input", "type": "text", "placeholder": "账号/手机号" }, U_L_w_l_name);
  17. //密码
  18. var U_L_w_l_password = $$("div", { "className": "U_L_w_l_password" }, U_L_w_l_np);
  19. $$("div", { "className": "U_L_w_l_p_img" }, U_L_w_l_password);
  20. $$("input", { "className": "U_L_w_l_n_input", "type": "password", "placeholder": "输入您的密码" }, U_L_w_l_password);
  21. //记住密码
  22. var U_L_w_l_mima = $$("div", { "className": "U_L_w_l_mima" }, U_L_w_logindiv);
  23. var U_L_w_l_m_left = $$("div", { "className": "U_L_w_l_m_left" }, U_L_w_l_mima);
  24. $$("input", { "className": "U_L_w_l_m_l_input", "type": "checkbox" }, U_L_w_l_m_left);
  25. $$("span", { "innerHTML": "记住密码" }, U_L_w_l_m_left);
  26. $$("div", { "className": "U_L_w_l_m_right", "innerHTML": "忘记密码?" }, U_L_w_l_mima);
  27. //登录按钮
  28. var U_L_w_l_loginbtn = $$("div", { "className": "U_L_w_l_loginbtn", "innerHTML": "立即登录" }, U_L_w_logindiv);
  29. U_L_w_l_loginbtn.onclick = function () { aa(this); }
  30. //其他方式登陆
  31. var U_L_w_l_other = $$("div", { "className": "U_L_w_l_other" }, U_L_w_logindiv);
  32. $$("div", { "className": "U_L_w_l_o_text", "innerHTML": "使用合作平台登录" }, U_L_w_l_other);
  33. //QQ或微博登录
  34. var U_L_w_l_o_img = $$("div", { "className": "U_L_w_l_o_img" }, U_L_w_l_other);
  35. $$("div", { "className": "U_L_w_l_o_i_weibo" }, U_L_w_l_o_img);
  36. $$("div", { "className": "U_L_w_l_o_i_qq" }, U_L_w_l_o_img);
  37. /*------------注册--------*/
  38. //外框
  39. var U_L_w_registerdiv = $$("div", { "className": "U_L_w_registerdiv"}, U_L_warp);
  40. //标题框
  41. var U_L_w_l_box = $$("div", { "className": "U_L_w_l_box" }, U_L_w_registerdiv);
  42. var U_L_w_l_title = $$("div", { "className": "U_L_w_l_title_A", "innerHTML": "注册云端" }, U_L_w_l_box);
  43. var U_L_w_l_login = $$("div", { "className": "U_L_w_l_login", "innerHTML": "返回登录" }, U_L_w_l_box);
  44. U_L_w_l_register.onclick = function () {
  45. U.Control.login.reg(this, U_L_w_registerdiv);
  46. }
  47. U_L_w_l_login.onclick = function () {
  48. U.Control.login.log(this, U_L_w_logindiv);
  49. }
  50. //注册框
  51. var U_L_w_l_np = $$("div", { "className": "U_L_w_l_np" }, U_L_w_registerdiv);
  52. var U_L_w_l_name = $$("div", { "className": "U_L_w_l_name" }, U_L_w_l_np);
  53. var U_L_w_l_n_img = $$("div", { "className": "U_L_w_l_n_img" }, U_L_w_l_name);
  54. var U_L_w_l_n_input = $$("input", { "className": "U_L_w_l_n_input", "placeholder": "账号/手机号" }, U_L_w_l_name);
  55. //密码框
  56. var U_L_w_l_password = $$("div", { "className": "U_L_w_l_password U_L_w_l_name" }, U_L_w_l_np);
  57. var U_L_w_l_n_imgs = $$("div", { "className": "U_L_w_l_p_img U_L_w_l_n_img" }, U_L_w_l_password);
  58. var U_L_w_l_n_inputs = $$("input", { "className": "U_L_w_l_n_input", "placeholder": "请输入您的密码", "type": "password" }, U_L_w_l_password);
  59. //确认密码
  60. var U_L_w_l_Confirm_password = $$("div", { "className": "U_L_w_l_password U_L_w_l_name" }, U_L_w_l_np);
  61. var U_L_w_l_Confirm_n_imgs = $$("div", { "className": "U_L_w_l_p_img U_L_w_l_n_img" }, U_L_w_l_Confirm_password);
  62. var U_L_w_l_Confirm_n_inputs = $$("input", { "className": "U_L_w_l_n_input", "placeholder": "请确认您的密码", "type": "password" }, U_L_w_l_Confirm_password);
  63. //验证码框
  64. var code = $$("div", { "className": "code" }, U_L_w_registerdiv);
  65. var Verification = $$("input", { "className": "Verification", "placeholder": "输入验证码" }, code);
  66. var codepct = $$("div", { "className": "codepct" }, code);
  67. var Refresh = $$("div", { "className": "Refresh" }, codepct);
  68. //立即注册
  69. var U_L_w_l_registerbtn = $$("div", { "className": "U_L_w_l_registerbtn", "innerHTML": "立即注册" }, U_L_w_registerdiv);
  70. return U_L_warp;
  71. }
  72. function aa() {
  73. return false;
  74. }
  75. U.Control.login.reg = function (a,b) { //去注册
  76. if (document.defaultView.getComputedStyle(a, null).display=="block") {
  77. a.parentNode.parentNode.style.display = "none"
  78. b.style.display = "block";
  79. }
  80. }
  81. U.Control.login.log = function (a,b) { //去登录
  82. if (document.defaultView.getComputedStyle(a, null).display == "block") {
  83. a.parentNode.parentNode.style.display = "none"
  84. b.style.display = "block";
  85. }
  86. }