EmpController.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Http\Controllers\Mobile\DouyinRecruit;
  3. use App\Http\Controllers\Mobile\MobileBaseController;
  4. use App\Models\DouyinRecruit\CompanyEmployee;
  5. class EmpController extends MobileBaseController
  6. {
  7. /**
  8. * 注册
  9. */
  10. public function register($id)
  11. {
  12. return view('mobile.app.douyin_recruit.register', ['id' => $id, 'wap_title' => '注册']);
  13. }
  14. /**
  15. * 注册提交
  16. */
  17. public function registerPost()
  18. {
  19. $post = request()->post();
  20. unset($post['_token']);
  21. CompanyEmployee::where('id', $post['id'])->update($post);
  22. return $this->sendSuccessResponse(['id' => $post['id']]);
  23. }
  24. /**
  25. * 详情页
  26. */
  27. public function info($id)
  28. {
  29. $emp = CompanyEmployee::where('id', $id)->first();
  30. if (empty($emp)) {
  31. return '';
  32. }
  33. if (empty($emp['name'])) {
  34. return redirect(route('mobile.douyin_recruit.emp.register', ['id' => $emp['id']]));
  35. }
  36. return view('mobile.app.douyin_recruit.info', ['id' => $id, 'wap_title' => '分享链接']);
  37. }
  38. }