"use strict";$(document).ready(pageReady);var REG={email:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,pswd:/^[a-zA-Z0-9!@#$%^&*]{6,16}$/},server="";function pageReady(){var n=$("#emailIn"),a=$("#pswdIn"),s=($("#submitIn"),$("#formIn"));n.on("blur",checkValue(matchEmail)),n.on("focus",rmValidationClass),a.on("blur",checkValue(matchLength)),a.on("focus",rmValidationClass),s.on("submit",function(n){n.preventDefault(),$.ajax({type:"POST",url:"/login",contentType:"application/x-www-form-urlencoded",data:s.serialize(),success:function(n){console.log(n)},error:function(n){console.error(n)}})});var i=$("#emailUp"),e=$("#nameUp"),t=$("#pswdUp"),o=($("#enPwsdUp"),$("#valCode")),l=$("#sendValCode"),r=$("#submitUp");i.on("blur",function(){$.ajax({type:"POST",url:server+"/api/isExist",data:JSON.stringify({emila:i.val()}),dataType:"json",contentType:"application/json",success:function(n){console.log(n)},error:function(n){console.error(n)}})}),i.on("focus",rmValidationClass),e.on("blur",checkValue(isNotEmptyForm)),e.on("focus",rmValidationClass),t.on("blur",checkValue(matchPswd)),l.on("click",function(n){n.preventDefault(),$.ajax({type:"GET",url:server+"/api/getValCode",dataType:"json",success:function(a){console.log(a),a=JSON.parse(a).valCode,o.on("blur",function(){var n=o.val();a===n?$(this).addClass("is-valid"):$(this).addClass("is-invalid")}),dealEmailCountingDown(l,function(n){n.addClass("disabled").attr("disabled","true")},function(n){n.removeClass("disabled").removeAttr("disabled")}),o.on("focus",function(){o.hasClass(".is-valid")&&o.removeClass(".is-valid"),o.hasClass("is-invalid")&&o.removeClass(".is-invalid")})},error:function(n){console.error(n)}})}),r.on("click",function(n){n.preventDefault(),$.ajax({type:"POST",url:server+"/api/signup",data:JSON.stringify({email:i.val(),name:e.val(),pswd:t.val()}),dataType:"json",contentType:"application/json",success:function(n){console.log(n)},error:function(n){console.error(n)}})})}function rmValidationClass(){$(this).hasClass(".is-valid")&&$(this).removeClass(".is-valid"),$(this).hasClass("is-invalid")&&($(this).removeClass(".is-invalid"),$(this.nextElementSibling).css({display:"none"}))}function addValidationClass(n){}function checkValue(a){return function(){var n=$(this).val();a(n)?$(this).addClass("is-valid"):$(this).addClass("is-invalid")}}function matchEmail(n){return n.split(/\s*, \s*/g).every(function(n){return REG.email.test(n)})}function matchLength(n,a,s){return a=a||6,s=s||16,n.length>=a&&n.length<=s}function isNotEmptyForm(n){return 0!==n.length}function matchPswd(n){return REG.pswd.test(n)}function dealEmailCountingDown(n,a,s){n=n instanceof $?n:$(n),a&&a instanceof Function&&a(n),countingDown(n,60,s)()}function countingDown(a,s,i){return function(){s-=1,$(a).text(s+"秒后重新获取验证码");var n=null;0!==s?n=setTimeout(countingDown($(a),s,i),1e3):(clearTimeout(n),$(a).text("获取邮箱验证码"),i&&i instanceof Function&&i(a))}}
@@ -287,17 +287,17 @@
 swdIn%22),
-s
+i
 =($(%22#su
@@ -456,17 +456,17 @@
 nClass),
-s
+i
 .on(%22sub
@@ -527,16 +527,20 @@
 %22,url:%22/
+api/
 login%22,c
@@ -591,17 +591,17 @@
 d%22,data:
-s
+i
 .seriali
@@ -685,17 +685,17 @@
 )%7D);var 
-i
+s
 =$(%22#ema
@@ -801,17 +801,17 @@
 mitUp%22);
-i
+s
 .on(%22blu
@@ -897,17 +897,17 @@
 (%7Bemila:
-i
+s
 .val()%7D)
@@ -1030,17 +1030,17 @@
 n)%7D%7D)%7D),
-i
+s
 .on(%22foc
@@ -1878,17 +1878,17 @@
 (%7Bemail:
-i
+s
 .val(),n
@@ -2528,17 +2528,17 @@
 gth(n,a,
-s
+i
 )%7Breturn
@@ -2549,11 +2549,11 @@
 %7C%7C6,
-s=s
+i=i
 %7C%7C16
@@ -2576,17 +2576,17 @@
 length%3C=
-s
+i
 %7Dfunctio
@@ -2706,17 +2706,17 @@
 own(n,a,
-s
+i
 )%7Bn=n in
@@ -2782,17 +2782,17 @@
 wn(n,60,
-s
+i
 )()%7Dfunc
@@ -2811,19 +2811,19 @@
 gDown(a,
-s,i
+i,s
 )%7Breturn
@@ -2834,17 +2834,17 @@
 ction()%7B
-s
+i
 -=1,$(a)
@@ -2849,17 +2849,17 @@
 a).text(
-s
+i
 +%22%E7%A7%92%E5%90%8E%E9%87%8D%E6%96%B0%E8%8E%B7%E5%8F%96
@@ -2879,17 +2879,17 @@
 ull;0!==
-s
+i
 ?n=setTi
@@ -2916,11 +2916,11 @@
 (a),
-s,i
+i,s
 ),1e
@@ -2964,12 +2964,12 @@
 %E7%A0%81%22),
-i&&i
+s&&s
  ins
@@ -2986,15 +2986,15 @@
 nction&&
-i
+s
 (a))%7D%7D

update main.js