Przeglądaj źródła

Merge branch 'hotfix/v4.10.0.4' of https://jygit.jydev.jianyu360.cn/qmx/jy into hotfix/v4.10.0.4

wangshan 5 miesięcy temu
rodzic
commit
01be844282

+ 157 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/slide-verify.js

@@ -0,0 +1,157 @@
+function initDialogWrapper() {
+  return new Vue({
+		el: '#slide-verify-node',
+		delimiters: ['${', '}'],
+		data: {
+			popupShow: false
+		}
+	})
+}
+
+var SMSRequest = {
+  getCaptcha: function(phone, mold, callback) {
+    $.ajax({
+      type: 'POST',
+      url: '/publicapply/captcha/get',
+      data: {
+        phone: phone,
+        mold: mold
+      },
+      success: function (res) {
+        if (res.error_code === 0 && res.data) {
+          callback && callback(res.data)
+        } else {
+          if (res.error_msg) {
+            showToast(res.error_msg)
+          }
+        }
+      }
+    })
+  },
+  verifyCaptcha: function(data, callback) {
+    $.ajax({
+      type: 'POST',
+      url: '/publicapply/captcha/check',
+      data: data,
+      success: function (res) {
+        callback && callback(res)
+      }
+    })
+  }
+}
+var slideVerify = {
+  el: null,
+  capt: null,
+  phone: '',
+  captKey: '',
+  mold: '',
+  $dialog: null,
+  init: function() {
+    if (!this.capt) {
+      this.$dialog = initDialogWrapper()
+      this.initSlideVerify()
+    }
+    this.modalShow(true)
+  },
+  initSlideVerify: function() {
+    var el = document.getElementById('slide-wrap');
+    var capt = new GoCaptcha.Slide({
+      width: 300,
+      height: 220,
+    })
+    capt.mount(el)
+    
+    this.el = el
+    this.capt = capt
+    this.bindCaptEvents()
+  },
+  modalShow: function(f) {
+    if (!this.$dialog) {
+      this.$dialog = initDialogWrapper()
+    }
+    this.$dialog.popupShow = f
+  },
+  bindCaptEvents: function() {
+    if (!this.capt) return
+    var _this = this
+    this.capt.setEvents({
+      close: function() {
+        _this.modalShow(false)
+      },
+      confirm: function(point, reset) {
+        const payload = {
+          phone: _this.phone,
+          key: _this.captKey,
+          point: [point.x, point.y].join(',')
+        }
+        SMSRequest.verifyCaptcha(payload, function(res) {
+          if (res.error_code === 0 && res.data) {
+            const pass = res.data && res.data.code === 0
+            reset()
+            if (pass) {
+              try {
+                startSendSMSCodeTimer()
+              } catch (error) {
+                console.log(error)                
+              }
+              _this.modalShow(false)
+            } else {
+              _this.capt.refresh()
+            }
+          } else {
+            reset()
+            _this.capt.refresh()
+          }
+        })
+      },
+      refresh: function() {
+        SMSRequest.getCaptcha(_this.phone, _this.mold, function(data) {
+          if (data && data.code === 1) {
+            _this.refreshCaptData(data)
+          }
+        })
+      },
+    })
+  },
+  cachePhone: function(phone) {
+    this.phone = phone
+  },
+  cacheMold: function(mold) {
+    this.mold = mold
+  },
+  cacheCaptKey: function(k) {
+    this.captKey = k
+  },
+  refreshCaptData: function(x) {
+    if (!this.capt) return
+    const captKey = x.captcha_key || ''
+    this.cacheCaptKey(captKey)
+    this.capt.setData({
+      image: x.image_base64 || '',
+      thumb: x.tile_base64 || '',
+      captKey: captKey,
+      thumbX: x.tile_x || 0,
+      thumbY: x.tile_y || 0,
+      thumbWidth: x.tile_width || 0,
+      thumbHeight: x.tile_height || 0
+    })
+  }
+}
+
+function initGoCaptchaVerify(phone, mold) {
+  SMSRequest.getCaptcha(phone, mold, function(data) {
+    if (data && data.code === 1) {
+      slideVerify.init()
+      slideVerify.cachePhone(phone)
+      slideVerify.cacheMold(mold)
+      slideVerify.refreshCaptData(data)
+    }
+  })
+}
+
+function getCaptchaInfo() {
+  return {
+    phone: slideVerify.phone,
+    captKey: slideVerify.captKey
+  }  
+}

