VerificationController.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop开源商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | gitee下载:https://gitee.com/likeshop_gitee
  7. // | github下载:https://github.com/likeshop-github
  8. // | 访问官网:https://www.likeshop.cn
  9. // | 访问社区:https://home.likeshop.cn
  10. // | 访问手册:http://doc.likeshop.cn
  11. // | 微信公众号:likeshop技术社区
  12. // | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
  13. // | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
  14. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  15. // | likeshop团队版权所有并拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshop.cn.team
  18. // +----------------------------------------------------------------------
  19. namespace app\shopapi\controller;
  20. use app\shopapi\lists\VerificationLists;
  21. use app\shopapi\logic\VerificationLogic;
  22. use app\shopapi\validate\VerificationValidate;
  23. class VerificationController extends BaseShopController
  24. {
  25. /**
  26. * @notes 查看自提订单列表
  27. * @return \think\response\Json
  28. * @author ljj
  29. * @date 2021/8/27 4:16 下午
  30. */
  31. public function lists()
  32. {
  33. return $this->dataLists(new VerificationLists());
  34. }
  35. /**
  36. * @notes 提货核销
  37. * @return \think\response\Json
  38. * @throws \think\db\exception\DataNotFoundException
  39. * @throws \think\db\exception\DbException
  40. * @throws \think\db\exception\ModelNotFoundException
  41. * @author ljj
  42. * @date 2021/8/27 5:38 下午
  43. */
  44. public function verification()
  45. {
  46. $params = (new VerificationValidate())->goCheck('verification',['user_id'=>$this->userId]);
  47. $result = (new VerificationLogic())->verification($params);
  48. // if (isset($result['code']) && $result['code'] == 10) {
  49. // return $this->success($result['msg'],[],$result['code']);
  50. // }
  51. return $this->success('', $result);
  52. }
  53. /**
  54. * @notes 确认提货
  55. * @return \think\response\Json
  56. * @author ljj
  57. * @date 2021/8/27 6:05 下午
  58. */
  59. public function verificationConfirm()
  60. {
  61. $params = (new VerificationValidate())->post()->goCheck('verificationConfirm',['user_id'=>$this->userId]);
  62. $result = (new VerificationLogic())->verificationConfirm($params);
  63. if (false === $result) {
  64. return $this->fail(VerificationLogic::getError());
  65. }
  66. return $this->success('提货成功',[],1,1);
  67. }
  68. }