/** * 检查用户是否已安装指定应用 * * @param String $appName * @param Integer $uid * @param int $appId; * @return boolen * */ function isAddApp($appName = '', $uid = '0', $appId = 0) { return true; $api = new TS_API(); if (!$uid) { $uid = $api->User_getLoggedInUser(); } $userAppId = $api->UserApp_getUserAppId($uid); $appinfo = $api->App_getChoiceList(); if ($appId == 0) { $appId = $api->App_getChoiceId($appName); } if (in_array($appId, $userAppId) || $appinfo[$appId]['status'] == 0) { return true; } else { return false; } return true; }