olduser.js 1.31 KB
Newer Older
manxiaoqiang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(function(){
     angular.module("app.login")
        .controller("olduserCtrl",["$scope","UtilService","$http","$interval","$location",olduserCtrl]);

    function olduserCtrl($scope,UtilService,$http,$interval,$location){
        //loading加载
        $scope.showLoading = function(){
            document.getElementById("sysLoad").style.display = "block";
        }
        $scope.hideLoading = function(){
            document.getElementById("sysLoad").style.display = "none";
        }
        //$scope.registerId = $location.search().id;
        //$scope.registerEmail= $location.search().email;
yangfangfang committed
15 16 17
        $scope.registerId = UtilService.getCookie("regId");
        $scope.registerEmail= UtilService.getCookie("regEmail");
        $scope.flag = UtilService.getCookie("regFlag");
manxiaoqiang committed
18 19 20 21 22 23 24 25 26 27 28 29 30
        $scope.hasReged = true;

        $scope.oldEmail = function(){
            $scope.showLoading();
            $http.get("api/reged/sendeactivemail/"+$scope.registerId+"/"+1).success(function(data){
                $scope.hideLoading();
                if(data.content == "success"){
                    UtilService.setCookie("ryioAcvitation",0,7);
                }else{
                    UtilService.setCookie("ryioAcvitation",1,7);
                }
                window.location.href = "activation.html";
            });
yangfangfang committed
31

manxiaoqiang committed
32 33
        }
    }
yangfangfang committed
34
})();