Просмотр исходного кода

rel: 处理公告部分链接帮助中心

wangcz 7 лет назад
Родитель
Сommit
e686066d32

+ 3 - 10
src/main/webapp/resources/css/index.css

@@ -1815,18 +1815,11 @@ img.new-animate{
 	overflow-y: auto;
 	overflow-x: hidden;
 }
-.feed-wrap .pane:first-child, .feed-wrap .pane:nth-child(2) {
-	height: 275px;
-}
+
 .feed-wrap .notice .pane-body{
 	width: 202px;
-	/*background: #fff;*/
-	/*box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
-	/*-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
-	/*-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
-	/*-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
-	/*border-bottom-left-radius: 5px;*/
-	/*border-bottom-right-radius: 5px;*/
+	height:255px;
+	overflow: hidden;
 }
 .pane.addon {
 	height: 185px;

+ 24 - 7
src/main/webapp/resources/js/index/app.js

@@ -2023,22 +2023,39 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             };
         });
     }]);
-    app.controller('NoticeCtrl', ['$scope', 'SnapshotService', 'AuthenticationService', function ($scope, SnapshotService, AuthenticationService) {
+    app.controller('NoticeCtrl', ['$scope', 'SnapshotService', 'AuthenticationService', 'AccountEnterprise', function ($scope, SnapshotService, AuthenticationService, AccountEnterprise) {
         AuthenticationService.getAuthentication().success(function (data) {
             $scope.loading = false;
-            $scope.useruu = data.userUU;
+            $scope.noticesId = 325; // 帮助中心指定平台ID号
 
-            SnapshotService.getNotice(7, $scope.useruu, function (data) {	//5表示首页显示的公告条数
-                $scope.notices = data;
+            // SnapshotService.getNotice(7, $scope.useruu, function (data) {	//5表示首页显示的公告条数
+            //     $scope.notices = data;
+            // });
+
+            AccountEnterprise.getB2cUrl({}, function(data) {
+                $scope.toB2cLink = data.url;
+                if($scope.toB2cLink) {
+                    $.ajax({
+                        url:$scope.toB2cLink + '/api/help-service/issues?navId=' + $scope.noticesId,
+                        type:"get",
+                        success:function(data){
+                            $scope.notices = data || [];
+                        },
+                        error:function(data){
+                            console.log(data);
+                            $scope.notices = [];
+                        }
+                    });
+                }
             });
 
             /**
              * 设置单据阅读状态
              * @param id
              */
-            $scope.setReadStatus = function(id) {
-                SnapshotService.setNoticeStatusAfterRead(id, $scope.useruu);
-            }
+            // $scope.setReadStatus = function(id) {
+            //     SnapshotService.setNoticeStatusAfterRead(id, $scope.useruu);
+            // }
 
             /**
              * 判断是否当天时间

+ 2 - 1
src/main/webapp/resources/tpl/index/common/leftAll.html

@@ -48,8 +48,9 @@
 			<ul class="list-unstyled detail details">
 				<li ng-repeat="notice in notices"
 					ng-class="isCurrentTime(dateTime, notice.date) && notice.readStatus == 1 ? 'day-read' : isCurrentTime(dateTime, notice.date) && notice.readStatus == 0 ? 'day-unread' : 'nonday'">
-					<a ng-click="setReadStatus(notice.id)" href="public#/notice/{{notice.id}}" class="" ng-bind="::notice.title" target="_blank"></a><img src="static/img/home/new.png" ng-show="isCurrentTime(dateTime, notice.date)">
+					<a href="{{toB2cLink}}/help/helpDetail/{{notice.num}}" class="" ng-bind="::notice.title" target="_blank"></a><img src="static/img/home/new.png" ng-show="isCurrentTime(dateTime, notice.date)">
 				</li>
+				<li ng-if="notices.length === 0">暂无公告信息!</li>
 			</ul>
 		</div>
 	</div>