Browse Source

Merge branch 'master' of ssh://git.jishutao.com:55555/jishutao/jitao-portal

dengzhiguo 6 years ago
parent
commit
4f1b7fcd25

+ 2 - 1
src/css/newMenu/achievementList.css

@@ -407,4 +407,5 @@
 .achievemrntImg {
     background: url(../../../img/initPic/achievementInit.jpg) no-repeat;
     background-size:100% 100%; 
-}
+}
+

+ 1 - 5
src/css/newMenu/header.css

@@ -76,11 +76,7 @@
 }
 /* 导航 */
 .navHeader {
-    position: absolute;
-    width: 1200px;
-    left: 50%;
-    margin-left: -600px;
-    z-index: 999;
+   
 }
 .navHeader .logo_photo{
     float: right;

+ 7 - 4
src/css/newMenu/public.css

@@ -798,10 +798,8 @@ a:active{text-decoration:none;}/* 指正在点的链接*/
 	position: absolute;
 	left: -115px;
 	box-shadow: 0 0 4px rgb(204, 203, 203);
-	top: 0;
+	bottom: 0;
 }
-
-
 .right_cebian {
 	width: 40px;
 	height: 120px;
@@ -895,4 +893,9 @@ input:-webkit-autofill {
 	width: 100%;
 	display: inline-block;
 }
-
+@media screen and (max-width: 1200px) {
+   #myCarousel,#bottom,.topNavBj,.topFixHeight{
+	   width: 1200px!important;
+	   margin: 0 auto;
+   }
+}

+ 11 - 0
src/css/newMenu/safeguarding.css

@@ -84,3 +84,14 @@
     line-height: 28px;
     text-align: justify;
 }
+
+
+@media screen and (max-width:1200px){
+    body{
+        width: 1200px;
+        margin: 0 auto;
+    }
+    .continueHighBanner{
+        width: 1200px!important;
+    }
+}

+ 48 - 2
src/css/newMenu/serviceDetails.css

@@ -394,7 +394,7 @@
     clear: both;
 }
 .evaluateList>ul>li {
-    border-bottom: 1px dotted #efefef;
+    border-bottom: 1px dotted #c6c2c2;
     padding-left: 26px;
     overflow: hidden;
 } 
@@ -406,7 +406,7 @@
 .evaluateList>ul>li>div.stasf{
     width: 370px;
     overflow: hidden;
-    padding: 45px 0 34px;;
+    padding: 25px 0 10px;;
 }
 .evaluateList>ul>li>div.stasf>p{
     margin-right: 50px;
@@ -431,6 +431,7 @@
 .satisfiedContent {
     clear: both;
     overflow: hidden;
+    margin-top: 8px;
     padding-bottom: 27px;
 }
 .satisfiedContent p{
@@ -461,3 +462,48 @@ margin-bottom: 100px;
     margin-left: 10px;
 }
 
+#commentArea{
+    width: 1000px;
+    height: 80px;
+    outline: none;
+    margin-left: 26px;
+    resize: none;
+    margin-top: 10px;
+    text-indent:1em;
+    line-height: 20px;
+    padding-top: 5px;
+}
+#commentArea:focus{
+    border-color:transparent; 
+    box-shadow: 0 0 10px #1697ea ;
+}
+.CommentSend button{
+    width: 150px;
+    height: 34px;
+    margin-left: 26px;
+    margin-top: 6px;
+}
+.commentStar{
+    overflow: hidden;
+    margin-left: 26px;
+    margin-top: 10px;
+    line-height: 20px;
+}
+.commentStar>span{
+    display: inline-block;
+    float: left;
+    color: #ff570c
+}
+.commentStar .ulStar{
+    float: left;
+    margin-left: 6px;
+}
+.commentStar .ulStar span{
+    display: inline-block;
+    cursor: pointer;
+    margin-right: 4px;
+    font-size: 20px;
+    float: left;
+    color: #ff570c
+}
+

+ 10 - 1
src/css/newMenu/tradingIndex.css

@@ -501,7 +501,16 @@
     transition: all .2s ease-in-out;
     border-bottom: 4px solid #1697e9;
 }
-
+@media screen and (max-width:1200px){
+    body{
+        width: 1200px;
+        margin: 0 auto;
+    }
+    .patentHeader,.patentSolve{
+        width: 1200px!important;
+        margin: 0 auto;
+    }
+}
 
 
 

+ 5 - 0
src/css/technologyTrading/achievementDetail.css

@@ -137,3 +137,8 @@ div.pointer{cursor: pointer;}
     vertical-align: top
 }
 
+@media screen and (max-width:1200px){
+    #all_achievement{
+        width: 1200px;
+    }
+}

+ 5 - 0
src/css/technologyTrading/demandDetail.css

@@ -132,3 +132,8 @@ text-align: justify;}
     white-space: nowrap;
 }
 
+@media screen and(max-width:1200px){
+    #all_achievement{
+        width: 1200px;
+    }
+}

+ 1 - 1
src/js/newMenu/achievement.js

@@ -1,4 +1,4 @@
-import 'css/bootstrap.less';
+// import 'css/bootstrap.less';
 import 'bootstrap/dist/js/bootstrap.js';
 import 'css/newMenu/public.css';
 import 'css/newMenu/header.css'

+ 57 - 12
src/js/newMenu/serviceDetails.js

@@ -108,7 +108,7 @@ $(function () {
         $.ajax({
             method: "get",
             dataType: "json",
-            url: globalConfig.context + "/open/comment/list",
+            url: globalConfig.context + "/open/unlanded/comment/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize:4,
@@ -128,7 +128,7 @@ $(function () {
                         theArrs.push(`
                         <li>
                         <div class="stasf">
-                            <p>用户 :<span class="uName">${thisdata.commenter}</span></p>
+                            <p>用户名 :<span class="uName">${thisdata.uname}</span></p>
                             <div class="satisfied">
                                 <span>满意度:</span>
                                 <ol>
@@ -140,17 +140,16 @@ $(function () {
                                 </ol>
                             </div>
                         </div>
+                        <div><time>${times}</time></div>
                         <div class="satisfiedContent">
                             <p>${thisdata.content}</p> 
-                            <time>${times}</time>
                         </div>
                     </li>`);
                     };
-                    console.log(data.data)
                     if(data.data.totalCommentCount>0){
-                        let good = ((data.data.positiveCommentCount)/(data.data.totalCommentCount)).toFixed(2)*100,
-                        middle = ((data.data.ordinaryCommentCount)/(data.data.totalCommentCount)).toFixed(2)*100,
-                        bad = ((data.data.negativeCommentCount)/(data.data.totalCommentCount)).toFixed(2)*100;
+                        let good = (((data.data.positiveCommentCount)/(data.data.totalCommentCount))*100).toFixed(1),
+                        middle = (((data.data.ordinaryCommentCount)/(data.data.totalCommentCount))*100).toFixed(1),
+                        bad = (100-good-middle).toFixed(1);
                         $('.commentDetails').html(`
                             评价 :<span>好评(${good+'%'})</span><span>中评(${middle+'%'})</span><span>差评(${bad+'%'})</span>
                             `)
@@ -160,11 +159,13 @@ $(function () {
                 $('.numberBars').html(data.data.totalCommentCount>10?'10+':data.data.totalCommentCount)
                 $('.evaluateList>ul').empty();
                 $('.evaluateList>ul').append(theArrs.join(''));
-                $('.pagination_box').css('display', 'block');
-                if (data.data.comments.list.length === 0) {
-                    $('.evaluateList ul').html("<div class='list_none'>暂无评论</div>");
+                
+                if (!(data.data.comments.list.length)) {
+                    $('.evaluateList>ul').html("<div class='list_none'>暂无评论</div>");
                     $('.pagination_box').css('display', 'none')
-                };
+                }else{
+                    $('.pagination_box').css('display', 'block');
+                }
                 thePageLength = data.data.comments.totalCount ? Math.ceil(data.data.comments.totalCount / pageSize) : 1;
                 $('.totalCount').html(`共${data.data.comments.totalCount}条数据 ${thePageLength}页`)
                 var pageArr = [],
@@ -187,7 +188,6 @@ $(function () {
                         );
                     }
                 };
-                
                 $('.pageNumber').remove();
                 $('.pagePre').after(pageArr.join(''));
             }
@@ -231,4 +231,49 @@ $(function () {
             $('#msg').val('');
         }, 2000)
     }
+    //评论星星
+    star();
+    function star(){
+        $('.commentStar .ulStar span').hover(function(){
+            $(this).addClass('glyphicon-star').removeClass('glyphicon-star-empty').prevAll().addClass('glyphicon-star').removeClass('glyphicon-star-empty');
+            $(this).nextAll().removeClass('glyphicon-star').addClass('glyphicon-star-empty').stop(true);
+        })
+    }
+    //新建评论
+    addComment();
+    function addComment(){
+        $('.CommentSend .btn').click(function(e){
+            e.preventDefault();
+            let starNum = $('.commentStar .ulStar span.glyphicon-star').length,
+                textVal = $('#commentArea').val();
+                console.log(starNum,textVal)
+            if(!starNum){
+                msg('请您选择星级!');
+                return;
+            }
+            if(!textVal){
+                msg('请您填写评论内容!');
+                return;
+            }
+            $.ajax({
+                method:'post',
+                url: globalConfig.context + "/open/addComment",
+                dataType:'json',
+                data:{
+                    commodityId:ids,
+					content:textVal,
+					star:starNum,
+                }
+            }).done(function(data){
+                if(data&&data.error.length){
+                    msg(data.error[0].message);
+                    return;
+                }  
+                msg('评论成功,感谢您的评论。');
+                $('#commentArea').val('');
+                $('.ulStar span').removeClass('glyphicon-star').addClass('glyphicon-star-empty');
+                loadDate();
+            })
+        })
+    }
 })

+ 57 - 0
src/js/newMenu/shopList.js

@@ -290,4 +290,61 @@ $(function(){
             $('#msg').val('');
         }, 2000)
     }
+    //登录
+     //登录
+     $('#form_login').submit(function(e){
+		e.preventDefault();
+		var Suser=$('#Lo_user').val();
+		var Spass=$('#Lo_pass').val();	
+		var type=$(".login_pass>#customerType").val();
+		var check_experts=$('#checks').prop('checked');		
+		if(Suser==''||Spass==''){	
+			msg('请填写用户名/密码.');
+			return false;
+		}else{	
+			$('.loading').show();		
+			let txt = "登录中,请稍后...",htmls=[],i=0,
+			txtArr = txt.split('');
+			txtArr.map(item=>{
+				htmls.push(`
+					<span>${item}</span>
+				`)
+			});
+			$('.loading div p').html(htmls);
+			$.ajax({
+              method: "POST",
+              dataType: "json",
+              url: globalConfig.context + "/signin",
+              data: {
+                      "mobile": Suser,
+					  "password": Spass,
+					  'type':type
+              },
+              success: function (rest) {
+				    $('.loading').hide();				
+					if (rest.error && rest.error.length) {					
+		                 msg(rest.error[0].message);	
+					} else {						
+						var  data = rest.data;
+                        if (data && data.requestURI) {
+                            var path = globalConfig.context + data.requestURI;
+                            if (data.queryString) {
+                                path += '?' + data.queryString;
+                            }
+                            if (window.location.hash) {
+                                path += window.location.hash;
+                            }
+                            window.location.href = path;
+                        } else {
+                            msg('登录成功');
+                            setTimeout(()=>{
+                                window.location.reload();
+                            },500)
+                        }                       
+					}
+			   }
+          })
+                
+		}			
+	})
 })

