SaleController.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | whitef快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/whitef
  8. // | github下载:https://github.com/likeshop-github/whitef
  9. // | 访问官网:https://www.whitef.cn
  10. // | whitef团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: whitefTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\workerapi\controller;
  15. use app\common\enum\notice\NoticeEnum;
  16. use app\common\model\master_worker\MasterWorker;
  17. use app\common\model\master_worker_register\MasterWorkerRegister;
  18. use app\common\model\notice\NoticeSetting;
  19. use app\common\model\sale\Sale;
  20. use app\common\service\wechat\WeChatOaService;
  21. use app\workerapi\lists\MasterWorkerRegisterLists;
  22. use app\workerapi\lists\TenantRegisterLists;
  23. use app\workerapi\logic\DictLogic;
  24. use app\workerapi\logic\LoginLogic;
  25. use app\workerapi\logic\MasterWorkerRegisterLogic;
  26. use app\workerapi\logic\SaleLogic;
  27. use app\workerapi\logic\TenantRegisterLogic;
  28. use app\workerapi\validate\LoginAccountValidate;
  29. use app\workerapi\validate\RegisterValidate;
  30. /**
  31. * 销售
  32. * Class SaleController
  33. * @package app\workerapi\controller
  34. */
  35. class SaleController extends BaseApiController
  36. {
  37. public array $notNeedLogin = ['register', 'account'];
  38. /**
  39. * @notes 注册账号
  40. * @return \think\response\Json
  41. * @author 段誉
  42. * @date 2022/9/7 15:38
  43. */
  44. public function register()
  45. {
  46. return $this->success('注册成功', [], 1, 1);
  47. }
  48. /**
  49. * @notes 手机号密码/手机号验证码登录
  50. * @return \think\response\Json
  51. * @author 段誉
  52. * @date 2022/9/16 10:42
  53. */
  54. public function account()
  55. {
  56. $params = request()->post();
  57. $result = SaleLogic::login($params);
  58. if (false === $result) {
  59. return $this->fail(SaleLogic::getError());
  60. }
  61. return $this->data($result);
  62. }
  63. /**
  64. * 销售查看门店入驻情况列表
  65. */
  66. public function getTenantList()
  67. {
  68. return $this->dataLists(new TenantRegisterLists());
  69. }
  70. /**
  71. * 销售查看门店入驻详情
  72. */
  73. public function getTenantDetail()
  74. {
  75. $params = request()->get();
  76. $result = TenantRegisterLogic::detail($params);
  77. return $this->data($result);
  78. }
  79. /**
  80. * 销售查看工程师入驻情况列表
  81. */
  82. public function getWorkerList()
  83. {
  84. return $this->dataLists(new MasterWorkerRegisterLists());
  85. }
  86. /**
  87. * 销售查看工程师入驻详情
  88. */
  89. public function getWorkerDetail()
  90. {
  91. $params = request()->get();
  92. $result = MasterWorkerRegisterLogic::detail($params);
  93. return $this->data($result);
  94. }
  95. }