Bläddra i källkod

维权详情增加关注

liting2017 6 år sedan
förälder
incheckning
cc2046f047

BIN
img/newMenu/safeHeart_no.png


BIN
img/newMenu/safeHeart_ok.png


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

@@ -115,6 +115,10 @@ footer{
     margin-top: 12px;
     font-weight: normal;
     padding-left:10px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
 }
 .safeList ul li span{
     padding-left:10px;
@@ -147,6 +151,10 @@ footer{
     margin-bottom: 12px;
     padding-right: 10px;
     color: #666666;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
 }
 .safeList>div{
     clear: both;

+ 38 - 1
src/css/newMenu/safeguardingDetail.css

@@ -48,9 +48,15 @@
     font-size: 22px;
 }
 .portraitRight p{
+    height: 22px;
     font-size: 16px;
     color: #fff;
     margin-top: 15px;
+    width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    white-space: nowrap;
 }
 .portraitRight a{
     display: inline-block;
@@ -73,6 +79,7 @@
     margin-top: -4px;
 }
 .bannerLeft .portraitRight{
+    width: 500px;
     float: left;
     margin-top: 106px;
     margin-left: 32px;
@@ -364,7 +371,37 @@ margin-bottom: 100px;
     float: left;
     color: #ff570c
 }
-
+.collectionN .heart{
+    cursor: pointer;
+    vertical-align: top;
+    margin-right: 10px;
+    margin-top: 7px;
+    width: 19px;
+    height: 18px;
+    display: inline-block;
+    background: url(../../../img/newMenu/safeHeart_no.png) no-repeat;
+    background-size: 100% 100%;
+}
+.collectionN .heart.active{
+    background: url(../../../img/newMenu/safeHeart_ok.png) no-repeat;
+}
+.collectionN .nubCollect{
+    display: inline-block;
+    line-height: 27px;
+}
+.collectionN{
+    margin-left: 16px;
+    line-height: 30px;
+    height: 30px;
+}
+.collectionN span{
+    display: inline-block;
+    height: 30px;
+    line-height: 30px;
+}
+.collectionN.active{
+    color: #ff6b26;
+}
 
 @media screen and (max-width:1200px){
    .safeBanner{ 

+ 3 - 2
src/js/newMenu/achievement.js

@@ -1,10 +1,11 @@
+
+import 'js/public.js';
 import 'css/bootstrap.less';
 import 'bootstrap/dist/js/bootstrap.js';
 import 'css/newMenu/public.css';
 import 'css/newMenu/header.css'
 import 'css/newMenu/achievement.css';
-// import 'js/banner.js';
-import 'js/public.js';
+
 
 $(function(){
     //轮播

+ 6 - 0
src/js/newMenu/safeguardingDetail.js

@@ -17,6 +17,12 @@ $(function () {
         pages();
     }
     $('.collectionN .heart').click(function () {
+        let loginTxt=$('.head_login')[0];
+        if(loginTxt&&($(loginTxt).text())=='登录'){
+            $('.head_login').click();
+            window.location.hash='jump';
+            return false;
+        }
         let heart = $('.heart');
         if (heart.hasClass('active')) {
             collectionApi(0) //取消关注

+ 2 - 3
src/js/public.js

@@ -1,5 +1,4 @@
-
-$(function(){
+window.onload=function(){
 	//导航
 	if($('.carousel-inner div').length<=1){
 		$('#myCarousel').removeClass('slide');
@@ -503,5 +502,5 @@ $(function(){
 		$('.carousel-control').css({'height':(imgH)+'px','line-height':(imgH)+'px'})
 	}
 	//bannerFun();
-});
+};
 

+ 1 - 1
template/newMenu/safeguardingDetail.html

@@ -247,7 +247,7 @@
                     <div>
                         <img src="../../img/newMenu/policyBanner.png" alt="">
                     </div>
-                    <p><img src="../../img/newMenu/safeAddress.png" alt=""><span>湖南长沙</span></p>
+                    <p class="collectionN active"><span class="heart"></span><span class="nubCollect">4</span>次关注</p>
                 </div>
                 <div class="portraitRight">
                     <h4><span>李四光</span><img src="../../img/newMenu/sadeRezh.png" alt="">平台认证</h4>

+ 1 - 1
template/newMenu/safeguardingList.html

@@ -133,7 +133,7 @@
             </div>
         </div>
         <div class="sort">
-            <a class="relTime active">发布时间</a><a class="colNumber">关注量</a>
+            <a class="relTime active">发布时间</a><a class="colNumber">好评率</a>
         </div>
         <div class="adviserList">
             <ul>