历史纪录最多保存15条

This commit is contained in:
luchenqun 2017-04-10 20:23:27 +08:00
parent a8f8a29cfb
commit 863b2dff2e
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
function saveHistory() {
var datas = [];
$scope.searchHistory.slice(0, 15); // 最多保留15个历史记录
$scope.searchHistory = $scope.searchHistory.slice(0, 15); // 最多保留15个历史记录
$scope.searchHistory.forEach((item, index) => {
datas.push({
t: item.t,