소스 검색

增加部分功能

sandm 2 년 전
부모
커밋
e331b86661
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      app/common/controller/Auth.php
  2. 4 4
      public/static/js/register.js

+ 1 - 1
app/common/controller/Auth.php

@@ -71,7 +71,7 @@ class Auth extends BaseController
                 }
                 }
                 if($this->request['domainImg']){
                 if($this->request['domainImg']){
                     $upload_result2 = $uploadapi->uploadOne($this->request->file('domainImg'),'image');
                     $upload_result2 = $uploadapi->uploadOne($this->request->file('domainImg'),'image');
-                    if($upload_result->code == 500){
+                    if($upload_result2->code == 500){
                         return \StrUtil::back($upload_result2,"Register.epCallBack");
                         return \StrUtil::back($upload_result2,"Register.epCallBack");
                     }
                     }
                     $domainImg = $upload_result2->filepath;
                     $domainImg = $upload_result2->filepath;

+ 4 - 4
public/static/js/register.js

@@ -2,7 +2,7 @@ var Register = {
     registData: {},
     registData: {},
     validateFields: {
     validateFields: {
         username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
         username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
-        name: {validators: {notEmpty: {message: '单位名称不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{2,4}$/,message:"单位名称只允许中文"}}},
+        name: {validators: {notEmpty: {message: '单位名称不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,100}$/,message:"单位名称只允许中文"}}},
         idCard: {validators: {notEmpty: {message: '社会信用代码不能为空'}}},
         idCard: {validators: {notEmpty: {message: '社会信用代码不能为空'}}},
         agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
         agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
         agentPhone: {
         agentPhone: {
@@ -16,7 +16,7 @@ var Register = {
             }
             }
         },
         },
         verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
         verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
-        legal: {validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{2,4}$/,message:"法人代表只允许中文"}}},
+        legal: {validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,50}$/,message:"法人代表只允许中文"}}},
         street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
         street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
         address: {validators: {notEmpty: {message: '单位地址不能为空'}}},
         address: {validators: {notEmpty: {message: '单位地址不能为空'}}},
         ephone: {
         ephone: {
@@ -128,7 +128,7 @@ Register.enterpriseUserRegister = function() {
         Feng.info("请填写单位名称!");
         Feng.info("请填写单位名称!");
         return;
         return;
     }
     }
-    if(!/^[\u4e00-\u9fa5]{2,4}$/.test(name)){
+    if(!/^[\u4e00-\u9fa5]{1,100}$/.test(name)){
         Feng.info("单位名称只能输入中文 !");
         Feng.info("单位名称只能输入中文 !");
         return;
         return;
     }
     }
@@ -172,7 +172,7 @@ Register.enterpriseUserRegister = function() {
         Feng.info("请填写法人代表!");
         Feng.info("请填写法人代表!");
         return;
         return;
     }
     }
-    if(!/^[\u4e00-\u9fa5]{2,4}$/.test(legal)){
+    if(!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)){
         Feng.info("法人代表只能输入中文 !");
         Feng.info("法人代表只能输入中文 !");
         return;
         return;
     }
     }