作者 乔爽

update

@@ -52,9 +52,12 @@ body{ @@ -52,9 +52,12 @@ body{
52 display: flex; 52 display: flex;
53 justify-content: center; 53 justify-content: center;
54 54
  55 + /*background:linear-gradient(-85deg,rgba(110,15,119,1) 0%, rgba(3,24,165,1) 100%);*/
  56 + /*-webkit-background-clip:text;*/
  57 + /*-webkit-text-fill-color:transparent;*/
55 } 58 }
56 .item_color{ 59 .item_color{
57 - color: red; 60 + color: #0318A5;
58 /*background:linear-gradient(-85deg,rgba(110,15,119,1) 0%, rgba(3,24,165,1) 100%);*/ 61 /*background:linear-gradient(-85deg,rgba(110,15,119,1) 0%, rgba(3,24,165,1) 100%);*/
59 /*-webkit-background-clip:text;*/ 62 /*-webkit-background-clip:text;*/
60 /*-webkit-text-fill-color:transparent;*/ 63 /*-webkit-text-fill-color:transparent;*/
@@ -65,7 +68,7 @@ body{ @@ -65,7 +68,7 @@ body{
65 height: 0.02rem; 68 height: 0.02rem;
66 background:linear-gradient(-85deg,rgba(110,15,119,1),rgba(3,24,165,1)); 69 background:linear-gradient(-85deg,rgba(110,15,119,1),rgba(3,24,165,1));
67 /*-webkit-background-clip:text;*/ 70 /*-webkit-background-clip:text;*/
68 - -webkit-text-fill-color:transparent; 71 + /*-webkit-text-fill-color:transparent;*/
69 position: absolute; 72 position: absolute;
70 bottom: 0; 73 bottom: 0;
71 } 74 }
@@ -188,3 +191,21 @@ body{ @@ -188,3 +191,21 @@ body{
188 color: #b3b3b3; 191 color: #b3b3b3;
189 } 192 }
190 193
  194 +/*土司弹框*/
  195 +.pop_fn{
  196 + position: fixed;
  197 + top: -2rem;
  198 + left: 0;
  199 + right: 0;
  200 + width: 3.74rem;
  201 + height: 0.82rem;
  202 + margin: 0 auto;
  203 + text-align: center;
  204 + line-height: 0.82rem;
  205 + color: #fff;
  206 + font-size: 0.24rem;
  207 + /*background: #352D32;*/
  208 + background:rgba(0,0,0,0.4);
  209 + transition: 1.2s;
  210 + border-radius: 0.36rem;
  211 +}
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <div class="bottom" style="display: flex"> 57 <div class="bottom" style="display: flex">
58 <div class="bottom_item"> 58 <div class="bottom_item">
59 <div class="iconfont icon-Fill"></div> 59 <div class="iconfont icon-Fill"></div>
60 - <input type="text" placeholder="请输入手机号"> 60 + <input type="text" placeholder="请输入手机号" class="phone">
61 </div> 61 </div>
62 <div class="bottom_item"> 62 <div class="bottom_item">
63 <div class="iconfont icon-mima"></div> 63 <div class="iconfont icon-mima"></div>
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 </div> 65 </div>
66 66
67 <!--登录框--> 67 <!--登录框-->
68 - <div class="bottom_sub"> 68 + <div class="bottom_sub login">
69 立即登录 69 立即登录
70 </div> 70 </div>
71 71
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 <div class="bottom" style="display: none"> 84 <div class="bottom" style="display: none">
85 <div class="bottom_item "> 85 <div class="bottom_item ">
86 <div class="iconfont icon-Fill"></div> 86 <div class="iconfont icon-Fill"></div>
87 - <input type="text" placeholder="请输入手机号"> 87 + <input type="text" placeholder="请输入手机号" class="phone">
88 </div> 88 </div>
89 <!--输入验证码--> 89 <!--输入验证码-->
90 <div class="bottom_small margin_item"> 90 <div class="bottom_small margin_item">
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 </div> 105 </div>
106 106
107 <!--登录框--> 107 <!--登录框-->
108 - <div class="bottom_sub margin_item"> 108 + <div class="bottom_sub margin_item register">
109 立即注册 109 立即注册
110 </div> 110 </div>
111 111
@@ -115,9 +115,8 @@ @@ -115,9 +115,8 @@
115 </div> 115 </div>
116 </div> 116 </div>
117 </div> 117 </div>
118 -  
119 -  
120 - 118 + <!--土司弹框-->
  119 + <div class="pop_fn"></div>
121 </div> 120 </div>
122 <script src="js/jquery.min.js"></script> 121 <script src="js/jquery.min.js"></script>
123 122
@@ -127,10 +126,41 @@ @@ -127,10 +126,41 @@
127 var index = $(this).index() 126 var index = $(this).index()
128 $(this).addClass("item_color").siblings(".mid_item").removeClass("item_color") 127 $(this).addClass("item_color").siblings(".mid_item").removeClass("item_color")
129 // 内容切换 128 // 内容切换
130 - $(".mid_item").eq($(".bottom_box>.bottom").index()).addClass("on").siblings().removeClass("on") 129 + $(".mid_item").eq($(".bottom_box>.bottom").index()).siblings()
131 $(".bottom_box>.bottom").css("display","none").eq($(this).index()).css("display","flex"); 130 $(".bottom_box>.bottom").css("display","none").eq($(this).index()).css("display","flex");
132 }) 131 })
133 132
  133 + //土司弹框
  134 + function popup(message) {
  135 + $('.pop_fn').css('top', 3 + 'rem').html(message);
  136 + setTimeout(function() {
  137 + $('.pop_fn').css('top', '-' + 2 + 'rem').html(message);
  138 + }, 1800)
  139 + }
  140 + //登录功能正则验证
  141 + $(".login").click(function () {
  142 + var phone_number = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
  143 + var newphone = $(".phone").val();
  144 + if (!phone_number.test(newphone)){
  145 + popup("手机号错误")
  146 + }else{
  147 + popup("登录成功")
  148 + }
  149 + })
  150 + //注册功能正则验证
  151 + $(".register").click(function () {
  152 + var phone_number = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
  153 + var newphone = $(".phone").val();
  154 + if (!phone_number.test(newphone)){
  155 + popup("手机号错误")
  156 + }else{
  157 + popup("登录成功")
  158 + }
  159 + })
  160 +
  161 +
  162 +
  163 +
