实现天猫查看物流功能

作者: 小怪兽打葫芦娃 | 来源:发表于2017-03-28 13:49 被阅读246次

    Android程序员面试宝典

    自定义控件

    联网

    工具

    数据库

    源码分析相关面试题

    Activity相关面试题

    Service相关面试题

    与XMPP相关面试题

    与性能优化相关面试题

    与登录相关面试题

    与开发相关面试题

    与人事相关面试题

    • 欢迎关注微信公众号

    微信公众号名称:Android干货程序员

    需要用到开源项目地址:

    总的开源项目集合地址:

    服务器地址:

     String url = "http://v.juhe.cn/exp/index?key=" + "申请的key"
                    + "&com=" + name + "&no=" + number;
    

    核心代码:

    String name = mEtName.getText().toString();
            String number = mEtNumber.getText().toString();
            String url = "exp/index?key=" + "29ae0a17faffc5a64d8384f7ccc88ef3"
                    + "&com=" + name + "&no=" + number;
            Request request = ItheimaHttp.newGetRequest(url);//apiUrl格式:"xxx/xxxxx"
            Call call = ItheimaHttp.send(request, new HttpResponseListener<Courier>() {
                @Override
                public void onResponse(Courier bean, Headers headers) {
                    Collections.reverse(bean.result.list);
                    adapter = new BaseRecyclerAdapter(mRecyclerView
                            , MyRecyclerViewHolder.class
                            , R.layout.layout_courier_item
                            , bean.result.list);
                }
    
            });
    
    
    • 快递公司编号对照表
    
    {
      "resultcode": "200",
      "reason": "查询支持的快递公司成功",
      "result": [
        {
          "com": "顺丰",
          "no": "sf"
        },
        {
          "com": "申通",
          "no": "sto"
        },
        {
          "com": "圆通",
          "no": "yt"
        },
        {
          "com": "韵达",
          "no": "yd"
        },
        {
          "com": "天天",
          "no": "tt"
        },
        {
          "com": "EMS",
          "no": "ems"
        },
        {
          "com": "中通",
          "no": "zto"
        },
        {
          "com": "汇通",
          "no": "ht"
        },
        {
          "com": "全峰",
          "no": "qf"
        },
        {
          "com": "德邦",
          "no": "db"
        },
        {
          "com": "自动匹配",
          "no": "auto"
        },
        {
          "com": "国通",
          "no": "gt"
        },
        {
          "com": "如风达",
          "no": "rfd"
        },
        {
          "com": "京东快递",
          "no": "jd"
        },
        {
          "com": "宅急送",
          "no": "zjs"
        },
        {
          "com": "EMS国际",
          "no": "emsg"
        },
        {
          "com": "Fedex国际",
          "no": "fedex"
        },
        {
          "com": "邮政国内(挂号信)",
          "no": "yzgn"
        },
        {
          "com": "UPS国际快递",
          "no": "ups"
        },
        {
          "com": "中铁快运",
          "no": "ztky"
        }
      ],
      "error_code": 0
    }
    

    相关文章

      网友评论

        本文标题:实现天猫查看物流功能

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