1
0

SaleController.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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\PropertyHeadLists;
  23. use app\workerapi\lists\TenantRegisterLists;
  24. use app\workerapi\logic\DictLogic;
  25. use app\workerapi\logic\LoginLogic;
  26. use app\workerapi\logic\MasterWorkerRegisterLogic;
  27. use app\workerapi\logic\PropertyHeadLogic;
  28. use app\workerapi\logic\SaleLogic;
  29. use app\workerapi\logic\TenantRegisterLogic;
  30. use app\workerapi\validate\LoginAccountValidate;
  31. use app\workerapi\validate\RegisterValidate;
  32. /**
  33. * 销售
  34. * Class SaleController
  35. * @package app\workerapi\controller
  36. */
  37. class SaleController extends BaseApiController
  38. {
  39. public array $notNeedLogin = ['register', 'account','getTenantList','getTenantDetail','getWorkerList','getWorkerDetail'];
  40. /**
  41. * @notes 注册账号
  42. * @return \think\response\Json
  43. * @author 段誉
  44. * @date 2022/9/7 15:38
  45. */
  46. public function register()
  47. {
  48. return $this->success('注册成功', [], 1, 1);
  49. }
  50. /**
  51. * @notes 手机号密码/手机号验证码登录
  52. * @return \think\response\Json
  53. * @author 段誉
  54. * @date 2022/9/16 10:42
  55. */
  56. public function account()
  57. {
  58. $params = request()->post();
  59. $result = SaleLogic::login($params);
  60. if (false === $result) {
  61. return $this->fail(SaleLogic::getError());
  62. }
  63. return $this->data($result);
  64. }
  65. /**
  66. * 销售查看门店入驻情况列表
  67. */
  68. public function getTenantList()
  69. {
  70. return $this->dataLists(new TenantRegisterLists());
  71. }
  72. /**
  73. * 销售查看门店入驻详情
  74. */
  75. public function getTenantDetail()
  76. {
  77. $params = request()->get();
  78. $result = TenantRegisterLogic::detail($params);
  79. return $this->data($result);
  80. }
  81. /**
  82. * 销售查看工程师入驻情况列表
  83. */
  84. public function getWorkerList()
  85. {
  86. return $this->dataLists(new MasterWorkerRegisterLists());
  87. }
  88. /**
  89. * 销售查看工程师入驻详情
  90. */
  91. public function getWorkerDetail()
  92. {
  93. $params = request()->get();
  94. $result = MasterWorkerRegisterLogic::detail($params);
  95. return $this->data($result);
  96. }
  97. /**
  98. * 销售查看代理列表
  99. */
  100. public function getPropertyList()
  101. {
  102. return $this->dataLists(new PropertyHeadLists());
  103. }
  104. /**
  105. * 销售查看代理详情
  106. */
  107. public function getPropertyDetail()
  108. {
  109. $params = request()->get();
  110. $result = PropertyHeadLogic::detail($params);
  111. return $this->data($result);
  112. }
  113. }