Index.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\cxinv\controller;
  4. use app\common\Ocr;use think\Request;
  5. class Index
  6. {
  7. /**
  8. * 显示资源列表
  9. *
  10. * @return \think\Response
  11. */
  12. public function index()
  13. {
  14. $param=request()->param();
  15. $ocr= Ocr::getInstance();
  16. $code=$param['code'];
  17. $number=$param['number'];
  18. $issueDate=$param['issueDate'];
  19. $checkCode=$param['checkCode'];
  20. $subtotalAmount=$param['subtotalAmount'];
  21. $data=$ocr->InvoiceVerification($code,$number,$issueDate,$checkCode,$subtotalAmount);
  22. return json($data);
  23. }
  24. /**
  25. * 显示创建资源表单页.
  26. *
  27. * @return \think\Response
  28. */
  29. public function create()
  30. {
  31. //
  32. }
  33. /**
  34. * 保存新建的资源
  35. *
  36. * @param \think\Request $request
  37. * @return \think\Response
  38. */
  39. public function save(Request $request)
  40. {
  41. //
  42. }
  43. /**
  44. * 显示指定的资源
  45. *
  46. * @param int $id
  47. * @return \think\Response
  48. */
  49. public function read($id)
  50. {
  51. //
  52. }
  53. /**
  54. * 显示编辑资源表单页.
  55. *
  56. * @param int $id
  57. * @return \think\Response
  58. */
  59. public function edit($id)
  60. {
  61. //
  62. }
  63. /**
  64. * 保存更新的资源
  65. *
  66. * @param \think\Request $request
  67. * @param int $id
  68. * @return \think\Response
  69. */
  70. public function update(Request $request, $id)
  71. {
  72. //
  73. }
  74. /**
  75. * 删除指定资源
  76. *
  77. * @param int $id
  78. * @return \think\Response
  79. */
  80. public function delete($id)
  81. {
  82. //
  83. }
  84. }