userId? $this->userId: $openid); $needRegProfile = isset($userInfo['is_reg_profile'])? $userInfo['is_reg_profile'] : 0; $userStatus = isset($userInfo['user_status']) ? intval($userInfo['user_status']) : 0; $agentType = isset($userInfo['agent_type']) ? intval($userInfo['agent_type']) : 0; $agentStatus = isset($userInfo['agent_status']) ? intval($userInfo['agent_status']) : 0; $action = request()->action(); if($agentType == 1 && $agentStatus != 3 && ($needRegProfile != 1 || ($action != 'home' && $userStatus != 1))){ $url = url('/weixin/market/index', '', '', true); header("location:{$url}"); exit; } // 注销用户跳转 if ($userStatus == -1) { ob_clean(); header('location:https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg3ODEzNjMzMQ==&scene=124#wechat_redirect'); exit; } // 验证用户是否完善资料 $action = request()->action(); if(!in_array($action, ['home','profile']) && $needRegProfile != 1){ Wechat::redirectUrl(url('/weixin/index/entry', '', '', true)); exit; } } /** * 用户中心 * @author wesmiler * @return mixed */ public function index() { return $this->fetch(); } /** * 用户资料 * @return mixed] */ public function profile() { return $this->fetch(); } /** * 个人主页 * @return mixed */ public function home() { $sid = input('sid', 0); if($sid){ session('sid', input('sid', 0)); } return $this->fetch(); } /** * 邀请页面 * @return mixed */ public function invite() { return $this->fetch(); } /** * 我的活动 * @return mixed */ public function activity() { return $this->fetch(); } /** * 隐私设置 * @return mixed */ public function secret() { return $this->fetch(); } /** * 怦然心动 * @return mixed */ public function heartbeat() { return $this->fetch(); } /** * 我的收藏 * @return mixed */ public function collect() { return $this->fetch(); } /** * 我的消息 * @return mixed */ public function message() { return $this->fetch(':member/message/index'); } /** * 我的消息详情 * @return mixed */ public function messageDetail() { return $this->fetch(':member/message/detail'); } /** * 我的相册 * @return mixed */ public function albums() { return $this->fetch(':member/data/albums'); } /** * 个人信息 * @return mixed */ public function info() { return $this->fetch(':member/data/info'); } /** * 我的介绍 * @return mixed */ public function intro() { return $this->fetch(':member/data/intro'); } /** * 家庭介绍 * @return mixed */ public function family() { return $this->fetch(':member/data/family'); } /** * 兴趣爱好 * @return mixed */ public function hobby() { return $this->fetch(':member/data/hobby'); } /** * 单身原因 * @return mixed */ public function cause() { return $this->fetch(':member/data/cause'); } /** * 理想需求 * @return mixed */ public function purpose() { return $this->fetch(':member/data/purpose'); } /** * 期待的生活 * @return mixed */ public function expect() { return $this->fetch(':member/data/expect'); } /** * 个性标签 * @return mixed */ public function tags() { return $this->fetch(':member/data/tags'); } /** * 隐私设置 * @return mixed */ public function privacy() { return $this->fetch(); } /** * 充值 * @return mixed */ public function recharge(){ return $this->fetch(); } /** * 举报用户列表 * @return mixed */ public function complain(){ return $this->fetch(); } /** * 举报用户 * @return mixed */ public function complainSubmit(){ return $this->fetch(); } /** * 用户建议 * @return mixed|string */ public function advice(){ return $this->fetch(); } }