export class TLeftMenuController {
  constructor($state, $window, toastr, globalVar, $scope, introService) {
    'ngInject';

    this.$state = $state;
    this.$window = $window;
    this.toastr = toastr;
    this.globalVar = globalVar;
    this.introService = introService;

    this.logo = 'app/sample/components/leftMenu/user1.png';
    this.bg = 'app/sample/components/leftMenu/sideNavBg.png';

    this.userInfo = {
      userType: 7,
      username: '99999999999999999999999999999999'
    };

    this.disabled = true;

    this.item = {
      city: [],
      city1: []
    };

    $scope.$on('onCitySelected', function (event, item) {
      // item.cn[] 数组，和面板数量相对应。
      // item.id 区域ID
      // item.zip 邮政编码
      console.log(JSON.stringify(item));
    });

    this.params = {
      member_card: {
        bonus_rule: {
          init_increase_bonus: ''
        }
      }
    };

    this.isShowInputVal = false;

    this.params.member_card.bonus_rule.init_increase_bonus = 20000;
  }

  newGuys() {
    this.introService.exitIntro();
    this.introService.openModal('introOption', 'modal-650');
  }

  toggleCity() {
    this.disabled = !this.disabled;
  }

  onShowInputVal() {
    this.isShowInputVal = !this.isShowInputVal;
  }
}