new banner function
This commit is contained in:
@@ -109,7 +109,7 @@ $routes->post('/en/wrench/api/v1/familywallet', 'WrenchWal
|
|||||||
$routes->post('/en/wrench/api/v1/familyresources', 'WrenchResources::familyresources');
|
$routes->post('/en/wrench/api/v1/familyresources', 'WrenchResources::familyresources');
|
||||||
$routes->post('/en/wrench/api/v1/commonmedia', 'WrenchResources::commonmedia');
|
$routes->post('/en/wrench/api/v1/commonmedia', 'WrenchResources::commonmedia');
|
||||||
|
|
||||||
$routes->post('/en/wrench/api/v1/familybanners', 'WrenchBanners::apigate'); // class WrenchBanners WrenchApi
|
$routes->post('/en/wrench/api/v1/familybanners', 'WrenchBanners::familyBanners'); // class WrenchBanners WrenchApi
|
||||||
|
|
||||||
$routes->post('/en/wrench/api/v1/familyrewardhx', 'WrenchApi::apigate');
|
$routes->post('/en/wrench/api/v1/familyrewardhx', 'WrenchApi::apigate');
|
||||||
$routes->post('/en/wrench/api/v1/familytransferstart', 'WrenchApi::apigate');
|
$routes->post('/en/wrench/api/v1/familytransferstart', 'WrenchApi::apigate');
|
||||||
|
|||||||
@@ -12,6 +12,31 @@ class WrenchBanners extends BaseController
|
|||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"action": 11200,
|
||||||
|
"member_id": "379",
|
||||||
|
"uid": "5c2f7660-2214-4c75-98b0-12e44c0d7e78",
|
||||||
|
"sessionid": "800EBCB2C336A6954BB4FA589988092434B6221CBCCF9E1D92F09D9E10CA77AC",
|
||||||
|
"limit": 30,
|
||||||
|
"offset": 0
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
public function familyBanners(){
|
||||||
|
|
||||||
|
$raw_json = file_get_contents('php://input');
|
||||||
|
$in = json_decode($raw_json, true);
|
||||||
|
|
||||||
|
// $in["action"] = WRENCHBOARD_ACCOUNT_LOGIN;
|
||||||
|
$endpoint = "FAMILY_BANNERS-". $in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
|
||||||
|
$out = $this->getCache($endpoint); // try find in cache
|
||||||
|
if ( count($out) == 0 ){
|
||||||
|
$local_url = "http://".$this->micro_service_net1.":3032/familybanners";
|
||||||
|
$out = $this->APIcall('GET', $local_url, $in);
|
||||||
|
$this->saveCache($endpoint,$out,1500);
|
||||||
|
}
|
||||||
|
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||||
|
}
|
||||||
|
|
||||||
public function apigate(){
|
public function apigate(){
|
||||||
log_message('critical', "0001");
|
log_message('critical', "0001");
|
||||||
|
|||||||
Reference in New Issue
Block a user