import 'package:account_center/api/base_model.dart';
import 'package:flutter_clx_base/flutter_clx_base.dart';

import 'new_enterprise_record_state.dart';

class NewEnterpriseRecordLogic extends GetxController {
  final NewEnterpriseRecordState state = NewEnterpriseRecordState();

  void enterpriseRecordList(page, pageSize, success) {
    fetchList(Method.post, url: HttpApi.newEnterpriseRecordList,
        onSuccess: (data) {
      success(data);
    }, params: {'page': page, 'pageSize': pageSize});
  }

  String authStateIcon(int state) {
    switch (state) {
      case 10:
        return 'ic_reviewed'; //审核中
      case 20:
        return 'ic_adopt'; //审核成功
      case 30:
      case 40:
        return 'ic_reject'; //审核失败
      default:
        return '';
    }
  }

  void goToEnterpriseSee(int id) {
    /* Get.toNamed(RouteConfig.enterpriseSeePage,
        arguments: {'companyNo': id, 'type': 2});*/
  }
}
