1383,'name' => '推荐']; $tabs[] = ['special_id' => 1122,'name' => '品牌']; $tabs[] = ['special_id' => 1025,'name' => '护肤']; $tabs[] = ['special_id' => 1035,'name' => '彩妆']; $tabs[] = ['special_id' => 1036,'name' => '洗护']; $tabs[] = ['special_id' => 1019,'name' => '男士']; } else { $tabs = index_tab::instance()->tabs(); } return self::outsuccess(array('tabs' => $tabs)); } public function splashOp() { $sig = $_GET['sig']; $ret = $this->pub_special($this->splash_id()); if(empty($ret['special_list'])) { return self::outsuccess(null); } $block = $ret['special_list'][0]; if(empty($block) || empty($block['items'])) { return self::outsuccess(null); } $image = $block['items'][0]['image']; if(empty($sig) || $sig != md5($image)) { return self::outsuccess(array('sig' => md5($image),'url' => $image)); } else { return self::outsuccess(null); } } private function splash_id() { global $config; $special_id = $config['splash_page']['special_id']; return $special_id; } public function inoherbOp() { return self::outsuccess(['direct_uri' => BASE_SITE_URL . '/hfive/inoherb/index.html?2'],"redirect"); } /** * 会话详情页 talk_type:room/chatwo talk_id:room_id/user * 回话详情@ app打开 * 群详情@ 微信扫码进入 */ public function room_indexOp() { $talk_type = trim($_GET['talk_type']); $talk_id = intval($_GET['talk_id']); $relay_id = intval($_GET['relay_id']); if($talk_id <= 0) { return self::outerr(errcode::ErrParamter); } $is_app = intval(session_helper::isapp()); $from_wechat = util::from_wechat(); $user = session_helper::memberid(); $param = ["talk_type" => $talk_type, "talk_id" => $talk_id , "member_id" => $user,"room_name"=>"","room_avatar"=>"","relay_id"=>$relay_id,"is_app"=>$is_app]; //app内打开请求授权登录 if(($is_app || !$from_wechat) && $user<= 0) { if($talk_type == "room") { return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_room'); }elseif($talk_type == 'chatwo') { return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_chatwo'); }else { } } //微信内打开使用授权判断 if(session_helper::need_wechat_author()) { $author = new thrid_author\wxauthor(); $url = url_helper::room_detail_url($talk_type,$talk_id,$relay_id); $url = $author->enter($url); return self::outsuccess(['direct_uri' => $url],"redirect"); } if($talk_type == "room") { $room_id = $talk_id; try { $tpl = new room\tpl_group_home($user,$talk_id,$relay_id); $param["room_name"] = $tpl->get_room_info()->name(); $param["room_avatar"] = $tpl->get_room_info()->avatar(); return self::outsuccess(['tpl' => $tpl,"param" => $param],'talk/homepage_room'); } catch (Exception $ex) { Log::record("member_talk.room_detail error: room_id={$room_id} user={$user}",Log::ERR); return self::outerr(errcode::ErrParamter); } } elseif($talk_type == 'chatwo') { $other = $talk_id; try { $tpl = new room\tpl_chatwo_home($user,$other); return self::outsuccess(['tpl' => $tpl,"param"=>$param],'talk/homepage_chatwo'); } catch (Exception $ex) { Log::record("member_talk.room_detail error: other={$other} user={$user}",Log::ERR); return self::outerr(errcode::ErrParamter); } } else { return self::outerr(errcode::ErrParamter); } } }