Index.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. * @param \think\Request $request
  36. * @return \think\Response
  37. */
  38. public function save(Request $request)
  39. {
  40. //
  41. }
  42. /**
  43. * 显示指定的资源
  44. *
  45. * @param int $id
  46. * @return \think\Response
  47. */
  48. public function read($id)
  49. {
  50. //
  51. }
  52. /**
  53. * 显示编辑资源表单页.
  54. *
  55. * @param int $id
  56. * @return \think\Response
  57. */
  58. public function edit($id)
  59. {
  60. //
  61. }
  62. /**
  63. * 保存更新的资源
  64. *
  65. * @param \think\Request $request
  66. * @param int $id
  67. * @return \think\Response
  68. */
  69. public function update(Request $request, $id)
  70. {
  71. //
  72. }
  73. /**
  74. * 删除指定资源
  75. *
  76. * @param int $id
  77. * @return \think\Response
  78. */
  79. public function delete($id)
  80. {
  81. //
  82. }
  83. }