1app.controller("ctrlArea",function($scope,$http,qrcodeLogin,common,$rootScope){ 2 $scope.isLoginType = 'password'; //ç»å½æ¹å¼ï¼qrcodeäºç»´ç ï¼passwordå¯ç ç»å½ 3 $scope.qrLogin = qrcodeLogin; 4 $rootScope.common = common; 5 $rootScope.common.getCart(); // 1åé¾ 2徿 6 7 $scope.isLoginTypeFun = function(key){ 8 $scope.isLoginType = key 9 $scope.qrLogin.closeOpen(); 10 if(key == 'qrcode'){ 11 $scope.qrLogin.isOpen(); 12 } 13 } 14 15 $scope.error = { 16 account:'', 17 password:'', 18 verfiyCode:false 19 } 20 $scope.error_verfiy = false; 21 $scope.autoLogin = true; 22 $scope.account = ''; 23 $scope.password = ''; 24 $scope.autoFun = function(){ 25 $scope.autoLogin = $scope.autoLogin?false:true; 26 } 27 $scope.changeAccount = function() { 28 if ($scope.account=='') { 29 $scope.error.account = '请è¾å ¥å¸å·'; 30 return false; 31 } else { 32 $scope.error.account = ''; 33 return true 34 } 35 } 36 $scope.changePass = function(){ 37 if($scope.password==''){ 38 $scope.error.password = '请è¾å ¥å¯ç '; 39 return false; 40 }else{ 41 $scope.error.password = ''; 42 return true; 43 } 44 } 45 $scope.beginLogin = function(obj){ 46 var ac = $scope.changeAccount(); 47 var pa = $scope.changePass(); 48 if(!obj)return; 49 if(ac && pa) { 50 var geetest_challenge = $('input[name=geetest_challenge]').val(); 51 var geetest_validate = $('input[name=geetest_validate]').val(); 52 var geetest_seccode = $('input[name=geetest_seccode]').val(); 53 if(!geetest_challenge || !geetest_validate || !geetest_seccode){ 54 showVerfiyMsg(); 55 return; 56 } 57 var arg = { 58 account:$scope.account,password:$scope.password,autologin:$scope.autoLogin, 59 geetest_challenge:geetest_challenge,geetest_validate:geetest_validate,geetest_seccode:geetest_seccode 60 } 61 $http.get(memberUrl('/user/logined',arg)).success(function(data){ 62 if(data.statusCode!=200){ 63 if(obj)obj.reset(); 64 } 65 switch(data.statusCode){ 66 case 200: 67 $scope.cokie = getCookie('newUser'); 68 window.location.href = referer; 69 break; 70 case 508: 71 showVerfiyMsg(); 72 break; 73 default : 74 $scope.error.account= data.message 75 break; 76 } 77 }).error(function(error){ 78 httpError(error); 79 }) 80 } 81 } 82 var showVerfiyMsg = function(){ 83 $("#notice")[0].className = "help-block text-red has-icon-error"; 84 setTimeout(function () { 85 $("#notice")[0].className = "hidden"; 86 }, 2000); 87 } 88 var handlerEmbed = function (captchaObj) { 89 $("#embed-submit").click(function (e) { 90 var validate = captchaObj.getValidate(); 91 if (!validate) { 92 showVerfiyMsg(); 93 e.preventDefault(); 94 } else { 95 $scope.beginLogin(captchaObj); 96 } 97 }); 98 // å°éªè¯ç å å°id为captchaçå ç´ éï¼åæ¶ä¼æä¸ä¸ªinputçå¼ï¼geetest_challenge, geetest_validate, geetest_seccode 99 captchaObj.appendTo("#embed-captcha"); 100 captchaObj.onReady(function () { 101 $("#wait")[0].className = "hidden"; 102 }); 103 captchaObj.on 104 // æ´å¤æ¥å£åèï¼http://www.geetest.com/install/sections/idx-client-sdk.html 105 }; 106 $http.get(indexUrl('/Geetest/getverfiy',{t:(new Date()).getTime()})).success(function(data){ 107 initGeetest({ 108 gt: data.gt, 109 challenge: data.challenge, 110 new_captcha: data.new_captcha, 111 product: "embed", // 产åå½¢å¼ï¼å æ¬ï¼floatï¼embedï¼popupãæ³¨æåªå¯¹PCçéªè¯ç ææ 112 offline: !data.success // è¡¨ç¤ºç¨æ·åå°æ£æµæéªæå¡å¨æ¯å¦å®æºï¼ä¸è¬ä¸éè¦å ³æ³¨ 113 // æ´å¤é ç½®åæ°è¯·åè§ï¼http://www.geetest.com/install/sections/idx-client-sdk.html#config 114 }, handlerEmbed); 115 }).error(function(error){ 116 httpError(error); 117 });
118}) 119 120//è·åcokieä¸åå ¥çå¼ 121function getCookie(c_name) { 122 if (document.cookie.length > 0) { 123 c_start = document.cookie.indexOf(c_name + "=") 124 if (c_start != -1) { 125 c_start = c_start + c_name.length + 1 126 c_end = document.cookie.indexOf(";", c_start) 127 if (c_end == -1) c_end = document.cookie.length 128 return unescape(document.cookie.substring(c_start, c_end)) 129 } 130 } 131 return "" 132} 133
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.