+ 43 - 18
src/jfw/modules/app/src/web/templates/me/forgetPwd.html

@@ -9,6 +9,7 @@
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/css/forgetPwd.css?v={{Msg "seo" "version"}}" />
 		<script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js" type="text/javascript"></script>
+		<link rel="stylesheet" href="//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css">
 		{{include "/common/js.html"}}
 		<title>找回密码</title>
 	</head>
@@ -30,14 +31,14 @@
 						</div>
 						<div class="tran-line-bottom"></div>
 					</div>
-					<div class="code">
+					<!-- <div class="code">
 						<div>
 							<input type="tel" name="code" id="code" value="" placeholder="图形验证码" />
 							<img class="closeQc" src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/cancel.png?v={{Msg "seo" "version"}}"/>
 						</div>
 						<span class="captcha"><div class="vert-line"></div><img src="/jyapp/free/captcha"></span>
 						<div class="tran-line-bottom"></div>
-					</div>
+					</div> -->
 					<div class="code">
 						<div>
 							<input type="tel" id="identCode" name="" value="" placeholder="手机验证码" />
@@ -50,6 +51,18 @@
 			</div>
 		</div>
 
+		<div id="slide-verify-node">
+			<van-popup v-model="popupShow" :lazy-render="false">
+			  <div id="slide-wrap"></div>
+			</van-popup>
+		</div>
+
+		<script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js"></script>
+  		<script src="//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js"></script>
+		<link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.css">
+  		<script src="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.js"></script>
+		<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/slide-verify.js?v={{Msg "seo" "version" }}'></script>
+
 		<script type="text/javascript">
 			var dcsOne = false;
 			var phone = $.trim($("#tel").val());
@@ -112,18 +125,19 @@
 				}
 				phone = $.trim($("#tel").val());
 				var thisClass = this;
