Subject.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. namespace app\master\controller;
  3. use app\core\model\InterestTimeType;
  4. use app\core\model\InterestType;
  5. use app\core\model\SubjectType;
  6. use app\core\model\Subject as Model;
  7. use app\master\logic\Subject as Logic;
  8. use think\Config;
  9. class Subject extends Base
  10. {
  11. //得到产品类型
  12. public function getSubjectTypeList() {
  13. $function = __FUNCTION__;
  14. return json($this->logic->$function());
  15. }
  16. //得到计息类型
  17. public function getInterestTypeList() {
  18. $function = __FUNCTION__;
  19. return json($this->logic->$function());
  20. }
  21. //生成一个标的
  22. public function update() {
  23. $function = __FUNCTION__;
  24. return json($this->logic->$function());
  25. }
  26. //得到列表
  27. public function getSubjectList() {
  28. $function = __FUNCTION__;
  29. return json($this->logic->$function());
  30. }
  31. //得到状态列表
  32. public function getStatusList() {
  33. $function = __FUNCTION__;
  34. return json($this->logic->$function());
  35. }
  36. //得到放款列表
  37. public function getStatusLoanList() {
  38. $function = __FUNCTION__;
  39. return json($this->logic->$function());
  40. }
  41. //审核通过,上线
  42. public function actionOnline() {
  43. $function = __FUNCTION__;
  44. return json($this->logic->$function());
  45. }
  46. //审核通过,上线
  47. public function actionDelete() {
  48. $function = __FUNCTION__;
  49. return json($this->logic->$function());
  50. }
  51. //虚拟认购
  52. public function actionForged() {
  53. $function = __FUNCTION__;
  54. return json($this->logic->$function());
  55. }
  56. //得到详细
  57. public function getDetail() {
  58. $function = __FUNCTION__;
  59. return json($this->logic->$function());
  60. }
  61. public function actionFang() {
  62. $function = __FUNCTION__;
  63. return json($this->logic->$function());
  64. }
  65. public function actionExport() {
  66. $function = __FUNCTION__;
  67. return json($this->logic->$function());
  68. }
  69. /*public function index()
  70. {
  71. $subjectTypeList = SubjectType::all();
  72. $statusList = Model::getStatusList();
  73. $this->assign('subjectTypeList',$subjectTypeList->toArray());
  74. $this->assign('statusList',$statusList);
  75. // 模板输出
  76. return $this->fetch();
  77. }
  78. public function update()
  79. {
  80. $subjectTypeList = SubjectType::all();
  81. $interestTypeList = InterestType::all();
  82. $interestTimeTypeList = InterestTimeType::getInterestTimeTypeList(Config::get('interest.default_interest_time_type'));
  83. // 模板变量赋值
  84. $this->assign('subjectTypeList', $subjectTypeList->toArray());
  85. $this->assign('interestTypeList', $interestTypeList->toArray());
  86. $this->assign('interestTimeTypeList', $interestTimeTypeList);
  87. $this->assign('defaultInterestTimeTypeID', Config::get('interest.default_interest_time_type'));
  88. $this->assign('overtimeIsinterest', Config::get('interest.overtime_isinterest'));
  89. $this->assign('repaytimeDelaySpan', Config::get('interest.repaytime_delay_span'));
  90. // 或者批量赋值
  91. $this->assign([
  92. 'name' => 'ThinkPHP',
  93. 'email' => 'thinkphp@qq.com'
  94. ]);
  95. // 模板输出
  96. return $this->fetch();
  97. }*/
  98. public $logic;
  99. public function __initialize() {
  100. $this->logic = new Logic($this->request);
  101. }
  102. }