This commit is contained in:
aozhiwei 2019-07-29 15:57:33 +08:00
parent d1bbfce14e
commit e3ac11694b

View File

@ -48,7 +48,7 @@ class KefuController {
$url .= $gameid . '/' . $condition; $url .= $gameid . '/' . $condition;
$response = ''; $response = '';
$params = array(); $params = array();
if (!phpcommon\HttpClient::get($url, $params ,$response)) { if (!phpcommon\HttpClient::get($url, $params, $response)) {
die(); die();
return; return;
} }
@ -87,8 +87,8 @@ class KefuController {
'to' => $accountid, 'to' => $accountid,
'game_id' => phpcommon\extractGameId($accountid), 'game_id' => phpcommon\extractGameId($accountid),
'from' => '客服', 'from' => '客服',
'mail_type' => '-1', 'mail_type' => -1,
'mail_subtype' => '-1', 'mail_subtype' => -1,
'subject' => '领奖', 'subject' => '领奖',
'content' => '领取奖励', 'content' => '领取奖励',
'sendtime' => time(), 'sendtime' => time(),
@ -231,24 +231,25 @@ class KefuController {
array( array(
':last_idx' => $last_idx, ':last_idx' => $last_idx,
)); ));
if ($rows) { if (!$rows || count($rows) <= 0) {
foreach ($rows as $row) { break;
if (isset($share_conf[$row['gameid']])) { }
$game_conf = $share_conf[$row['gameid']]; foreach ($rows as $row) {
if (!isset($media_conf[$row['gameid']])) { if (isset($share_conf[$row['gameid']])) {
$media_conf['gameid'] = $this->getMediaId($row['gameid']); $game_conf = $share_conf[$row['gameid']];
} if (!isset($media_conf[$row['gameid']])) {
$game_conf['thumb_media_id'] = $media_conf[$row['gameid']]; $media_conf['gameid'] = $this->getMediaId($row['gameid']);
$this->sendKefuMsg($row['accountid'], }
array ( $game_conf['thumb_media_id'] = $media_conf[$row['gameid']];
"touser" => $row['openid'], $this->sendKefuMsg($row['accountid'],
"msgtype" => "miniprogrampage", array (
"miniprogrampage" => $game_conf "touser" => $row['openid'],
)); "msgtype" => "miniprogrampage",
"miniprogrampage" => $game_conf
));
if ($row['idx'] > $last_idx) { if ($row['idx'] > $last_idx) {
$last_idx = $row['idx']; $last_idx = $row['idx'];
}
} }
} }
} }