+ 1 - 1
src/js/public.js

@@ -61,7 +61,7 @@ $(function(){
 	$('#form_login').submit(function(e){
 		let hrefs=window.location.href,
 			urls = hrefs.split('/').pop();
-		if(urls=='evaluate'){
+		if(urls=='evaluate'||urls=='shopList'){
 			return;
 		}
 		e.preventDefault();

+ 17 - 1
template/newMenu/serviceDetails.html

@@ -157,7 +157,7 @@
         <ol class="tabEvaluate">
             <li class="active">商品描述</li>
             <li>用户评价(<span class="numberBars">0</span>)
-            </ol>
+        </ol>
         <div class="tabList ">
             <div class="serviceDetailsList">
                 <div class="introduction">
@@ -166,6 +166,22 @@
             </div>
             <div class="evaluateList">
                 <div class="commentDetails">评价 :<span>好评-100%</span><span>中评-100%</span><span>差评-100%</span></div>
+                <div>
+                    <div class="commentStar">
+                        <span>选择星级 : </span>
+                        <div class="ulStar">
+                            <span class="glyphicon glyphicon-star-empty"></span>
+                            <span class="glyphicon glyphicon-star-empty"></span>
+                            <span class="glyphicon glyphicon-star-empty"></span>
+                            <span class="glyphicon glyphicon-star-empty"></span>
+                            <span class="glyphicon glyphicon-star-empty"></span>
+                        </div>
+                    </div>
+                    <textarea id="commentArea" placeholder="来说几句吧。。"></textarea>
+                    <div class="CommentSend">
+                        <button class="btn btn-primary">评论</button>
+                    </div>
+                </div>
                 <ul>
                     <li>
                         <div class="stasf">