Przeglądaj źródła

Merge remote-tracking branch 'origin/dev' into dev

huangct 8 lat temu
rodzic
commit
1869317dbd

+ 1 - 3
donate-service/src/main/webapp/resources/js/mobile/controllers/MobileProjectDetailCtrl.js

@@ -10,10 +10,8 @@ define([ 'app/app' ], function(app) {
         var init = function () {
 
             Project.getDetailById({ id: id}, {}, function (data) {
-                console.log('detail', data);
                 $scope.project = data;
-                $scope.styCode = '<div id="detail" class="show-all" style="max-height: 70px; overflow: hidden; font-size=12px;!important;">' + $scope.project.introduction + '</div>';
-                console.log($scope.styCode);
+                $scope.styCode = $scope.project.introduction;
                 $scope.introduction = $sce.trustAsHtml($scope.styCode);
                 $scope.organization = data.organization;
                 $scope.percentage = data.totalAmount / data.target;

+ 3 - 3
donate-service/src/main/webapp/resources/view/mobile/mobile_project_detail.html

@@ -721,7 +721,7 @@
                 </div>
                 <div class="bottom">
                     <div class="list-show">
-                        <div class="show-all" ng-bind-html="introduction">
+                        <div class="show-all" style="max-height: 70px" ng-bind-html="introduction">
 
                         </div>
                         <div class="btnClick btnDown" style="display:none">
@@ -1008,8 +1008,8 @@
     //    展开全文
     $(document).ready(function() {
 //        debugger
-        var $showAll = $('#detail');
-        var $height =$showAll.height();
+        var $showAll = $('.show-all');
+        var $height = document.documentElement.clientHeight;
         if ($height > 70) {
             $showAll.css({
                 height: 70,