-				$.post("/jyapp/free/forgetPwd",{reqType:"sendIdentCode",phone: phone,code:$.trim($("#code").val())},function(r){
-					if(r.status=="phoneError"){
-						EasyAlert.show("手机号格式错误");
-					}else if(r.status=="codeError"){
-						EasyAlert.show("图形验证码错误");
-						reLoadCaptcha();
-					}else if(r.status=="phoneNotExists"){
-						EasyAlert.show("手机号不存在");
-					}else if(r.status=="y"){
-						time(thisClass);
-					}
-				});
+				initGoCaptchaVerify(phone, 3)
+				// $.post("/jyapp/free/forgetPwd",{reqType:"sendIdentCode",phone: phone,code:$.trim($("#code").val())},function(r){
+				// 	if(r.status=="phoneError"){
+				// 		EasyAlert.show("手机号格式错误");
+				// 	}else if(r.status=="codeError"){
+				// 		EasyAlert.show("图形验证码错误");
+				// 		reLoadCaptcha();
+				// 	}else if(r.status=="phoneNotExists"){
+				// 		EasyAlert.show("手机号不存在");
+				// 	}else if(r.status=="y"){
+				// 		time(thisClass);
+				// 	}
+				// });
 			})
 			$("#nextStep").on("tap",function(){
 				if($(this).hasClass("disabled")){
@@ -133,7 +147,15 @@
 					EasyAlert.show("请重新获取手机验证码");
 					return;
 				}
-				$.post("/jyapp/free/forgetPwd",{reqType:"nextStep",phone: phone,identCode:$.trim($("#identCode").val())},function(r){
+				var captInfo = getCaptchaInfo()
+				var payload = {
+					reqType:"nextStep",
+					phone: phone,
+					identCode:$.trim($("#identCode").val()),
+					captchaKey: captInfo.captKey,
+				}
+
+				$.post("/jyapp/free/forgetPwd",payload,function(r){
 					if(r.status=="identCodeError"){
 						EasyAlert.show("手机验证码错误");
 					}else if(r.status=="y"){
@@ -146,8 +168,7 @@
 			}
 			function commonMethod(){
 				var userPone = $.trim($("#tel").val());
-				var code = $.trim($("#code").val());
-				if(userPone.length >= 11 && code.length >= 4){
+				if(userPone.length >= 11){
 					dcsOne = true;
 					if(wait == 60){
 			     		$("#btn").css("color","#2cb7ca");
@@ -156,12 +177,16 @@
 					dcsOne = false;
 		     		$("#btn").css("color","#888888")
 				}
-				if(phone != "" && dcsOne && $.trim($("#identCode").val()).length == 6){
+				if(phone != "" && dcsOne){
 					$("#nextStep").removeClass("disabled");
 				}else{
 					$("#nextStep").addClass("disabled");
 				}
 			}
+
+			function startSendSMSCodeTimer() {
+				time($("#btn")[0])
+			}
 		</script>
 
 <!--百度统计end-->

+ 35 - 9
src/jfw/modules/app/src/web/templates/me/login.html

@@ -218,13 +218,21 @@
       请阅读并同意《使用协议》和《隐私政策》
     </div>
   </div>
+  <div id="slide-verify-node">
+    <van-popup v-model="popupShow" :lazy-render="false">
+      <div id="slide-wrap"></div>
+    </van-popup>
+  </div>
+  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.css">
+  <script src="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.js"></script>
   <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/ad/js/index.js?v={{Msg "seo" "version"}}'></script>
   <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/utils.js?v={{Msg "seo" "version"}}'></script>
   <script src="//cdn-common.jianyu360.com/cdn/lib/number-auth-web-sdk/2.1.2/numberAuth-web-sdk.js"></script>
   <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js"></script>
   <script src="//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js"></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/slide-verify.js?v={{Msg "seo" "version" }}'></script>
     <!--S 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
-    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/fotter.js?v={{Msg "seo" "version" }}'></script>
+	<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/fotter.js?v={{Msg "seo" "version" }}'></script>
     <!--E 加载荟聚SDK初始化及剑鱼自定义埋点注入 -->
   <script>
     var Activedatastring = `register`
@@ -414,13 +422,14 @@
         if ($('#sendIdentCode').html() !== '获取验证码') return
               trackClick('注册行为-获取验证码')
 				var thisClass = this;
-				$.post("/jyapp/free/login",{reqType:"sendIdentCode",phone: phone,token: getCipherText(phone)},function(r){
-					if(r.status==-1){
-						EasyAlert.show("手机号格式错误");
-					}else{
-						time(thisClass);
-					}
-				});
+				initGoCaptchaVerify(phone, 1)
+				// $.post("/jyapp/free/login",{reqType:"sendIdentCode",phone: phone,token: getCipherText(phone)},function(r){
+				// 	if(r.status==-1){
+				// 		EasyAlert.show("手机号格式错误");
+				// 	}else{
+				// 		time(thisClass);
+				// 	}
+				// });
 			});
 			var toutobj = {};
 			var tout = null;
@@ -553,8 +562,22 @@
 					}else{
                       trackClick('注册行为-登录/注册')
 					  // 验证码登录/注册
+					  var captInfo = getCaptchaInfo()
                       // {reqType:"identCodeLogin",phone:phone,identCode:$("#identCode").val(),rid:pushRid,oid:getOtherPushId(),phoneType:getPhoneType(),channel:getChannel(),deviceId:getDeviceId(),disWord:disWord}
-						$.post("/jyapp/free/login",{reqType:"identCodeLogin",phone:phone,identCode:$("#identCode").val(),rid:getPushRid(),oid:getOtherPushId(),phoneType:getPhoneType(),channel:getChannel(),deviceId:getDeviceId(),disWord:disWord,activity:getParam("activity")},function(r){
+						var payload = {
+							reqType:"identCodeLogin",
+							phone:phone,
+							identCode:$("#identCode").val(),
+							rid:getPushRid(),
+							oid:getOtherPushId(),
+							phoneType:getPhoneType(),
+							channel:getChannel(),
+							deviceId:getDeviceId(),
+							disWord:disWord,
+							captchaKey: captInfo.captKey,
+							activity:getParam("activity")
+						}
+						$.post("/jyapp/free/login",payload,function(r){
 							if(r.status==1){
 								if(localStorage){
 									localStorage.loginPhone = phone;
@@ -752,6 +775,9 @@
 				1000)
 			}
 		}
+		function startSendSMSCodeTimer() {
+			time($("#sendIdentCode")[0])
+		}
     // 修复浏览器安全限制无法获取填充 input value
     document.addEventListener('touchstart', function(event) {
       changeBtnStatus()

+ 156 - 0
src/web/staticres/common-module/pc-dialog/js/pc-slide-verify.js

@@ -0,0 +1,156 @@
+var SMSRequest = {
+  getCaptcha: function(phone, mold, callback) {
+    $.ajax({
+      type: 'POST',
+      url: '/publicapply/captcha/get',
+      data: {
+        phone: phone,
+        mold: mold
+      },
+      success: function (res) {
+        if (res.error_code === 0 && res.data) {
+          callback && callback(res.data)
+        } else {
+          if (res.error_msg) {
+            showToast(res.error_msg)
+          }
+        }
+      }
+    })
+  },
+  verifyCaptcha: function(data, callback) {
+    $.ajax({
+      type: 'POST',
+      url: '/publicapply/captcha/check',
+      data: data,
+      success: function (res) {
+        callback && callback(res)
+      }
+    })
+  }
+}
+var slideVerify = {
+  el: null,
+  $dialog: null,
+  capt: null,
+  phone: '',
+  captKey: '',
+  init: function() {
+    if (!this.capt) {
+      this.$dialog = $('#pc-slide-verify-dialog')
+      this.initSlideVerify()
+    }
+    this.modalShow(true)
+  },
+  initModalZIndex: function() {
+    // 修复首页多层弹窗层级问题
+    if (!this.$dialog) return
+    var modalInstance = this.$dialog.data('bs.modal')
+    modalInstance.$backdrop.addClass('top-of-login')
+  },
+  initSlideVerify: function() {
+    var el = document.getElementById('slide-wrap');
+    var capt = new GoCaptcha.Slide({
+      width: 300,
+      height: 220,
+    })
+    capt.mount(el)
+    
+    this.el = el
+    this.capt = capt
+    this.bindCaptEvents()
+  },
+  modalShow: function(f) {
+    if (!this.$dialog) return
+    if (f) {
+      this.$dialog.modal('show')
+      this.initModalZIndex()
+    } else {
+      this.$dialog.modal('hide')
+    }
+  },
+  bindCaptEvents: function() {
+    if (!this.capt) return
+    var _this = this
+    this.capt.setEvents({
+      close: function() {
+        _this.modalShow(false)
+      },
+      confirm: function(point, reset) {
+        const payload = {
+          phone: _this.phone,
+          key: _this.captKey,
+          point: [point.x, point.y].join(',')
+        }
+        SMSRequest.verifyCaptcha(payload, function(res) {
+          if (res.error_code === 0 && res.data) {
+            const pass = res.data && res.data.code === 0
+            if (pass) {
+              try {
+                startSendSMSCodeTimer(_this.mold)
+              } catch (error) {
+                console.log(error)
+              }
+              _this.modalShow(false)
+              reset()
+            } else {
+              reset()
+              _this.capt.refresh()
+            }
+          } else {
+            reset()
+            _this.capt.refresh()
+          }
+        })
+      },
+      refresh: function() {
+        SMSRequest.getCaptcha(_this.phone, _this.mold, function(data) {
+          if (data && data.code === 1) {
+            _this.refreshCaptData(data)
+          }
+        })
+      },
+    })
+  },
+  cachePhone: function(phone) {
+    this.phone = phone
+  },
+  cacheMold: function(mold) {
+    this.mold = mold
+  },
+  cacheCaptKey: function(k) {
+    this.captKey = k
+  },
+  refreshCaptData: function(x) {
+    if (!this.capt) return
+    const captKey = x.captcha_key || ''
+    this.cacheCaptKey(captKey)
+    this.capt.setData({
+      image: x.image_base64 || '',
+      thumb: x.tile_base64 || '',
+      captKey: captKey,
+      thumbX: x.tile_x || 0,
+      thumbY: x.tile_y || 0,
+      thumbWidth: x.tile_width || 0,
+      thumbHeight: x.tile_height || 0
+    })
+  }
+}
+
+function initGoCaptchaVerify(phone, mold) {
+  SMSRequest.getCaptcha(phone, mold, function(data) {
+    if (data && data.code === 1) {
+      slideVerify.init()
+      slideVerify.cachePhone(phone)
+      slideVerify.cacheMold(mold)
+      slideVerify.refreshCaptData(data)
+    }
+  })
+}
+
+function getCaptchaInfo() {
+  return {
+    phone: slideVerify.phone,
+    captKey: slideVerify.captKey
+  }  
+}

+ 3 - 0
src/web/staticres/css/pc.css

@@ -4753,6 +4753,7 @@ h6 {
 }
 
 /* 此处代码处理登录注册弹框居在宽度未知情况居中问题,且保证bootstrap动画效果(淡入淡出) */
+.modal.bootstrap-center-dialog.fade .modal-dialog,
 .modal.bidLogin.fade .modal-dialog{
   -webkit-transform: translate(-50%,-25%);
   -ms-transform: translate(-50%,-25%);
@@ -4762,6 +4763,7 @@ h6 {
   -o-transition: -o-transform .3s ease-out;
   transition: transform .3s ease-out;
 }
+.modal.bootstrap-center-dialog.in .modal-dialog,
 .modal.bidLogin.in .modal-dialog {
   -webkit-transform: translate(-50%,0);
   -ms-transform: translate(-50%,0);
@@ -4829,6 +4831,7 @@ h6 {
   display: block;
   margin-top: 20px;
 }
+.login-dig-tabbar-content.login-module-card,
 .login-dig-tabbar-content.password-login{
   margin-top: 38px;
 }

+ 39 - 155
src/web/staticres/js/login.js

@@ -1197,10 +1197,13 @@ $(function(){
                 }else{
                   source="";
                 }
+                var captInfo = getCaptchaInfo()
                 var payload = {
                   reqType:"identCodeLogin",
                   identCode:arr[1].value,
                   isAutoLogin: $('.auto-login-checkbox').hasClass('checked'),
+                  phone: captInfo.phone,
+                  captchaKey: captInfo.captKey,
                   source:source
                 }
                 // 短信验证码登录
@@ -1581,13 +1584,28 @@ $(function(){
             })
 		}
 		var s2 = document.querySelectorAll('.login-dig-input-box .l-get-sms');
+    const getCMSMoldMap = {
+      verify_get_sms: 1,
+      register_get_sms: 1,
+      forge_get_sms: 3
+    }
 		for(var i=0;i<s2.length;i++){
       var item = s2[i]
-      if (item.dataset.name === 'forge_get_sms') {
+      var dataSetName = item.dataset.name
+      var captchaVerifyArr = ['verify_get_sms', 'forge_get_sms', 'register_get_sms']
+      if (captchaVerifyArr.indexOf(dataSetName) > -1) {
         item.addEventListener('click', function (e) {
           if ($(this).hasClass('is-stop')) return
-          var phone = $(".forgetpwd_page .login-dig-input-box [name='forge_phone']").val()
-          initGoCaptchaVerify(phone)
+          var phone = ''
+          if (dataSetName === 'verify_get_sms' || dataSetName === 'register_get_sms') {
+            // initDirect
+            // initRegisterDirect
+            phone = $('.login-dig-input-box input[name="verify_phone"]').val()
+          } else if (dataSetName === 'forge_get_sms') {
+            // initForgetDirect
+            phone = $(".forgetpwd_page .login-dig-input-box [name='forge_phone']").val()
+          }
+          initGoCaptchaVerify(phone, getCMSMoldMap[dataSetName])
         })
       } else {
         item.addEventListener('click', function (e) {
@@ -1724,18 +1742,18 @@ $(function(){
             event: ['input', 'blur'],
             upStatus: function () {
                 verifySubmit.check()
-                verifySendSms.update(verifyCode.next && verifyPhone.next)
-            }
-        })
-        var verifyCode = createFormStauts({
-            el: '.login-dig-input-box input[name="verify_code"]',
-            rule: ruleForCode,
-            event: ['input', 'blur'],
-            upStatus: function () {
-                verifySubmit.check()
-                verifySendSms.update(verifyCode.next && verifyPhone.next)
+                verifySendSms.update(verifyPhone.next)
             }
         })
+        // var verifyCode = createFormStauts({
+        //     el: '.login-dig-input-box input[name="verify_code"]',
+        //     rule: ruleForCode,
+        //     event: ['input', 'blur'],
+        //     upStatus: function () {
+        //         verifySubmit.check()
+        //         verifySendSms.update(verifyCode.next && verifyPhone.next)
+        //     }
+        // })
         var verifySms = createFormStauts({
             el: '.login-dig-input-box input[name="verify_sms"]',
             rule: ruleForSms,
@@ -1744,12 +1762,11 @@ $(function(){
                 verifySubmit.check()
             }
         })
-        verifySubmit.init([verifyPhone, verifyCode, verifySms])
-        verifySendSms.update(verifyCode.next && verifyPhone.next)
+        verifySubmit.init([verifyPhone, verifySms])
+        verifySendSms.update(verifyPhone.next)
 
         Direct.verify = {
           phone: verifyPhone,
-          code: verifyCode,
           sms: verifySms
         }
 
@@ -2369,146 +2386,13 @@ var loginDialog = {
   }
 }
 
-
-var SMSRequest = {
-  getCaptcha: function(phone, callback) {
-    $.ajax({
-      type: 'POST',
-      url: '/publicapply/captcha/get',
-      data: {
-        phone: phone,
-        mold: 3
-      },
-      success: function (res) {
-        callback && callback(res.data)
-        if (res.error_code === 0 && res.data) {
-          
-        } else {
-          if (res.error_msg) {
-            showToast(res.error_msg)
-          }
-        }
-      }
-    })
-  },
-  verifyCaptcha: function(data, callback) {
-    $.ajax({
-      type: 'POST',
-      url: '/publicapply/captcha/check',
-      data: data,
-      success: function (res) {
-        callback && callback(res)
-      }
-    })
-  }
-}
-var slideVerify = {
-  el: null,
-  $dialog: null,
-  capt: null,
-  phone: '',
-  captKey: '',
-  init: function() {
-    this.$dialog = $('#pc-slide-verify-dialog')
-    this.initSlideVerify()
-    this.modalShow(true)
-  },
-  initSlideVerify: function() {
-    var el = document.getElementById('slide-wrap');
-    var capt = new GoCaptcha.Slide({
-      width: 300,
-      height: 220,
-    })
-    capt.mount(el)
-    
-    this.el = el
-    this.capt = capt
-    this.bindCaptEvents()
-  },
-  modalShow: function(f) {
-    if (!this.$dialog) return
-    if (f) {
-      this.$dialog.modal('show')
-    } else {
-      this.$dialog.modal('hide')
-    }
-  },
-  bindCaptEvents: function() {
-    if (!this.capt) return
-    var _this = this
-    this.capt.setEvents({
-      close: function() {
-        _this.modalShow(false)
-      },
-      confirm: function(point, reset) {
-        const payload = {
-          phone: _this.phone,
-          key: _this.captKey,
-          point: [point.x, point.y].join(',')
-        }
-        SMSRequest.verifyCaptcha(payload, function(res) {
-          if (res.error_code === 0 && res.data) {
-            const pass = res.data && res.data.code === 0
-            if (pass) {
-              sessionStorage.setItem('login-verify-start-time', Date.now())
-              startTimeDown('forge')
-              _this.modalShow(false)
-            } else {
-              reset()
-              _this.capt.refresh()
-            }
-          } else {
-            reset()
-            _this.capt.refresh()
-          }
-        })
-      },
-      refresh: function() {
-        SMSRequest.getCaptcha(_this.phone, function(data) {
-          if (data && data.code === 1) {
-            _this.refreshCaptData(data)
-          }
-        })
-      },
-    })
-  },
-  cachePhone: function(phone) {
-    this.phone = phone
-  },
-  cacheCaptKey: function(k) {
-    this.captKey = k
-  },
-  refreshCaptData: function(x) {
-    if (!this.capt) return
-    const captKey = x.captcha_key || ''
-    this.cacheCaptKey(captKey)
-    this.capt.setData({
-      image: x.image_base64 || '',
-      thumb: x.tile_base64 || '',
-      captKey: captKey,
-      thumbX: x.tile_x || 0,
-      thumbY: x.tile_y || 0,
-      thumbWidth: x.tile_width || 0,
-      thumbHeight: x.tile_height || 0
-    })
+function startSendSMSCodeTimer(mold) {
+  sessionStorage.setItem('login-verify-start-time', Date.now())
+  const moldMap = {
+    1: 'verify',
+    3: 'forge'
   }
-}
-
-function initGoCaptchaVerify(phone) {
-  SMSRequest.getCaptcha(phone, function(data) {
-    if (data && data.code === 1) {
-      slideVerify.init()
-      slideVerify.cachePhone(phone)
-      slideVerify.refreshCaptData(data)
-    }
-  })
-}
-
-function getCaptchaInfo() {
-  return {
-    phone: slideVerify.phone,
-    captKey: slideVerify.captKey
-  }  
+  startTimeDown(moldMap[mold])
 }
 
 $(function () {

+ 5 - 2
src/web/templates/common/pc-login-dialog.html

@@ -1,5 +1,7 @@
 <!-- 剑鱼pc登录弹窗html接口模板 -->
 <!-- 依赖于pc公共头部样式以及 pc.css、bootstrap.css、bootstrap.js、jquery.js、login.js -->
+<link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.css">
+<script src="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.js"></script>
 <div
   class="modal fade bidLogin"
   data-name="pc-login-dialog"
@@ -43,13 +45,13 @@
             <i class="login-dig-icon-phone"></i>
             <input autocomplete="off" name="verify_phone" type="tel" placeholder="输入手机号码" maxlength="11" />
           </div>
-          <div class="login-dig-input-box" data-error="图形验证码输入错误">
+          <!-- <div class="login-dig-input-box" data-error="图形验证码输入错误">
             <i class="login-dig-icon-guard"></i>
             <input autocomplete="off" name="verify_code" type="text" placeholder="输入图形验证码" maxlength="4" />
             <div class="after-input-box" style="right: 4px;">
               <img data-name="verfiy-login" class="verify-img" src="" alt="verify" />
             </div>
-          </div>
+          </div> -->
           <div class="login-dig-input-box" data-error="短信验证码输入错误">
             <i class="login-dig-icon-guard"></i>
             <input
@@ -219,3 +221,4 @@
     </div>
   </div>
 </div>
+{{include "/common/pc-slide-verify.html"}}

+ 10 - 4
src/web/templates/common/pc-slide-verify.html

@@ -1,23 +1,28 @@
 <!-- 剑鱼pc登录弹窗html接口模板 -->
 <!-- 依赖于pc公共头部样式以及 pc.css、bootstrap.css、bootstrap.js、jquery.js、login.js -->
 <style>
+  #pc-slide-verify-dialog {
+    z-index: 100000!important;
+  }
+  .top-of-login {
+    z-index: 99999!important;
+  }
   .pc-slide-verify-box {
     z-index: 667;
     position: absolute;
     top: 50%;
     overflow: hidden;
-    margin-top: -240px;
+    margin-top: -178px;
     left: 50%;
     border-radius: 16px;
     width: unset!important;
   }
 </style>
 <div
-  class="modal fade bidLogin"
-  data-name="pc-login-dialog"
+  class="modal fade slide-verify-dialog bootstrap-center-dialog"
   id="pc-slide-verify-dialog"
   class=""
-  tabindex="-1"
+  tabindex="1"
   role="dialog"
   data-backdrop="static"
   aria-hidden="true"
@@ -26,3 +31,4 @@
     <div id="slide-wrap"></div>
   </div>
 </div>
+<script src='{{Msg "seo" "cdn"}}/common-module/pc-dialog/js/pc-slide-verify.js?v={{Msg "seo" "version"}}'></script>

+ 0 - 4
src/web/templates/login/forgetPwd.html

@@ -5,8 +5,6 @@
 <meta name="renderer" content="webkit">
 <meta content="telephone=no" name="format-detection"/>
     <meta content="light" theme="light" name="enable-header"/>
-<link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.css">
-<script src="https://cdn-common.jianyu360.com/cdn/lib/go-captcha-jslib/1.0.9/gocaptcha.global.js"></script>
 {{include "/common/pnc.html"}}
 <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
@@ -107,8 +105,6 @@
           <button class="login-dig-submit-button" name="forge_submit_pass" disabled="true">修改密码</button>
       </div>
   </div>
-
-  {{include "/common/pc-slide-verify.html"}}
 </section>
 {{include "/common/pcbottom.html"}}
 {{include "/common/baiducc.html"}}

+ 1 - 1
src/web/templates/pc/jyblogdetail.html

@@ -8,7 +8,7 @@
 <meta content="telephone=no" name="format-detection"/>
     <meta content="light" theme="light" name="enable-header"/>
 {{include "/common/pnc.html"}}
-<link href="{{Msg "seo" "cdn"}}/css/pc.min.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+<link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>

+ 1 - 1
src/web/templates/pc/newIndex.html

@@ -20,7 +20,7 @@
   <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/index_swiper.css?v={{Msg "seo" "version"}}' />
   <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/css/pc/index.css?v={{Msg "seo" "version"}}' />
   <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/index_pc.css?v={{Msg "seo" "version"}}' />
-  <link href='{{Msg "seo" "cdn"}}/css/pc.min.css?v={{Msg "seo" "version"}}' rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet">
 </head>
 
 {{$global:=.T}}