1
0

SaleController.php 3.7 KB

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