game2006api/webapp/controller/MailController.class.php
aozhiwei ef699fe8cd 1
2023-09-14 13:20:36 +08:00

51 lines
1.3 KiB
PHP

<?php
class MailController extends BaseAuthedController {
public function getAttachment()
{
$mailIds = getReqVal('mail_ids', '');
$response = '';
{
$params = array(
'c' => 'Mail',
'a' => 'getAttachment',
'account_id' => myself()->_getAccountId(),
'session_id' => myself()->_getSessionId(),
'mail_ids' => $mailIds
);
$url = self::getMailServerUrl();
if (!phpcommon\HttpClient::get
($url,
$params,
$response)) {
myself()->_rspErr(500, 'server internal error 3, url:' . $url);
die();
return;
}
}
$rspObj = json_decode($response, true);
if ($rspObj && $rspObj['errcode'] == 0) {
$this->procAttachments($rspObj['attachments']);
}
echo $response;
}
private function procAttachments($attachments)
{
}
private static function getMailServerUrl()
{
if (SERVER_ENV != _ONLINE) {
return "https://gamemail-test.kingsome.cn/webapp/index.php";
} else {
return "https://gamemail-test.cebggame.com/webapp/index.php";
}
}
}