API

作者: 你值得拥有更好的12138 | 来源:发表于2019-05-24 16:25 被阅读0次

    1.Token检查

    URL

    /member/checkLogin

    Decription

    进入首页时进行登录检查

    Request Parmeter

    GET

    Token=DFSDFSDFD
    
    Response
    {
        "result": {
            "state": 1
        }
    }
    
    Photo


    2.登录

    URL

    /member/login

    Decription

    首先检查未登录且不在白名单内挑战登录

    Request Parmeter

    Post

    {
        "userName": "",
        "userPwd": "",
        "challenge": "", 
        "validate": "",
        "seccode": "",
        "statusKey": "" 
    }
    
    Attribute Description
    challenge 它以下都是验证码参数酌情删减
    statusKey 我也不知道,知道请修改
    Response
    {
        "result": {
            "state": 1,
            "token": "",
            "id": "",           
            "message": ""  
        }
    }
    
    Attribute Description
    id userId
    message 登录结果描述,用于弹窗提示
    Photo


    3.主页Home

    URL

    /goods/home

    Decription

    主页Home的幻灯片加下面的商品图片

    Request Parmeter

    GET

    Response
    {
        "success": false,
        "result": [
            {
                "type": 0,
                "name": "",
                "panelContents": [
                   {
     
                        "type": 0,
                        "productId": 150642571432835,
                        "picUrl": "https://i.loli.net/2018/11/04/5bdeba4028e90.png",
                        "picUrl2": "https://i.loli.net/2018/11/04/5bdebb109a29a.png",
                        "picUrl3": "https://i.loli.net/2018/11/04/5bdeba6753403.png",
                        "salePrice": 1,
                        "productName": "捐赠商品",
                        "subTitle": "您的捐赠将用于本站维护 给您带来更好的体验",
                        "productImageBig": "https://i.loli.net/2018/11/04/5bdeba4028e90.png"
                    }
                ]
            }
        ]
    }
    
    Attribute Description
    type 0表示幻灯片,1表示横向相等的列表,2表示相等的大图片横向的列表,3表示那个大小图片组合的列表
    picUrl* 幻灯片是由三张图片叠加
    productImageBig* 专为类型三进行的图片url,我也不晓得作者脑壳是不是有包这么玩

    总结就是picUrl用于幻灯片,其他的product*用于MallGods这个组件

    注:参考源码mallGoods.vue,Home.vue

    Photo

    type 0

    幻灯片

    type 1

    type等于1

    type 2

    type等于3

    type 3

    type等于3

    相关文章

      网友评论

          本文标题:API

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