修改备忘录的一些小bug
This commit is contained in:
parent
beb03e04e8
commit
25b182a84e
|
|
@ -13,6 +13,8 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
||||||
$scope.totalPages = 0;
|
$scope.totalPages = 0;
|
||||||
$scope.currentPage = 1;
|
$scope.currentPage = 1;
|
||||||
$scope.inputPage = '';
|
$scope.inputPage = '';
|
||||||
|
$scope.searchWord = $stateParams.searchWord
|
||||||
|
$scope.totalItems = 0;
|
||||||
|
|
||||||
var timeagoInstance = timeago();
|
var timeagoInstance = timeago();
|
||||||
|
|
||||||
|
|
@ -188,12 +190,13 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
||||||
var params = {
|
var params = {
|
||||||
currentPage: $scope.currentPage,
|
currentPage: $scope.currentPage,
|
||||||
perPageItems: perPageItems,
|
perPageItems: perPageItems,
|
||||||
searchWord: $stateParams.searchWord,
|
searchWord: $scope.searchWord,
|
||||||
};
|
};
|
||||||
bookmarkService.getNotes(params)
|
bookmarkService.getNotes(params)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
$scope.notes = data.notes;
|
$scope.notes = data.notes;
|
||||||
$scope.totalPages = Math.ceil(data.totalItems / perPageItems);
|
$scope.totalPages = Math.ceil(data.totalItems / perPageItems);
|
||||||
|
$scope.totalItems = data.totalItems;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
timeagoInstance.cancel();
|
timeagoInstance.cancel();
|
||||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="eight wide column" style="margin-top:10px;">共找到备忘一共约{{notes.length}}个</div>
|
<div class="eight wide column" style="margin-top:10px;"><span ng-show="searchWord">通过搜索关键字"{{searchWord}}",</span>共找到备忘一共约{{totalItems}}个</div>
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<pagination></pagination>
|
<pagination></pagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue