wiki:yjp/web-intf

Version 4 (modified by hejingdong, 14 years ago) (diff)

更改格式

1.首页接口---主题列表

原型  http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/ 结构类似:

{
    "total":100,
    "pageIndex":1,
    "pageSize":10,
    "topics":[
        {
            "id":10,
            "bigImg":"http:xxxx",
            "name":"topicName",
            "description":"topic descript"
        },
        {
            "id":11,
            "bigImg":"http:xxxx",
            "name":"topicName",
            "description":"topic descript"
        }
    ]
}

返回参数说明:
total:主题总数量
pageIndex:分页用页码
pageSize:分页用每页数量
topics:主题数组
id:主题的id
bigImg:主题图片
name:主题名称
description:主题描述

2.主题接口

原型  http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/

{
    "total":20,
    "pageIndex":1,
    "pageSize":10,
    "products":[
        {
            "id":10,
            "bigImg":"http:xxxx",
            "name":"productName",
            "collectCount":1234
        },
        {
            "id":11,
            "bigImg":"http:xxxx",
            "name":"productName",
            "collectCount":1234
        }
    ]
}

返回参数说明:
total:单品总数量
pageIndex:分页用页码
pageSize:分页用每页数量
products:单品数组
id:单品的id
bigImg:单品图片
name:单品名称
collectCount:单品被收藏的数量

3.单品库首页

原型  http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/

{
    "space":[
        {
            "image":"客厅",
            "name":"type name",
            "desciption":"沙发/茶几/电视柜",
            "types":[
                {
                    "typeId":11,
                    "typeName":"全部",
                    "typeImg":"subclassImg"
                },
                {
                    "typeId":12,
                    "typeName":"床",
                    "typeImg":"subclassImg"
                },
                {
                    "typeId":13,
                    "typeName":"床头柜",
                    "typeImg":"subclassImg"
                }
            ]
        },
        {
            "image":"睡房",
            "name":"type name",
            "desciption":"床/床头柜/衣柜/梳妆台",
            "types":[
                {
                    "typeId":11,
                    "typeName":"全部",
                    "typeImg":"subclassImg"
                },
                {
                    "typeId":12,
                    "typeName":"床",
                    "typeImg":"subclassImg"
                },
                {
                    "typeId":13,
                    "typeName":"床头柜",
                    "typeImg":"subclassImg"
                }
            ]
        }
    ]
}

返回参数说明:
space:空间数组
image:图片
name:空间名
desciption:type的集合
types:分类数组
typeId:分类id
typeName:分类名
typeImg:分类图片url

4.单品库列表页-----搜索结果----猜你喜欢

 http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/

{
    "total":100,
    "pageIndex":1,
    "pageSize":10,
    "products":[
        {
            "name":"法丽莎家具 欧式床 实木床 田园婚床 双人床 1.8 1.5米",
            "price":"¥2699.00",
            "oldPrice":"¥2899.00",
            "collectCount":1234
        },
        {
            "name":"法丽莎家具 欧式床 实木床 田园婚床 双人床 1.8 1.5米",
            "price":"¥2699.00",
            "oldPrice":"¥2899.00",
            "collectCount":1234
        }
    ]
}

返回参数说明:
total:单品总数量
pageIndex:分页用页码
pageSize:分页用每页数量
products:单品数组
products:产品数组
name:产品名
price:当前价格、优惠价格
oldPrice:旧价格
collectCount:收藏数量

5.测试页

 http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/

{
    "count":6,
    "tests":[
        {
            "testId":1,
            "testDescription":"请选择上述两款产品中你较喜欢的产品",
            "MultiSelect":0,
            "selection":[
                {
                    "selectionId":11,
                    "image":"http://xxx"
                },
                {
                    "selectionId":12,
                    "image":"http://xxx"
                }
            ]
        },
        {
            "testId":2,
            "testDescription":"请选择上述两款产品中你较喜欢的产品",
            "MultiSelect":1,
            "selection":[
                {
                    "selectionId":21,
                    "image":"http://xxx"
                },
                {
                    "selectionId":22,
                    "image":"http://xxx"
                }
            ]
        }
    ]
}

返回参数说明:
count:测试页数量
tests:测试页数组
testId:测试页id
testDescription:测试页
MultiSelect?:是否多选,1是,0否
selection:选项数组
selectionId:选项id
image:图片url

6.终端页

 http://trac.pc.com.cn/mobile/pototype/ideas/youjiapin/req1.0.0/

{
    "productName":"法丽莎家具 欧式床 实木床 田园婚床 双人床 1.8 1.5米",
    "price":"¥2699.00",
    "oldPrice":"¥2899.00",
    "seller":"发丽莎家居旗舰店",
    "image":[
        "http://xxxx",
        "http://xxxx",
        "http://xxxx"
    ],
    "commentCount":1234,
    "comments":[
        {
            "nickName":"b_小贝贝",
            "time":"9月3日 15:23",
            "face":"http://asdfasdf",
            "content":"她家的包包看起来还不错,有谁买过的,求推荐!"
        },
        {
            "nickName":"Blanch_213",
            "time":"9月3日 15:53",
            "face":"http://asdfasdf",
            "content":"简单,但太普遍了!"
        }
    ]
}

返回参数说明:
productName:产品名
price:价格、优惠价格
oldPrice:原价格
seller:商家
image:图片数组
commentCount:评论总数
comments:评论数组
nickName:昵称
time:评论时间
face:头像
content:评论内容