ECJiaWiki:Api:adsense shortcut api

来自ECJiaWiki
跳到导航 跳到搜索

应用场景

 获取广告位的广告列表

接口名称

shortcut

请求参数

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

举例如下

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

成功举例如下

CONTENT: Array
(
    [0] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700183823048386.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1032
            [text] => 水果蔬菜
        )

    [1] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700190620505129.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1047
            [text] => 肉禽蛋奶
        )

    [2] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700197732149350.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1064
            [text] => 冷热速食
        )

    [3] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700204215089751.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1078
            [text] => 休闲食品
        )

    [4] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700210378659761.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1092
            [text] => 酒水饮料
        )

    [5] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700217181679112.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1114
            [text] => 粮油调味
        )

    [6] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700223890846471.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1135
            [text] => 清洁日化
        )

    [7] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700537011530251.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1167
            [text] => 家居用品
        )

    [8] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1477700617184169592.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1186
            [text] => 鲜花蛋糕
        )

    [9] => Array
        (
            [image] => http://www.test.com/content/uploads/data/shortcut/1478221589448573017.png
            [url] => ecjiaopen://app?open_type=goods_seller_list&category_id=1240
            [text] => 上门服务
        )

)

失败举例如下

注:错误编码