|
@@ -0,0 +1,380 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html lang="zh">
|
|
|
|
+<head>
|
|
|
|
+ <meta charset="UTF-8" />
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/pcClient/me/css/reset.css?v={{Msg "seo" "version"}}" />
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/font.css?v={{Msg "seo" "version"}}"/>
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/pcClient/me/css/login.css?v={{Msg "seo" "version"}}"/>
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/pcClient/me/css/header.css?v={{Msg "seo" "version"}}"/>
|
|
|
|
+ <script src="/js/jquery.js?v={{Msg "seo" "version"}}" type="text/javascript" charset="utf-8"></script>
|
|
|
|
+ {{include "/common/js.html"}}
|
|
|
|
+ <title>登录ccc</title>
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+ <div id="header">
|
|
|
|
+ <h2>剑鱼助手</h2>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="header-tab">
|
|
|
|
+ <a class="header-tab-active">密码登录</a>
|
|
|
|
+ <a>验证码登录</a>
|
|
|
|
+ <i></i>
|
|
|
|
+ </span>
|
|
|
|
+ <div class="login">
|
|
|
|
+ <div class="pass">
|
|
|
|
+ <lable>手机号码</lable>
|
|
|
|
+ <input type="tel" name="" id="tel" class="tel"/>
|
|
|
|
+ <img class="closeQc" src="/pcClient/images/cancel.png"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="onePass pass">
|
|
|
|
+ <lable>密码</lable>
|
|
|
|
+ <input type="password" id="pwd"/>
|
|
|
|
+ <img class="closeQc" src="/pcClient/images/cancel.png"/>
|
|
|
|
+ <span class="jyapp-icon jyapp-icon-biyan"></span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="pass code">
|
|
|
|
+ <lable>验证码</lable>
|
|
|
|
+ <input type="tel" id="identCode"/>
|
|
|
|
+ <img class="closeQc" src="/pcClient/images/cancel.png"/>
|
|
|
|
+ <span id="sendIdentCode">获取验证码</span>
|
|
|
|
+ </div>
|
|
|
|
+ <button type="button" id="btn" class="disabled btn" />登录</button>
|
|
|
|
+ {{/*<div class="forget">*/}}
|
|
|
|
+ {{/*<a href="javascript:void(0)">忘记密码?</a>*/}}
|
|
|
|
+ {{/*<a href="javascript:void(0)" class="register">立即注册</a>*/}}
|
|
|
|
+ {{/*<div class="clearfix"></div>*/}}
|
|
|
|
+ {{/*</div>*/}}
|
|
|
|
+ <!--微信登录start-->
|
|
|
|
+ <div class="wx">
|
|
|
|
+ <span>
|
|
|
|
+ <img src="/pcClient/images/wx.png">
|
|
|
|
+ <i>微信登录</i>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <!--微信登录end-->
|
|
|
|
+ </div>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ var backToIndex = false;
|
|
|
|
+ var wait = 60;
|
|
|
|
+ var dcsOne = false;
|
|
|
|
+ var bodyWidth = document.body.clientWidth;
|
|
|
|
+ var left_1 = (bodyWidth/2-24) / 2;
|
|
|
|
+ var left_2 = (bodyWidth/2-24) / 2 + bodyWidth / 2;
|
|
|
|
+ var isIos = mySysIsIos();
|
|
|
|
+ $(function(){
|
|
|
|
+ $(".forget>a").on("tap",function(){
|
|
|
|
+ if($(this).index() == 0){
|
|
|
|
+ window.location.href = "/jyapp/free/forgetPwd";
|
|
|
|
+ }else{
|
|
|
|
+ window.location.href = "/jyapp/free/register";
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ $(".header-tab>i").css("left",left_1);
|
|
|
|
+ $(".header-tab>a").on("tap",function(){
|
|
|
|
+ $(".header-tab>a").removeClass("header-tab-active");
|
|
|
|
+ $(this).addClass("header-tab-active");
|
|
|
|
+ if($(this).index() == 0){
|
|
|
|
+ $(".login .onePass").show();
|
|
|
|
+ $(".login .code").css("display","none");
|
|
|
|
+ $(".header-tab>i").css("left",left_1);
|
|
|
|
+ }else{
|
|
|
|
+ $(".login .onePass").hide();
|
|
|
|
+ $(".login .code").css("display","table");
|
|
|
|
+ $(".header-tab>i").css("left",left_2);
|
|
|
|
+ }
|
|
|
|
+ changeBtnStatus();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $("#sendIdentCode").on("tap",function() {
|
|
|
|
+ if(!dcsOne){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var phone = $.trim($("#tel").val());
|
|
|
|
+ if(!Verification.isPhone(phone)){
|
|
|
|
+ EasyAlert.show("手机号格式错误");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var thisClass = this;
|
|
|
|
+ $.post("/jypc/login",{reqType:"sendIdentCode",phone: phone,token: getCipherText(phone)},function(r){
|
|
|
|
+ if(r.status==-1){
|
|
|
|
+ EasyAlert.show("手机号格式错误");
|
|
|
|
+ }else{
|
|
|
|
+ time(thisClass);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ var toutobj = {};
|
|
|
|
+ var tout = null;
|
|
|
|
+ var pwdisfocus = false;
|
|
|
|
+ $("#tel,#pwd,#identCode").bind('input propertychange', function() {
|
|
|
|
+ changeBtnStatus();
|
|
|
|
+ if($(this).val().length>0){
|
|
|
|
+ $(this).next().show();
|
|
|
|
+ }else{
|
|
|
|
+ $(this).next().hide();
|
|
|
|
+ }
|
|
|
|
+ }).focus(function() {
|
|
|
|
+ if(tout != null){
|
|
|
|
+ clearTimeout(tout);
|
|
|
|
+ }
|
|
|
|
+ if(toutobj[$(this).parent().index()] != undefined){
|
|
|
|
+ clearTimeout(toutobj[$(this).parent().index()]);
|
|
|
|
+ }
|
|
|
|
+ if(this.id == "pwd"){
|
|
|
|
+ pwdisfocus = true;
|
|
|
|
+ }
|
|
|
|
+ var thisClass = $(this);
|
|
|
|
+ if(isIos){
|
|
|
|
+ if(this.id == "tel"){
|
|
|
|
+ $("#pwd").prop("disabled",true);
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ $("#pwd").prop("disabled",false);
|
|
|
|
+ },100);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $(this).parent().addClass("input-blur input-blur-a");
|
|
|
|
+ changeBtnStatus();
|
|
|
|
+ if(thisClass.val().length>0){
|
|
|
|
+ thisClass.next().show();
|
|
|
|
+ }else{
|
|
|
|
+ thisClass.next().hide();
|
|
|
|
+ }
|
|
|
|
+ }).blur(function(){
|
|
|
|
+ var thisClass = $(this);
|
|
|
|
+ tout = setTimeout(function(){
|
|
|
|
+ if(thisClass.attr("id") == "pwd"){
|
|
|
|
+ pwdisfocus = false;
|
|
|
|
+ }
|
|
|
|
+ },100);
|
|
|
|
+ toutobj[thisClass.parent().index()] = setTimeout(function(){
|
|
|
|
+ thisClass.next().hide();
|
|
|
|
+ },100);
|
|
|
|
+ $(this).parent().removeClass("input-blur-a");
|
|
|
|
+ if($(this).val() == ""){
|
|
|
|
+ $(this).parents(".pass").removeClass("input-blur");
|
|
|
|
+ }
|
|
|
|
+ changeBtnStatus();
|
|
|
|
+ });
|
|
|
|
+ $(".closeQc").on("tap",function(){
|
|
|
|
+ $(this).prev().val("").focus();
|
|
|
|
+ $(this).hide();
|
|
|
|
+ if(localStorage&&$(this).prev().attr("id")=="tel"){
|
|
|
|
+ localStorage.removeItem("loginPhone");
|
|
|
|
+ }
|
|
|
|
+ changeBtnStatus();
|
|
|
|
+ });
|
|
|
|
+ //点击切换密码显示隐藏
|
|
|
|
+ $(".pass span.jyapp-icon").on(isIos?"tap":"click",function(){
|
|
|
|
+ if($(this).hasClass("jyapp-icon-zhengyan")){
|
|
|
|
+ $(this).parent().find("input").prop("type","password");
|
|
|
|
+ $(this).removeClass("jyapp-icon-zhengyan");
|
|
|
|
+ $(this).addClass("jyapp-icon-biyan");
|
|
|
|
+ }else{
|
|
|
|
+ $(this).parent().find("input").prop("type","text");
|
|
|
|
+ $(this).removeClass("jyapp-icon-biyan");
|
|
|
|
+ $(this).addClass("jyapp-icon-zhengyan");
|
|
|
|
+ }
|
|
|
|
+ if(pwdisfocus){
|
|
|
|
+ $("#pwd").focus();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ //点击登录显示报错弹窗
|
|
|
|
+ $("#btn").on("tap",function(){
|
|
|
|
+ if($(this).hasClass("disabled")){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var phone = $.trim($("#tel").val());
|
|
|
|
+ if($(".header-tab>a.header-tab-active").index() == 0){
|
|
|
|
+ $.post("/jyapp/free/login",{reqType:"phoneLogin",phone:phone,password:$(".onePass input").val(),rid:JyObj.getPushRid()},function(r){
|
|
|
|
+ if(r.status==1){
|
|
|
|
+ if(localStorage){
|
|
|
|
+ localStorage.loginPhone = phone;
|
|
|
|
+ }
|
|
|
|
+ loginSuccess(r);
|
|
|
|
+ }else{
|
|
|
|
+ showTip("手机号或密码错误",1000);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ $.post("/jyapp/free/login",{reqType:"identCodeLogin",phone:phone,identCode:$("#identCode").val(),rid:JyObj.getPushRid()},function(r){
|
|
|
|
+ if(r.status==1){
|
|
|
|
+ if(localStorage){
|
|
|
|
+ localStorage.loginPhone = phone;
|
|
|
|
+ }
|
|
|
|
+ loginSuccess(r);
|
|
|
|
+ }else{
|
|
|
|
+ showTip("验证码错误",1000);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ $(".wx>span").on("tap",function(){
|
|
|
|
+ loginByWeixin();
|
|
|
|
+ });
|
|
|
|
+ if(localStorage&&typeof(localStorage.loginPhone)!="undefined"){
|
|
|
|
+ $("#tel").val(localStorage.loginPhone);
|
|
|
|
+ }
|
|
|
|
+ if($("#tel").val() != ""){
|
|
|
|
+ $("#tel").prev().addClass("none");
|
|
|
|
+ $("#tel").parent().addClass("input-blur");
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ $("#tel").prev().removeClass("none");
|
|
|
|
+ },500);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ function changeBtnStatus(){
|
|
|
|
+ var password = $(".onePass input").val();
|
|
|
|
+ var phone = $.trim($("#tel").val());
|
|
|
|
+ if(phone.length >= 11){
|
|
|
|
+ dcsOne = true;
|
|
|
|
+ if(wait == 60){
|
|
|
|
+ $("#sendIdentCode").css("color","#2cb7ca");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ dcsOne = false;
|
|
|
|
+ $("#sendIdentCode").css("color","#888888")
|
|
|
|
+ }
|
|
|
|
+ if($.trim(phone).length > 0 && Verification.isPhone(phone)){
|
|
|
|
+ if($(".header-tab>a.header-tab-active").index() == 0){
|
|
|
|
+ if($.trim(password).length > 0 && password.length >= 6){
|
|
|
|
+ $("#btn").removeClass("disabled");
|
|
|
|
+ }else{
|
|
|
|
+ $("#btn").addClass("disabled");
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if($.trim($("#identCode").val()).length > 0){
|
|
|
|
+ $("#btn").removeClass("disabled");
|
|
|
|
+ }else{
|
|
|
|
+ $("#btn").addClass("disabled");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ $("#btn").addClass("disabled");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ function loginByWeixin(){
|
|
|
|
+ //var wxSign = "eyJjaXR5Ijoi6YOR5beeIiwiY291bnRyeSI6IuS4reWbvSIsImNyZWF0ZXRpbWUiOjE1MTk0MzY1NDIsImhlYWRpbWd1cmwiOiJodHRwOi8vdGhpcmR3eC5xbG9nby5jbi9tbW9wZW4vdmlfMzIvUTBqNFR3R1RmVElCMFlVMDliQmJIUUZWOHpDOXVWZDRnV3hEN1BoR3FpYzVVMVhNaGF0c2pORVNOOFN4TEZDcTFCSThNNHNXcktRRXpRdG03MzZSa09nLzEzMiIsIm5pY2tuYW1lIjoi6b6Z5aS0Iiwib3BlbmlkIjoib2NYZUEwdXk3VGRMeHhLRmttajhWTUo2Y3YwayIsInByb3ZpbmNlIjoi5rKz5Y2XIiwic2V4IjoxLCJzaWduIjoiMDlkMTdmZmM3YjQ5MDIyZjllNDJjNjNhM2I2YTcyYzciLCJ1bmlvbmlkIjoib1pRQ19zOGZvaW84LTRKenc0ajVfTFZZMzFxTSJ9";
|
|
|
|
+ //loginByWeixinCallBack(wxSign);
|
|
|
|
+ // JyObj.loginByWeixin();
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ function loginByWeixinCallBack(wxSign){
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "/jyapp/free/wxLogin",
|
|
|
|
+ type: "post",
|
|
|
|
+ data: {param:wxSign,rid:JyObj.getPushRid()},
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function(r){
|
|
|
|
+ if(r.status == 1){
|
|
|
|
+ loginSuccess(r);
|
|
|
|
+ }else{
|
|
|
|
+ showTip("登录失败",2000);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error: function(){
|
|
|
|
+ showTip("登录超时",1000);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function loginByWeixinCallBack222(){
|
|
|
|
+ //var wxSign = "eyJjaXR5Ijoi6YOR5beeIiwiY291bnRyeSI6IuS4reWbvSIsImNyZWF0ZXRpbWUiOjE1MTczMDc2MDMsImhlYWRpbWd1cmwiOiJodHRwOi8vd3d3LmJhaWR1LmNvbSIsIm5pY2tuYW1lIjoi5YWs5a2Q546LIiwib3BlbmlkIjoibzgtMnB3SGoxc190djNublJ4ckg5Y0QybmdrayIsInByb3ZpbmNlIjoi5rKz5Y2XMSIsInNleCI6MSwic2lnbiI6Ijc3OGNiM2RhM2Y0Zjg4NWYzMzBjNjc0YmRjOTM1ODJlIiwidW5pb25pZCI6Im84LTJwd0hqMXNfdHYzbm5SeHJIOWNEMm5na2sifQ==";
|
|
|
|
+ var wxSign = "D00THAAVRlVFXBkKUlRUQQMHBwFGWUNXSVZdQFRbHQtSVEcbUWhUdEQFEwsjTHliRFswBAcIXBFVZAVXPyZITElWQFlVF05NQVlUTQUGV1RMDkgPVRAHVVIBEU1cTBYdVV4TD1YNEl5VEVcBVABFWhILBBcHVgkEElkRWlxCBVQAABBbRExJVkZJQVBWVUAT";
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "/jyapp/free/login",
|
|
|
|
+ type: "post",
|
|
|
|
+ data: {reqType:"signLogin",sign:wxSign},
|
|
|
|
+ dataType: "json",
|
|
|
|
+ success: function(r){
|
|
|
|
+ //有回调函数不跳转
|
|
|
|
+ if(callBack != null && typeof(callBack) != "undefined"){
|
|
|
|
+ callBack(r.userInfo);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //自动登录后跳转
|
|
|
|
+ /*if(r.status != 1){//登录失败
|
|
|
|
+ url = "/jyapp/free/login";
|
|
|
|
+ }*/
|
|
|
|
+ },
|
|
|
|
+ error: function(){
|
|
|
|
+ //alert("服务器连接超时!");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function showTip(text,waitTime){
|
|
|
|
+ EasyAlert.show(text,undefined,waitTime);
|
|
|
|
+ var offsetTop = $(".forget").outerHeight()+$(".forget").offset().top;
|
|
|
|
+ if(offsetTop > 0){
|
|
|
|
+ offsetTop+=10;
|
|
|
|
+ $("#easyAlert").css({top: offsetTop+"px","margin-top": "0px"});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var kbTimeout = null;
|
|
|
|
+ function afterKeyboardShow(){
|
|
|
|
+ if(kbTimeout != null){
|
|
|
|
+ clearTimeout(kbTimeout);
|
|
|
|
+ }
|
|
|
|
+ $(".wx").hide();
|
|
|
|
+ }
|
|
|
|
+ function afterKeyboardHide(){
|
|
|
|
+ kbTimeout = setTimeout(function(){
|
|
|
|
+ $(".wx").show();
|
|
|
|
+ },300);
|
|
|
|
+ }
|
|
|
|
+ var kicked = {{.T.kicked}};
|
|
|
|
+ afterPageInit();
|
|
|
|
+ //JyObj初始化完成,回调
|
|
|
|
+ function afterPageInit(){
|
|
|
|
+ try{
|
|
|
|
+ if((isIos && JyObj.getVersion() <= "1.0.6") || (!isIos && JyObj.getVersion() <= "1.0.4")){
|
|
|
|
+ $(".header-tab").hide();
|
|
|
|
+ }
|
|
|
|
+ if(JyObj.getVersion() <= "1.0.1"){
|
|
|
|
+ if(getUrlParam("to") != "back"){
|
|
|
|
+ backToIndex = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //是否安装了微信
|
|
|
|
+ if(JyObj.isInstallWeixin()==0){
|
|
|
|
+ $(".wx").hide();
|
|
|
|
+ }
|
|
|
|
+ }catch(e){}
|
|
|
|
+ //
|
|
|
|
+ if(sessionStorage&&sessionStorage.alertKicked == "1"){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(getUrlParam("flag") != "kicked"){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //清除签名,弹出提示
|
|
|
|
+ try{
|
|
|
|
+ var sign = JyObj.getUserToken();
|
|
|
|
+ if(sign == "" || sign == null || typeof(sign) == "undefined"){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ JyObj.removeUserToken();
|
|
|
|
+ JyObj.alert(kicked);
|
|
|
|
+ sessionStorage.alertKicked = "1";
|
|
|
|
+ //禁止后退
|
|
|
|
+ JyObj.prohibitBack();
|
|
|
|
+ }catch(e){}
|
|
|
|
+ }
|
|
|
|
+ function time(o) {
|
|
|
|
+ if(wait == 0) {
|
|
|
|
+ o.innerHTML="获取验证码";
|
|
|
|
+ o.style.color = "#2cb7ca";
|
|
|
|
+ wait = 60;
|
|
|
|
+ } else {
|
|
|
|
+ o.style.color = "#888888";
|
|
|
|
+ o.style.fontSize = "14px";
|
|
|
|
+ o.innerHTML=wait+"s后重新发送";
|
|
|
|
+ wait--;
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ time(o)
|
|
|
|
+ },
|
|
|
|
+ 1000)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+</body>
|
|
|
|
+</html>
|