UNPKG

unserver-unify

Version:

27 lines 896 B
'use strict'; angular.module('bamboo').controller('LoginCallbackCtrl', function($state, $localStorage, $location, $timeout, $stateParams) { var self = this; this.type = $stateParams.type; // console.log(self.type); console.log('url',sessionStorage.thirdpartyPage); //console.log(sessionStorage); var url=sessionStorage.thirdpartyPage; $timeout(function() { // $state.go('index.home'); console.log(url); if (url) { // var url = sessionStorage.thirdpartyPage; //delete $localStorage.thirdpartyPage; console.log('--- jump to '); $location.url(url); sessionStorage.removeItem('thirdpartyPage'); // delete $localStorage.thirdpartyPage; } else { $state.go('index.home'); // delete $localStorage.thirdpartyPage; } }, 3000) /* $timeout(function(){ $state.go('index.home'); },3000) */ });