134 </script> 164 </script>
135 </body> 165 </body>
136 </html> 166 </html>
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 - <title>首页</title> 5 + <title>个人中心</title>
6 <!--<meta name="viewport" content="width=device-width, initial-scale=1" />--> 6 <!--<meta name="viewport" content="width=device-width, initial-scale=1" />-->
7 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 7 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@@ -408,6 +408,27 @@ @@ -408,6 +408,27 @@
408 $('.item_8').click(function () { 408 $('.item_8').click(function () {
409 window.location.href = "cgdj.html" 409 window.location.href = "cgdj.html"
410 }) 410 })
  411 +
  412 + //苹果input自动下滑兼容
  413 + $("input").blur(function(){
  414 + setTimeout(function() {
  415 + var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
  416 + window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  417 + }, 300);
  418 + })
  419 + //聚焦监听
  420 + $('input').focus(function() {
  421 + if((/Android/gi).test(navigator.userAgent)) {
  422 + window.addEventListener('resize', function() {
  423 + if(document.activeElement.tagName == 'INPUT' ||
  424 + document.activeElement.tagName == 'TEXTAREA') {
  425 + window.setTimeout(function() {
  426 + document.activeElement.scrollIntoViewIfNeeded();
  427 + }, 0);
  428 + }
  429 + });
  430 + }
  431 + })
411 </script> 432 </script>
412 </body> 433 </body>
413 </html> 434 </html>
@@ -613,7 +613,7 @@ $(document).ready(function () { @@ -613,7 +613,7 @@ $(document).ready(function () {
613 //-------------酒店循环--------------- 613 //-------------酒店循环---------------
614 var page = 0; 614 var page = 0;
615 // 每次循环展示10个 615 // 每次循环展示10个
616 - var size = 6 ; 616 + var size = 3;
617 $('.hotel').dropload({ 617 $('.hotel').dropload({
618 scrollArea : window, 618 scrollArea : window,
619 domUp : { 619 domUp : {
@@ -716,8 +716,8 @@ $(document).ready(function () { @@ -716,8 +716,8 @@ $(document).ready(function () {
716 716
717 //--------------美食循环--------------- 717 //--------------美食循环---------------
718 var page2 = 0; 718 var page2 = 0;
719 - // 每次循环展示10个  
720 - var size2 = 1 ; 719 + // 每次循环展示3个
  720 + var size2 = 3;
721 $('.cate').dropload({ 721 $('.cate').dropload({
722 scrollArea : window, 722 scrollArea : window,
723 domUp : { 723 domUp : {
@@ -806,8 +806,8 @@ $(document).ready(function () { @@ -806,8 +806,8 @@ $(document).ready(function () {
806 806
807 //--------------天津旅游--------------- 807 //--------------天津旅游---------------
808 var page3 = 0; 808 var page3 = 0;
809 - // 每次循环展示10个  
810 - var size3 = 6; 809 + // 每次循环展示3个
  810 + var size3 = 3;
811 $('.travel').dropload({ 811 $('.travel').dropload({
812 scrollArea : window, 812 scrollArea : window,
813 domUp : { 813 domUp : {