新手求帮忙写个完整的POScms模板中调用实例代码,完整代码
我这样写,好像调用成功了,但不知道怎么输出列表结果

接口信息:
接口地址: http://www.haojingke.com/index.php/api/index/myapi?type=goodslist
支持格式: json
请求方式: post
请求示例: http://www.haojingke.com/index.php/api/index/myapi?type=goodslist&apikey=您申请的apikey&page=1&pageSize=20
请求参数说明:
名称 | 类型 | 必填 | 说明 |
---|
type | String | 是 | goodslist |
apikey | String | 是 | 您在好京客申请的apikey |
iscoupon | int | 否 | 商品类型,1只查有券,0或其他优先展示有券商品 |
keyword | string | 否 | 关键词,根据关键词搜索商品(可搜京东全网商品) |
cname | string | 否 | 分类名称,iscoupon=1时有效 |
minprice | number | 否 | 最小金额,iscoupon=1时有效 |
maxprice | number | 否 | 最大金额,iscoupon=1时有效 |
mincommission | number | 否 | 最小佣金比例,iscoupon=1时有效 |
maxcommission | number | 否 | 最大佣金比例,iscoupon=1时有效 |
mincommissionpirce | number | 否 | 最小佣金金额,iscoupon=1时有效 |
maxcommissionpirce | number | 否 | 最大佣金金额,iscoupon=1时有效 |
sort | string | 否 | 排序 0 默认 1券后价 2券金额 3佣金比例 4 佣金金额,iscoupon=1时有效 |
sortby | string | 否 | asc 升序 desc 降序 ,iscoupon=1时有效,sort为0时无效 |
page | int | 否 | 第几页(默认第1页) |
pageSize | int | 否 | 20-100 默认20 |
spread_type | string | 否 | 推广类型 0 服务费1免单 99查全部 |
JSON返回示例:
{
"data": [
{
"s_id": 36585814,
"skuId": "16928620903",商品id
"skuName": "Zincstic三止水皮肤舒缓喷雾止痒止痛止血蚊虫叮咬舒缓皮肤 单支装",商品名称
"skuDesc": "Zincstic三止水皮肤舒缓喷雾止痒止痛止血蚊虫叮咬舒缓皮肤 单支装",导购信息
"materiaUrl": "http://item.jd.com/16928620903.html", 商品原链接
"picUrl": "http://img14.360buyimg.com/n1/jfs/t17059/71/879006714/311863/757ae878/5aaf122dN5e0b0179.png",图片地址 800x800px
"wlPrice": "45.90",原价
"wlPrice_after": "9.90",券后价
"wlCommissionShare": "60",佣金比例 %
"couponList": "http://coupon.jd.com/ilink/couponActiveFront/front_index.action?key=7d248616231c4910add162dd6d03ebb5&roleId=12213850&to=mall.jd.com/index-715233.html",券链接
"bindType": "3",券种类 暂时无用
"discount": "36.00", 券金额
"quota": "45.00",满多少可用券
"platformType": "0",券使用平台 暂时无用
"beginTime": 1527682800,优惠开始时间
"endTime": 1529151660,优惠结束时间
"cname": "美妆护肤",分类
"cid": 1316,分类id
"goodstype": 0,商品类型 暂时无用
"goodslx": 0,商家类型 暂时无用
"commission": "5.94",PC佣金
"wlCommission": "5.94",无线佣金
"two_hour_sales": 0,两小时销量 暂时无用
"one_day_sales": 0,当天销量 暂时无用
"sales": 0,总销量 暂时无用
"spread_count": 100,服务费商品推广数量
"spread_start_at": 1527004800,服务费商品推广开始时间
"spread_end_at": 1527868800,服务费商品推广结束类型时间
"spread_type": "1",服务费商品推广类型 0 服务费1免单
"spread_amount": "0.00"单个商品推广费用,推广类型为 0时有效,推广类型为 1时已订单上的金额为主
}
],
"message": "success",提示信息
"totalpage": 643,总页数
"total": 12856,总数
"status_code": 200状态码 200表示请求成功 }
可接二开、定制、使用解答