Browse Source

bug fix wrong parameters when call HeroUnion api

master
filesite 8 months ago
parent
commit
360b7cb225
  1. 9
      themes/tajian/controller/FrontapiController.php

9
themes/tajian/controller/FrontapiController.php

@ -202,9 +202,9 @@ Class FrontApiController extends SiteController { @@ -202,9 +202,9 @@ Class FrontApiController extends SiteController {
'url' => $shareUrl,
'platform' => $platform,
'contract' => $heroUnionConfig['contract'],
'data_mode' => $heroUnionConfig['contract'],
'country' => $heroUnionConfig['contract'],
'lang' => $heroUnionConfig['contract'],
'data_mode' => $heroUnionConfig['data_mode'],
'country' => $heroUnionConfig['country'],
'lang' => $heroUnionConfig['lang'],
'notify_url' => $heroUnionConfig['notify_url'],
);
$params['sign'] = $this->sign($params, $heroUnionConfig['token']);
@ -213,7 +213,8 @@ Class FrontApiController extends SiteController { @@ -213,7 +213,8 @@ Class FrontApiController extends SiteController {
$timeout = 10;
$pc = false;
$headers = array("Content-Type: application/json");
$res = $this->request($api, $params, $timeout, $pc, $headers);
//以json格式post数据
$res = $this->request($api, json_encode($params), $timeout, $pc, $headers);
return !empty($res) && $res['status'] == 200 ? $res['result'] : false;
}

Loading…
Cancel
Save