zoukankan      html  css  js  c++  java
  • Android 仿淘宝京东等我的订单界面

    先上效果图

    在这里插入图片描述

    难点

    一般解析的json

    {
        "code": "0000",
        "desc": null,
        "token": "ad762d27-ced6-4092-b415-ddad8ee0b98e__1472123395714",
        "msg": [
            {
                "amount": 601,
                "consignee": "andrea",
                "address": "天府软件园A区",
                "orderItem": [ #列表数据
                    {
                        "thumbnail": null,
                        "quantity": 1,
                        "price": 601,
                        "name": "熊猫座椅",
                        "id": 11
                    }
                ],
                "freight": 0,
                "orderStatus": "unconfirmed",
                "productCount": 1,
                "shippingStatus": "unshipped",
                "phone": "15892999216",
                "areaName": "四川省成都市",
                "id": 9,
                "sn": "20160825202",
                "paymentStatus": "unpaid",
                "createDate": 1472123141000
            },
            {
                "amount": 601,
                "consignee": "andrea",
                "address": "天府软件园A区",
                "orderItem": [ #列表数据
                    {
                        "thumbnail": null,
                        "quantity": 1,
                        "price": 601,
                        "name": "熊猫座椅",
                        "id": 10
                    }
                ],
                "freight": 0,
                "orderStatus": "unconfirmed",
                "productCount": 1,
                "shippingStatus": "unshipped",
                "phone": "15892999216",
                "areaName": "四川省成都市",
                "id": 8,
                "sn": "20160825102",
                "paymentStatus": "unpaid",
                "createDate": 1472122855000
            }
        ],
        "page": {
            "total": 8,
            "pageNumber": 1,
            "pageSize": 2
        }
    }
    
    
    

    遇到这样数据,我们难道要求服务器的哥们帮我改改吗?如果不给改怎么办?当然可以解决了.怎么办呢?那我们就可以去拆分数据了,怎么拆呢?:

    把一个item拆分成三份.
    第一份 : 保留item关系且和需要展示的顶部数据.
    第二份 : 保留item关系且和需要展示购买列表数据.
    第三分 : 保留item关系且和需要展示顶部购买数量,价格,支付状态等展示或者按钮和文本

    说明

    demo地址下载

  • 相关阅读:
    Spring中@Autowired注解、@Resource注解的区别 (zz)
    ECLIPSE使用HG插件去上载 GOOGLE.CODE下的代码
    jrebel
    myeclipse 上安装 Maven3
    web项目目录结构
    笔记 利用python进行数据分析
    算法浅入浅出之Textrank
    算法浅入浅出之TF-IDF
    python库之jieba小试牛刀 3
    python库之jieba小试牛刀 2
  • 原文地址:https://www.cnblogs.com/wzqnxd/p/13260709.html
Copyright © 2011-2022 走看看