liting2017 6 years ago
parent
commit
deb0a14bff

+ 31 - 0
src/css/newMenu/public.css

@@ -820,3 +820,34 @@ header .colorRed{
 	from{transform:rotateY(360deg)};
 	to{transform:rotateY(0deg)}
 } */
+.loading{
+	position: absolute;
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 0, 0, 0.1);
+	top: 0;
+	left: 0;
+	z-index: 99999999999;
+}
+.loading{
+	display: none;
+}
+.loading p{
+	position: absolute;
+	left: 50%;
+	top: 500px;
+	width: 200px;
+	height: 40px;
+	margin-left: -100px;
+	margin-top: -40px;
+}
+.loading p span{
+	display: inline-block;
+	font-size: 30px;
+	color: #17a2b8;
+	transition: all .2s ease-in-out;
+}
+.loading p span.active{
+	margin-left: -4px;
+	transition: all .2s ease-in;
+}

+ 14 - 3
src/css/newMenu/services.css

@@ -676,7 +676,16 @@
     background: #ffffff;
     box-shadow: 0 5px 15px #c98e62;
     border-radius: 15px 15px 0 0 ;
+    transition: all .2s ease-in-out;
 } 
+.brandList li:hover{
+    margin-bottom: 8px;
+    transition: all .2s ease-in;
+}
+.brandList li:hover div span{
+    box-shadow: 0 8px 15px #ec9c7c;
+    
+}
 .brand .brandList li img{
     width: 100%;
     height: 142px;
@@ -756,6 +765,7 @@
     color: #ffffff;
     border-radius: 10px;
     vertical-align: bottom;
+    transition: all .2s ease-in-out;
 }
 /* 科技通 */
 .scienceTtitle{
@@ -854,14 +864,15 @@
 }
 .scienceLeft ul li {
     display: inline-block;
+    vertical-align: top;
     margin-left: 10px;
     margin-bottom: 22px;
     transition: all .2s ease-in-out;
 }
