IndexController.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * 首页
  4. * @author wesmiler
  5. */
  6. namespace app\weixin\controller;
  7. use app\weixin\model\Wechat;
  8. use app\weixin\model\Member;
  9. use cmf\controller\HomeBaseController;
  10. class IndexController extends BaseController
  11. {
  12. /**
  13. * 首页
  14. * @return mixed
  15. */
  16. public function index(){
  17. return $this->fetch(':index');
  18. }
  19. /**
  20. * 分销用户注册
  21. * @return mixed
  22. */
  23. public function market(){
  24. return $this->fetch();
  25. }
  26. /**
  27. * 进入完善页面
  28. */
  29. public function entry(){
  30. $needRegProfile = session('needRegProfile');
  31. $isRegProfile = Member::where(['id'=> $this->userId])->value('is_reg_profile');
  32. if($isRegProfile == 1 || $needRegProfile==false){
  33. Wechat::redirectUrl(url('/weixin/match/index','','',true));
  34. }
  35. return $this->fetch('entry');
  36. }
  37. /**
  38. * 进入完善页面
  39. */
  40. public function entry1(){
  41. $needRegProfile = session('needRegProfile');
  42. if($needRegProfile == false){
  43. // Wechat::redirectUrl(url('/weixin/match/index','','',true));
  44. }
  45. return $this->fetch('entry1');
  46. }
  47. }
  48. ?>