美文网首页
电商api开源接口

电商api开源接口

作者: 糖醋鱼_ | 来源:发表于2021-01-21 13:54 被阅读0次

    首页相关的数据接口

    轮播的接口

    首页的轮播图

    请求的url http://vueshop.glbuys.com/api/home/index/slide

    完整的路径 : http://vueshop.glbuys.com/api/home/index/slide?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数:

    参数
    token 1ec949a15fb709370f

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "title": "图片1",
          "image": "//vueshop.glbuys.com/uploadfiles/1484285302.jpg",
          "webs": "#"
        },
        {
          "title": "图片2",
          "image": "//vueshop.glbuys.com/uploadfiles/1484285334.jpg",
          "webs": "#"
        },
        {
          "title": "图片3",
          "image": "//vueshop.glbuys.com/uploadfiles/1524206455.jpg",
          "webs": "#"
        }
      ]
    }
    
    

    导航的接口

    首页导航

    请求的url http://vueshop.glbuys.com/api/home/index/nav

    完整的路径 : http://vueshop.glbuys.com/api/home/index/nav?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数:

    参数
    token 1ec949a15fb709370f

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "cid": "492",
          "title": "潮流女装",
          "image": "//vueshop.glbuys.com/uploadfiles/1484287695.png"
        },
        {
          "cid": "493",
          "title": "品牌男装",
          "image": "//vueshop.glbuys.com/uploadfiles/1484287842.png"
        },
        {
          "cid": "494",
          "title": "电脑办公",
          "image": "//vueshop.glbuys.com/uploadfiles/1484287985.png"
        },
        {
          "cid": "495",
          "title": "手机数码",
          "image": "//vueshop.glbuys.com/uploadfiles/1484288118.png"
        }
      ]
    }
    
    

    商品的接口

    首页展示的商品信息

    请求的url http://vueshop.glbuys.com/api/home/index/goodsLevel

    完整的路径 : http://vueshop.glbuys.com/api/home/index/goodsLevel?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数:

    参数
    token 1ec949a15fb709370f

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "title": "潮流女装",
          "items": [
            {
              "title": "高跟鞋女2018新款春季单鞋仙女甜美链子尖头防水台细跟女鞋一字带",
              "gid": "143208071",
              "cid": "523",
              "price": 128,
              "image": "//vueshop.glbuys.com/uploadfiles/1524556409.jpg"
            }
          ]
        },
        {
          "title": "品牌男装",
          "items": [
            {
              "title": "新款短袖男士夏季3d立体图案体恤猴子搞怪大猩猩个性t恤大码衣服",
              "gid": "265947808",
              "cid": "525",
              "price": 26,
              "image": "//vueshop.glbuys.com/uploadfiles/1524568819.jpg"
            }
          ]
        },
        {
          "title": "电脑办公",
          "items": [
            {
              "title": "酷睿i5四核GTX1060独显台式机组装电脑主机整机 绝地求生吃鸡游戏",
              "gid": "670706076",
              "cid": "527",
              "price": 4599,
              "image": "//vueshop.glbuys.com/uploadfiles/1524561138.jpg"
            }
          ]
        }
      ]
    }
    
    

    推荐的商品接口

    首页展示的相关的推荐的商品

    请求的url http://vueshop.glbuys.com/api/home/index/recom

    完整的路径 : http://vueshop.glbuys.com/api/home/index/recom?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数:

    参数
    token 1ec949a15fb709370f

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "gid": "286026274",
          "cid": "496",
          "title": "ONLY冬装新品雪纺拼接流苏腰带长款连衣裙女",
          "price": "399.00",
          "image": "//vueshop.glbuys.com/uploadfiles/1484283665.jpg"
        }
      ]
    }
    
    

    商品详情页面的数据接口

    点击某一个商品的时候, 能够跳转到商品详情页面, 并在商品的详情页面展示相关的商品信息

    商品详情

    获取根据商品的id获取商品的详情数据

    请求的url http://vueshop.glbuys.com/api/home/goods/info/gid/714246965/type/details

    完整的路径 : http://vueshop.glbuys.com/api/home/goods/info/gid/714246965/type/details?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数: 在请求的时候, 需要根据不同的商品修改对应的gid

    参数 意义
    token 1ec949a15fb709370f
    gid 714246965 商品的id

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": {
        "gid": "714246965",
        "title": "裙装裙装6",
        "price": 100,
        "freight": 10,
        "sales": "0",
        "bodys": "",
        "images": [
          "//vueshop.glbuys.com/uploadfiles/1484284030.jpg",
          "//vueshop.glbuys.com/uploadfiles/1484283665.jpg",
          "//vueshop.glbuys.com/uploadfiles/1484284042.jpg"
        ]
      }
    }
    
    

    商品评论接口

    根据商品的id获取商品的相关的评论信息,支持数据的分页

    请求的url http://vueshop.glbuys.com/api/home/reviews/index/gid/143208071

    完整的路径 : http://vueshop.glbuys.com/api/home/reviews/index/gid/143208071?token=1ec949a15fb709370f&page=2

    请求的方式 get

    请求的参数: 在请求的时候, 需要根据不同的商品修改对应的gid

    参数 意义
    token 1ec949a15fb709370f
    gid 714246965 商品的id
    page 2 分页的页码,是一个数字

    返回的数据

    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "太好了AAAA",
          "times": "2018-05-23 22:23:17"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "123123123",
          "times": "2018-05-22 14:36:32"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:45"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:40"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:34"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:28"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:21"
        },
        {
          "nickname": "神秘人",
          "head": "//vueshop.glbuys.com/userfiles/head/492811357.jpg",
          "content": "很好!!!!",
          "times": "2018-05-18 15:07:14"
        }
      ],
      "pageinfo": {
        "pagesize": "8",
        "page": "1",
        "pagenum": "2",
        "total": 12
      }
    }
    
    

    商品的颜色/尺寸信息

    点击加入购物车的时候, 实现弹框的效果, 展示商品的颜色-尺寸等信息

    请求的url http://vueshop.glbuys.com/api/home/goods/info/gid/704407997/type/spec

    完整的路径 : http://vueshop.glbuys.com/api/home/goods/info/gid/704407997/type/spec?token=1ec949a15fb709370f

    请求的方式 get

    请求的参数: 在请求的时候, 需要根据不同的商品修改对应的gid

    参数 意义
    token 1ec949a15fb709370f
    gid 714246965 商品的id

    返回的数据

    
    {
      "status": 1,
      "code": 200,
      "data": [
        {
          "attrid": "1006",
          "title": "颜色",
          "values": [
            {
              "vid": "1394",
              "value": "红色"
            },
            {
              "vid": "1395",
              "value": "白色"
            },
            {
              "vid": "1396",
              "value": "黑色"
            },
            {
              "vid": "1397",
              "value": "黄色"
            }
          ]
        },
        {
          "attrid": "1007",
          "title": "尺寸",
          "values": [
            {
              "vid": "1399",
              "value": "S"
            },
            {
              "vid": "1400",
              "value": "M"
            },
            {
              "vid": "1401",
              "value": "L"
            },
            {
              "vid": "1402",
              "value": "XL"
            }
          ]
        }
      ]
    }
    
    

    登录

    http://api.baxiaobu.com/index.php/home/v1/login

    type:"POST",

    参数:用户名 username 密码 pwd

    注册

    http://api.baxiaobu.com/index.php/home/v1/register

    type:"POST",

    参数:用户名 username 密码 pwd

    相关文章

      网友评论

          本文标题:电商api开源接口

          本文链接:https://www.haomeiwen.com/subject/muorzktx.html