From 41ab5b35984e6b2a862ded003584f11c66ef2885 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Sat, 17 Aug 2019 11:14:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BE=AE=E4=BF=A1=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/weixin-article-controller.js | 24 +++---- public/scripts/services/data-service.js | 2 +- public/views/weixin-article.html | 69 +++++++++---------- 3 files changed, 44 insertions(+), 51 deletions(-) diff --git a/public/scripts/controllers/weixin-article-controller.js b/public/scripts/controllers/weixin-article-controller.js index 20ab23a..d397047 100644 --- a/public/scripts/controllers/weixin-article-controller.js +++ b/public/scripts/controllers/weixin-article-controller.js @@ -98,13 +98,16 @@ app.controller('weixinArticleCtr', ['$scope', '$state', '$sce', '$stateParams', $scope.jumpToUrl(b.url); return; } - // 假装等待一下。。。。。。 - $scope.loadBusy = true; $scope.bookmark = b; + $('.js-weixin-content').modal({ blurring: true }).modal('setting', 'transition', dataService.animation()).modal('show') $timeout(function() { - $('body,html').animate({scrollTop:0},100); - $scope.loadBusy = false; - }, 200) + $('.js-main-content').animate({scrollTop:0},100); + $('.js-weixin-content').modal("refresh"); + }, 10) + } + + $scope.read = function() { + $('.js-weixin-content').modal('setting', 'transition', dataService.animation()).modal('hide'); } // 快捷键r随机推荐 @@ -209,7 +212,7 @@ app.controller('weixinArticleCtr', ['$scope', '$state', '$sce', '$stateParams', } function getHotBookmarksbyAPI() { - $scope.loadBusy = true; + // $scope.loadBusy = true; var requireData = { userId: null, lastupdataTime: new Date().getTime(), @@ -363,14 +366,5 @@ app.controller('weixinArticleCtr', ['$scope', '$state', '$sce', '$stateParams', }, 10); } - $document.bind("keydown", function(event) { - $scope.$apply(function() { - // Esc按键,退出 - if (event.keyCode == 27) { - $scope.bookmark = {}; - } - }) - }); - $scope.getWeixinArticles($scope.channelId, $scope.currentPage); }]); diff --git a/public/scripts/services/data-service.js b/public/scripts/services/data-service.js index c33be74..7ee3979 100644 --- a/public/scripts/services/data-service.js +++ b/public/scripts/services/data-service.js @@ -52,7 +52,7 @@ app.factory('dataService', [function() { ]; var t = data[parseInt(Math.random() * 1000) % data.length]; - return 'fade' || t; // 去掉一些有攻击性的动画 + return t; // 去掉一些有攻击性的动画 }, transition: function(selector, params) { var data = {}; diff --git a/public/views/weixin-article.html b/public/views/weixin-article.html index c9d73fc..0d0243e 100644 --- a/public/views/weixin-article.html +++ b/public/views/weixin-article.html @@ -12,7 +12,7 @@ 正在加载中...
-
+
@@ -39,46 +39,45 @@
-
-
- {{bookmark.title}} -
-
- {{bookmark.created_by}} -    - {{bookmark.account}} -        - {{bookmark.created_at}} -
-
-
-
-

+