-.scienceLeft ul li:hover{
-    box-shadow: 0 2px 8px;
-    margin-top: -4px;
+.scienceLeft ul li:hover img{
+    box-shadow: 0 4px 10px #ccc;
     transition: all .2s ease-in;
+    transform: scale(1.02);
 }
 .scienceRight{
     float: right;

+ 22 - 0
src/css/public.css

@@ -1139,4 +1139,26 @@ header .nav_right .head_login {
 	.pub_fix {
 		display: none;
 	}
+}
+.loading{
+	display: none;
+}
+.loading p{
+	position: absolute;
+	left: 50%;
+	top: 500px;
+	width: 200px;
+	height: 40px;
+	margin-left: -100px;
+	margin-top: -40px;
+}
+.loading p span{
+	display: inline-block;
+	font-size: 30px;
+	color: #17a2b8;
+	transition: all .2s ease-in-out;
+}
+.loading p span.active{
+	margin-left: -4px;
+	transition: all .2s ease-in;
 }

+ 9 - 4
src/js/newMenu/achievementList.js

@@ -154,6 +154,7 @@ $(function () {
         $('.productionType').css({height:proH+'px',lineHeight:proH+'px'})
     }
     function loadDate(pageNo) {
+        $('.loading').show();
         $.ajax({
             method: "get",
             dataType: "json",
@@ -167,6 +168,9 @@ $(function () {
             },
             success: function (data) {
                 var theArrs = [];
+                if(data.data&&data.data.error){
+                    msg(data.data.error[0])
+                };
                 if (data.data && data.data.list.length) {
                     let nub = data.data.list.length;
                     for (let i = 0; i < nub; i++) {
@@ -191,6 +195,7 @@ $(function () {
                         </li>`);
                     };
                 };
+                $('.loading').hide();
                 $('.achievementHot .hotList').empty();
                 $('.achievementHot .hotList').append(theArrs.join(''));
                 $('.pagination_box').css('display', 'block');
@@ -324,13 +329,13 @@ $(function () {
             loadDate();
         }
     })
-    /* 提示 */
+   /* 提示 */
     //提示框渐隐函数    
-    function msg() {
+    function msg(txt) {
         $('.smg').addClass('active');
-        var lit = $('#msg').val();
+        var lit = $('#msg').val(txt);
         setTimeout(function () {
-            $('.smg').removeClass('active')
+            $('.smg').removeClass('active');
             $('#msg').val('');
         }, 2000)
     }

+ 8 - 3
src/js/newMenu/demandList.js

@@ -9,7 +9,7 @@ import 'css/newMenu/public.css';
 import 'css/newMenu/header.css'
 import 'css/newMenu/achievementList.css';
 import 'js/public.js';
-
+const globalConfig={context:''}
 "use strict";
 $(function () {
     var thePageNo = 1,
@@ -155,6 +155,7 @@ $(function () {
         $('.productionType').css({height:proH+'px',lineHeight:proH+'px'})
     }
     function loadDate(pageNo) {
+        $('.loading').show();
         $.ajax({
             method: "get",
             dataType: "json",
@@ -168,6 +169,9 @@ $(function () {
             },
             success: function (data) {
                 var theArrs = [];
+                if(data.data&&data.data.error){
+                    msg(data.data.error[0])
+                };
                 if (data.data && data.data.list.length) {
                     let nub = data.data.list.length;
                     for (let i = 0; i < nub; i++) {
@@ -192,6 +196,7 @@ $(function () {
                         </li>`);
                     };
                 };
+                $('.loading').hide();
                 $('.achievementHot .hotList').empty();
                 $('.achievementHot .hotList').append(theArrs.join(''));
                 $('.pagination_box').css('display', 'block');
@@ -328,9 +333,9 @@ $(function () {
     })
     /* 提示 */
     //提示框渐隐函数    
-    function msg() {
+    function msg(txt) {
         $('.smg').addClass('active');
-        var lit = $('#msg').val();
+        var lit = $('#msg').val(txt);
         setTimeout(function () {
             $('.smg').removeClass('active')
             $('#msg').val('');

+ 15 - 0
src/js/newMenu/serviceList.js

@@ -118,6 +118,7 @@ $(function () {
     }
 
     function loadDate(pageNo) {
+        $('.loading').show();
         $.ajax({
             method: "get",
             dataType: "json",
@@ -131,6 +132,9 @@ $(function () {
             },
             success: function (data) {
                 var theArrs = [];
+                if(data.data&&data.data.error){
+                    msg(data.data.error[0])
+                };
                 if (data.data && data.data.list.length) {
                     let nub = data.data.list.length;
                     for (let i = 0; i < nub; i++) {
@@ -155,6 +159,7 @@ $(function () {
                         </li>`);
                     };
                 };
+                $('.loading').hide();
                 $('.achievementHot .hotList').empty();
                 $('.achievementHot .hotList').append(theArrs.join(''));
 
@@ -295,5 +300,15 @@ $(function () {
             }
         })
     }
+     /* 提示 */
+    //提示框渐隐函数    
+    function msg(txt) {
+        $('.smg').addClass('active');
+        var lit = $('#msg').val(txt);
+        setTimeout(function () {
+            $('.smg').removeClass('active')
+            $('#msg').val('');
+        }, 2000)
+    }
 
 })

+ 23 - 0
src/js/public.js

@@ -365,5 +365,28 @@ $(function(){
 			}
 		});
 	});
+	//loading
+	loading();
+	function loading(){
+		$('.loading').height($('body').height()+'px');
+		clearInterval(setTime);
+		let txt = "loading...",htmls=[],i=0,
+			txtArr = txt.split('');
+			txtArr.map(item=>{
+				htmls.push(`
+					<span>${item}</span>
+				`)
+			})
+		function active(){
+			i++;
+			if(i>=txtArr.length){
+				i=0;
+			}
+			$('.loading p').html(htmls);
+			$('.loading p span').eq(i).addClass('active');
+		}
+	    let setTime =setInterval(()=>{active()},100);
+	}
+	console.log()
 });
 

+ 3 - 2
src/js/register.js

@@ -101,7 +101,8 @@ $(function () {
     })
     $('#userpassword,#userpassword2').focus(function(){
         let passVal =$(this).val();
-        if(passVal.indexOf('密码')){
+        console.log(passVal)
+        if(passVal.indexOf('密码')>-1){
             $(this).attr('type','password').val('').css({color:'#333'})
         }
     })
@@ -127,7 +128,7 @@ $(function () {
             }else{
                 $(this).attr('type','password');   
             };
-            if (pass1 || tt !== pass1) {
+            if (pass1 && tt !== pass1) {
                 $('#userpassword2').attr('type',"text")
                 $('#userpassword2').val('两次密码不一致').css({color:'#f00'});
                 return;

+ 2 - 0
src/js/thinkTank/policyList.js

@@ -48,6 +48,7 @@ $(function () {
 		}
 	}
 	function loadDate(pageNo) {
+		$('.loading').show();
 		$.ajax({
 			method: "get",
 			dataType: "json",
@@ -90,6 +91,7 @@ $(function () {
 						].join(''));
 					};
 				};
+				$('.loading').hide();
 				$('.policy ul').empty();
 				$('.policy ul').append(theArr.join(''));
 				if (data.data.list.length === 0) {

+ 5 - 0
template/newMenu/demand.html

@@ -1082,6 +1082,11 @@
             <input type="text" name="msg" value="111" id="msg" />
         </div>
     </footer>
+    <div class="loading">
+        <p>
+            <span class="glyphicon glyphicon-refresh"></span>
+        </p>
+    </div>
 </body>
 <!-- <script src="../../src/js/jquery-2.1.0.js"></script>
 <script src="../../src/js/public.js"></script>

+ 3 - 0
template/newMenu/demandList.html

@@ -600,6 +600,9 @@
             <input type="text" name="msg" value="111" id="msg" />
         </div>
     </footer>
+    <div class="loading">
+        <p>loading...</p>
+    </div>
 </body>
 
 <!-- <script src="../../src/js/jquery-2.1.0.js"></script>

+ 0 - 2
webpack.config.js

@@ -269,8 +269,6 @@ module.exports = (function () {
         }));
     }
 
-    //let staticHost = 'http://aftts.hnzhiming.com';
-    //let staticHost = 'http://afts.hnzhiming.com';
     let staticHost = 'http://192.168.1.166';
     switch (argv.env.deploy) {
         case 'test':