缓存动态页tab,详情返回到对应tab页

This commit is contained in:
txz 2016-07-22 16:26:43 +08:00
parent cef08a717c
commit 7d2ba823e9
1 changed files with 4 additions and 2 deletions

View File

@ -122,12 +122,14 @@ app.controller('ActivityController',
}
break;
}
rms.save("tab_num",$scope.currentTab);
}
$scope.currentTab = 1;
$scope.currentTab = rms.get('tab_num') || 1;
if($scope.activities.length<=0){
$scope.loadActData(1,0);
$scope.loadActData('tab_num',0);
} else {
$timeout(function(){
window.scrollTo(0, rms.get("yoffset"));