(function () { "use strict"; angular .module('codeAPLEBOX.client.user.customer.setting.mydeposit') .controller('mydepositController', mydepositController); /* @ngInject */ function mydepositController($state, $stateParams, $cookies, appConfig, $log, WEB_API_CUSTOMER) { var vm = this; // ======================================================================= // 초기데이터 // ======================================================================= vm.customerInfo = $cookies.getObject("customerInfo"); iniData(); // ======================================================================= // Angularjs Function // ======================================================================= vm.goBack = function(){ // 다른페이지 var previousState = $cookies.getObject('previousState'); $state.go(previousState); getCustomerDeposit(); } // ======================================================================= // Common API // ======================================================================= function iniData(){ if($stateParams.previousState != null){ $cookies.putObject('previousState', $stateParams.previousState) } getCustomerDeposit(); } function getCustomerDeposit() { WEB_API_CUSTOMER.getCustomerDeposit({ customerId: vm.customerInfo.id }).then(function (result) { vm.basicInfo = result.data.basicInfo; vm.personalDepositList = result.data.personalDepositList; }).catch(function (err) { $log.error(err); }); } } })();