Home banners
This commit is contained in:
@@ -82,6 +82,28 @@ class ResultFormatter extends Model
|
|||||||
|
|
||||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||||
switch ($in["action"]) {
|
switch ($in["action"]) {
|
||||||
|
case WRENCHBOARD_ACCOUNT_HOMEBANNERS:
|
||||||
|
$total = $out["total_record"];
|
||||||
|
$res = array(
|
||||||
|
"status" => $out["status"],
|
||||||
|
"total_record" => ($total - 1),
|
||||||
|
"internal_return" => $out["internal_return"],
|
||||||
|
"result_list" => array(),
|
||||||
|
);
|
||||||
|
for ($i = 0; $i < $total; $i++) {
|
||||||
|
$key = sprintf("%05d", $i);
|
||||||
|
$res["result_list"][] = array(
|
||||||
|
"title" => $out["title_${key}"],
|
||||||
|
"contract" => $out["contract_${key}"],
|
||||||
|
"card_type" => $out["card_type_${key}"],
|
||||||
|
"card_style" => $out["card_style_${key}"],
|
||||||
|
"description" => $out["description_${key}"],
|
||||||
|
"blog_id" => $out["blog_id_${key}"],
|
||||||
|
"card_icon" => $out["card_icon_${key}"],
|
||||||
|
"offer_id" => $out["offer_id_${key}"],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WRENCHBOARD_CONTRACT_MSGLIST:
|
case WRENCHBOARD_CONTRACT_MSGLIST:
|
||||||
$total = $out["total_record"];
|
$total = $out["total_record"];
|
||||||
$res = array(
|
$res = array(
|
||||||
|
|||||||
@@ -76,7 +76,28 @@ function processOutJson($in, $out) {
|
|||||||
|
|
||||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||||
switch ($in["action"]) {
|
switch ($in["action"]) {
|
||||||
|
case WRENCHBOARD_ACCOUNT_HOMEBANNERS:
|
||||||
|
$total = $out["total_record"];
|
||||||
|
$res = array(
|
||||||
|
"status" => $out["status"],
|
||||||
|
"total_record" => ($total - 1),
|
||||||
|
"internal_return" => $out["internal_return"],
|
||||||
|
"result_list" => array(),
|
||||||
|
);
|
||||||
|
for ($i = 0; $i < $total; $i++) {
|
||||||
|
$key = sprintf("%05d", $i);
|
||||||
|
$res["result_list"][] = array(
|
||||||
|
"title" => $out["title_${key}"],
|
||||||
|
"contract" => $out["contract_${key}"],
|
||||||
|
"card_type" => $out["card_type_${key}"],
|
||||||
|
"card_style" => $out["card_style_${key}"],
|
||||||
|
"description" => $out["description_${key}"],
|
||||||
|
"blog_id" => $out["blog_id_${key}"],
|
||||||
|
"card_icon" => $out["card_icon_${key}"],
|
||||||
|
"offer_id" => $out["offer_id_${key}"],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WRENCHBOARD_CONTRACT_MSGLIST:
|
case WRENCHBOARD_CONTRACT_MSGLIST:
|
||||||
$total = $out["total_record"];
|
$total = $out["total_record"];
|
||||||
$res = array(
|
$res = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user