Przeglądaj źródła

注册O2云账号增加邮件

unknown 4 lat temu
rodzic
commit
a17b9fb493

+ 11 - 1
o2web/source/x_component_Collect/$Main/default/css.wcss

@@ -5,7 +5,7 @@
         "background-color": "#f1f1f1",
         "background-color": "#f1f1f1",
         "box-shadow": "0px 0px 10px #cccccc",
         "box-shadow": "0px 0px 10px #cccccc",
         "width": "800px",
         "width": "800px",
-        "height": "500px",
+        "height": "520px",
         "-webkit-user-select": "none",
         "-webkit-user-select": "none",
         "-moz-user-select": "none"
         "-moz-user-select": "none"
     },
     },
@@ -44,6 +44,10 @@
         "height": "440px",
         "height": "440px",
         "display": "none"
         "display": "none"
     },
     },
+    "registerContentNode": {
+        "height": "460px",
+        "display": "none"
+    },
 
 
     "statusConnectNode": {
     "statusConnectNode": {
         "height": "80px",
         "height": "80px",
@@ -352,6 +356,12 @@
         "background": "url("+"../x_component_Collect/$Main/default/icon/icon_phone.png) center center no-repeat",
         "background": "url("+"../x_component_Collect/$Main/default/icon/icon_phone.png) center center no-repeat",
         "float": "left"
         "float": "left"
     },
     },
+    "registerMailIconNode": {
+        "width": "60px",
+        "height": "40px",
+        "background": "url("+"../x_component_Collect/$Main/default/icon/icon_mail.png) center center no-repeat",
+        "float": "left"
+    },
     "registerCodeIconNode": {
     "registerCodeIconNode": {
         "width": "60px",
         "width": "60px",
         "height": "40px",
         "height": "40px",

BIN
o2web/source/x_component_Collect/$Main/default/icon/icon_mail.png


+ 22 - 2
o2web/source/x_component_Collect/Main.js

@@ -72,7 +72,7 @@ MWF.xApplication.Collect.Main = new Class({
         this.modifyContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.modifyContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.modifyPwdContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.modifyPwdContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.deleteContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.deleteContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
-        this.registerContentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
+        this.registerContentNode = new Element("div", {"styles": this.css.registerContentNode}).inject(this.node);
 
 
         this.check = new MWF.xApplication.Collect.Check(this);
         this.check = new MWF.xApplication.Collect.Check(this);
         this.showContent("checkContentNode");
         this.showContent("checkContentNode");
@@ -507,6 +507,9 @@ MWF.xApplication.Collect.RegisterForm = new Class({
         this.mobileNode = this.createNode("registerMobileIconNode", "mobile");
         this.mobileNode = this.createNode("registerMobileIconNode", "mobile");
         this.mobileInput = this.mobileNode.getElement("input");
         this.mobileInput = this.mobileNode.getElement("input");
 
 
+        this.mailNode = this.createNode("registerMailIconNode", "mail");
+        this.mailInput = this.mailNode.getElement("input");
+
         this.codeNode = this.createNode("registerCodeIconNode", "code");
         this.codeNode = this.createNode("registerCodeIconNode", "code");
         this.codeInput = this.codeNode.getElement("input");
         this.codeInput = this.codeNode.getElement("input");
 
 
@@ -614,6 +617,7 @@ MWF.xApplication.Collect.RegisterForm = new Class({
         this.setInputNodeEvent(this.usernameNode, this.usernameInput, this.lp.username, this.lp.errorUsername, "username");
         this.setInputNodeEvent(this.usernameNode, this.usernameInput, this.lp.username, this.lp.errorUsername, "username");
         this.setInputNodeEvent(this.passwordNode, this.passwordInput, this.lp.password, this.lp.errorPassword, "password");
         this.setInputNodeEvent(this.passwordNode, this.passwordInput, this.lp.password, this.lp.errorPassword, "password");
         this.setInputNodeEvent(this.mobileNode, this.mobileInput, this.lp.mobile, this.lp.errorMobile, "mobile");
         this.setInputNodeEvent(this.mobileNode, this.mobileInput, this.lp.mobile, this.lp.errorMobile, "mobile");
+        this.setInputNodeEvent(this.mailNode, this.mailInput, this.lp.mail, this.lp.errorMail, "mail");
         this.setInputNodeEvent(this.codeNode, this.codeInput, this.lp.code, this.lp.errorCode, "code");
         this.setInputNodeEvent(this.codeNode, this.codeInput, this.lp.code, this.lp.errorCode, "code");
         this.resetCodeNode();
         this.resetCodeNode();
     },
     },
@@ -638,14 +642,16 @@ MWF.xApplication.Collect.RegisterForm = new Class({
     register: function(){
     register: function(){
         var user = this.usernameInput.get("value");
         var user = this.usernameInput.get("value");
         var mobile = this.mobileInput.get("value");
         var mobile = this.mobileInput.get("value");
+        var mail = this.mailInput.get("value");
         var code = this.codeInput.get("value");
         var code = this.codeInput.get("value");
         var password = this.passwordInput.get("value");
         var password = this.passwordInput.get("value");
 
 
-        if (this.usernameVerification() & this.mobileVerification() & this.codeVerification() & this.passwordVerification()){
+        if (this.usernameVerification() && this.mobileVerification() && this.mailVerification() && this.codeVerification() && this.passwordVerification()){
             this.registering();
             this.registering();
             var data = {
             var data = {
                 codeAnswer: code,
                 codeAnswer: code,
                 mobile: mobile,
                 mobile: mobile,
+                mail: mail,
                 name: user,
                 name: user,
                 password: password
                 password: password
             };
             };
@@ -745,6 +751,20 @@ MWF.xApplication.Collect.RegisterForm = new Class({
             return false;
             return false;
         }
         }
         return true;
         return true;
+    },
+    mailVerification: function(){
+        var mail = this.mailInput.get("value");
+        if (!mail || mail==this.lp.mail){
+            this.errorInput(this.mailNode, this.lp.errorMail);
+            return false;
+        }
+
+        var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
+        if (!reg.test(mail)){
+            this.errorInput(this.mailNode, this.lp.errorMail);
+            return false;
+        }
+        return true;
     }
     }
 });
 });
 MWF.xApplication.Collect.ModifyForm = new Class({
 MWF.xApplication.Collect.ModifyForm = new Class({

+ 2 - 0
o2web/source/x_component_Collect/lp/zh-cn.js

@@ -34,6 +34,7 @@ MWF.xApplication.Collect.LP = {
     "username": "账户名称",
     "username": "账户名称",
     "password": "password",
     "password": "password",
     "mobile": "手机号码",
     "mobile": "手机号码",
+    "mail": "电子邮件",
     "code": "验证码",
     "code": "验证码",
     "secret": "推送消息secret",
     "secret": "推送消息secret",
     "key": "推送消息key",
     "key": "推送消息key",
@@ -47,6 +48,7 @@ MWF.xApplication.Collect.LP = {
     "errorPassword": "请输入密码",
     "errorPassword": "请输入密码",
     "errorPasswordRule": "密码太简单了,至少8位数值和字母组合",
     "errorPasswordRule": "密码太简单了,至少8位数值和字母组合",
     "errorMobile": "手机号码输入有误",
     "errorMobile": "手机号码输入有误",
+    "errorMail": "电子邮件输入有误",
     "errorCode": "验证码输入有误",
     "errorCode": "验证码输入有误",
     "loginError": "登录O2云失败,请检查账户名称和密码",
     "loginError": "登录O2云失败,请检查账户名称和密码",