ECJiaWiki:Api:adsense adsense group api

来自ECJiaWiki
跳到导航 跳到搜索

应用场景

获取广告组信息

接口名称

adsense_group

请求参数

字段名 变量名 必填 类型 示例值 描述
当前城市ID city char 0 当前城市ID
广告位置代号 code char home_complex_adsense 广告位置代号
客户端 client int 2:Android;1:iPhone;4:H5;8:PC 客户端

举例如下

$adsense_group = RC_Api::api('adsense', 'adsense_group',array('code' => 'home_complex_adsense','client'=> 4));

成功举例如下

CONTENT: Array
(
    [0] => Array
        (
            [title] => 狂欢大促
            [adsense] => Array
                (
                    [0] => Array
                        (
                            [ad_id] => 133
                            [ad_name] => 移动首页广告组2.1
                            [ad_link] => ecjiaopen://app?open_type=goods_seller_list&category_id=1033
                            [ad_img] => http://www.test.com/content/uploads/data/afficheimg/1470682423300753249.png
                            [start_time] => 2016-01-15
                            [end_time] => 2020-12-31
                        )

                )

        )

    [1] => Array
        (
            [title] => 吃货复苏季
            [adsense] => Array
                (
                    [0] => Array
                        (
                            [ad_id] => 137
                            [ad_name] => 移动首页广告组3.1
                            [ad_link] => ecjiaopen://app?open_type=goods_seller_list&category_id=1078
                            [ad_img] => http://www.test.com/content/uploads/data/afficheimg/1480630295423978066.png
                            [start_time] => 2016-10-18
                            [end_time] => 2020-12-31
                        )

                    [1] => Array
                        (
                            [ad_id] => 138
                            [ad_name] => 移动首页广告组3.2
                            [ad_link] => ecjiaopen://app?open_type=goods_detail&goods_id=653
                            [ad_img] => http://www.test.com/content/uploads/data/afficheimg/1477679946715276347.png
                            [start_time] => 2016-10-12
                            [end_time] => 2020-12-31
                        )

                    [2] => Array
                        (
                            [ad_id] => 139
                            [ad_name] => 移动首页广告组3.3
                            [ad_link] => ecjiaopen://app?open_type=goods_detail&goods_id=1039
                            [ad_img] => http://www.test.com/content/uploads/data/afficheimg/1477679969238922905.png
                            [start_time] => 2016-10-15
                            [end_time] => 2020-12-31
                        )

                    [3] => Array
                        (
                            [ad_id] => 140
                            [ad_name] => 移动首页广告组3.4
                            [ad_link] => ecjiaopen://app?open_type=goods_detail&goods_id=311
                            [ad_img] => http://www.test.com/content/uploads/data/afficheimg/1477679989058885859.png
                            [start_time] => 2016-01-15
                            [end_time] => 2020-12-31
                        )

                )

        )

)

失败举例如下

注:错误编码