多级嵌套

假设我们有一个Model(多层级的,需要显示)
先看下效果图
图片alt
图片alt
图片alt

图片alt
注意观察上面的信息,按照设定下一级的为tab分割!

当前我也有考虑使用表格的形式展示集合的数据类型

Model的信息如下

CategoryDetailResponse 这个是根Class

    /// <summary>
    /// 根Class
    /// </summary>
    public class CategoryDetailResponse : WxMiStoreResponse
    {
        /// <summary>
        /// 类目信息
        /// </summary>
        [PasteDirectsun]
        public CateInfo info { get; set; }

        /// <summary>
        /// 属性信息
        /// </summary>
        [PasteDirectsun]
        public CategoryAttrInfo attr { get; set; }

        /// <summary>
        /// 商品资质
        /// </summary>
        [PasteDirectsun]
        public List<ProductQua> product_qua_list { get; set; }
    }

然后他内部包含了很多的子Class

CateInfo

    /// <summary>
    /// 类目信息
    /// </summary>
    public class CateInfo
    {
        /// <summary>
        /// ID
        /// </summary>
        [MaxLength(32)]
        public string cat_id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [MaxLength(32)]
        public string name { get; set; }
    }

CategoryAttrInfo


    /// <summary>
    /// 类目属性
    /// </summary>
    public class CategoryAttrInfo
    {
        /// <summary>
        /// 虚拟发货
        /// </summary>
        public bool shop_no_shipment { get; set; }

        /// <summary>
        /// 定向准入
        /// </summary>
        public bool access_permit_required { get; set; }

        /// <summary>
        /// 支持预售
        /// </summary>
        public bool pre_sale { get; set; }

        /// <summary>
        /// 必须7天无理由退货
        /// </summary>
        public bool seven_day_return { get; set; }

        /// <summary>
        /// 定准品牌
        /// </summary>
        [PasteDirectsun]
        public List<Brand> brand_list { get; set; }

        /// <summary>
        /// 保证金 单位分
        /// </summary>
        [PasteFenToYuan]
        public string deposit { get; set; }

        /// <summary>
        /// 产品属性
        /// </summary>
        [PasteDirectsun]
        public List<BasicAttr> product_attr_list { get; set; }

        /// <summary>
        /// 销售属性
        /// </summary>
        [PasteDirectsun]
        public List<BasicAttr> sale_attr_list { get; set; }

        /// <summary>
        /// 交易佣金
        /// </summary>
        [PasteDirectsun]
        public TransactionFeeInfo transactionfee_info { get; set; }

        /// <summary>
        /// 优惠券规则
        /// </summary>
        [PasteDirectsun]
        public CouponRule coupon_rule { get; set; }

        /// <summary>
        /// 价格下限 单位分,商品售价不可低于此价格
        /// </summary>
        public long floor_price { get; set; }

        /// <summary>
        /// 收货时间
        /// </summary>
        [PasteSplit]
        public List<string> confirm_receipt_days { get; set; }

        /// <summary>
        /// 品牌定向 准入,即该类目一定要有品牌
        /// </summary>
        public bool is_limit_brand { get; set; }

        /// <summary>
        /// 商品要求
        /// </summary>
        [PasteDirectsun]
        public ProductRequirement product_requirement { get; set; }

        /// <summary>
        /// 尺码表信息
        /// </summary>
        [PasteDirectsun]
        public SizeChart size_chart { get; set; }

        /// <summary>
        /// 坏损包赔 放心买必须打开坏损包赔
        /// </summary>
        public bool is_confidence_require_bad_must_pay { get; set; }
    }

Brand

    /// <summary>
    /// 品牌列表
    /// </summary>
    public class Brand
    {
        /// <summary>
        /// 定准类目的品牌ID
        /// </summary>
        [PasteText]
        public string brand_id { get; set; }
    }

BasicAttr

    /// <summary>
    /// 
    /// </summary>
    public class BasicAttr
    {
        /// <summary>
        /// 名称
        /// </summary>
        [PasteText]
        public string name { get; set; }

        /// <summary>
        /// 属性类型 string为自定义,select_one为多选一,该参数短期保留,用于兼容。将来废弃,使用type_v2替代
        /// </summary>
        [PasteText]
        public string type { get; set; }

        /// <summary>
        /// 属性类型 v2,共7种类型
        /// string:文本
        /// select_one:单选,选项列表在value中
        /// select_many:多选,选项列表在value中
        /// integer:整数,数字必须为整数
        /// decimal4:小数(4 位精度),小数部分最多 4 位
        /// integer_unit:整数 + 单位,单位的选项列表在value中
        /// decimal4_unit:小数(4 位精度) + 单位,单位的选项列表在value中
        /// </summary>
        [PasteText]
        public string type_v2 { get; set; }

        /// <summary>
        /// 可选项 ,当type为:select_one/select_many时,为选项列表
        /// 当type为:integer_unit/decimal4_unit时,为单位的列表
        /// </summary>
        [PasteText]
        public string value { get; set; }

        /// <summary>
        /// 是否必填
        /// </summary>
        public bool is_required { get; set; }

        /// <summary>
        /// 输入提示 请填写提示语
        /// </summary>
        [PasteText]
        public string hint { get; set; }

        /// <summary>
        /// 允许添加 选项,当type为select_one/select_many时,标识是否允许添加新选项(value中不存在的选项)
        /// </summary>
        public bool append_allowed { get; set; }
    }

TransactionFeeInfo

    /// <summary>
    /// 
    /// </summary>
    public class TransactionFeeInfo
    {
        /// <summary>
        /// 实收佣金比例 类目实收的交易佣金比例,单位万分比
        /// </summary>
        [PasteUnit("/万")]
        public uint basis_point { get; set; }

        /// <summary>
        /// 原始佣金比例 类目原始佣金比例,单位万分比
        /// </summary>
        [PasteUnit("/万")]
        public uint original_basis_point { get; set; }

        /// <summary>
        /// 佣金激励类型 0:无激励措施,1:新店佣金减免
        /// </summary>
        public uint incentive_type { get; set; }
    }

CouponRule

    /// <summary>
    /// 折扣信息
    /// </summary>
    public class CouponRule
    {
        /// <summary>
        /// 最高折扣 最高的折扣比例,百分比, 0表示无限制
        /// </summary>
        [PasteUnit("%")]
        public uint discount_ratio_limit { get; set; }

        /// <summary>
        /// 最高折扣金额 最高的折扣金额,单位分,0表示无限制
        /// </summary>
        [PasteFenToYuan]
        public uint discount_limit { get; set; }
    }

ProductRequirement

    /// <summary>
    /// 商品要求
    /// </summary>
    public class ProductRequirement
    {
        /// <summary>
        /// 标题编辑要求 商品标题的编辑要求
        /// </summary>
        public string product_title_requirement { get; set; }

        /// <summary>
        /// 主图编辑要求 商品主图的编辑要求
        /// </summary>
        public string product_img_requirement { get; set; }

        /// <summary>
        /// 描述编辑要求 商品描述的编辑要求
        /// </summary>
        public string product_desc_requirement { get; set; }
    }

SizeChart

    /// <summary>
    /// 尺码信息
    /// </summary>
    public class SizeChart
    {
        /// <summary>
        /// 尺码表 是否支持尺码表
        /// </summary>
        public bool is_support { get; set; }

        /// <summary>
        /// 尺码配置
        /// </summary>
        [PasteDirectsun]
        public List<SizeChartItem> item_list { get; set; }
    }

SizeChartItem

    /// <summary>
    /// 尺码详细
    /// </summary>
    public class SizeChartItem
    {
        /// <summary>
        /// 尺码名称
        /// </summary>
        [PasteText]
        public string name { get; set; }

        /// <summary>
        /// 单位 尺码属性值的单位
        /// </summary>
        [PasteText]
        public string unit { get; set; }

        /// <summary>
        /// 属性值类型 尺码属性值的类型,1:字符型,2:整数型,3:小数型
        /// </summary>
        [PasteText]
        public string type { get; set; }

        /// <summary>
        /// 填写格式 尺码属性值的填写格式,1:单值填写,2:区间值填写,3:支持单值或区间值
        /// </summary>
        [PasteText]
        public string format { get; set; }

        /// <summary>
        /// 属性值的限制 尺码属性值的限制
        /// </summary>
        [PasteText]
        public string limit { get; set; }

        /// <summary>
        /// 是否必填
        /// </summary>
        public bool is_required { get; set; }
    }

ProductQua

    /// <summary>
    /// 商品资质
    /// </summary>
    public class ProductQua
    {
        /// <summary>
        /// ID
        /// </summary>
        [PasteText]
        public string qua_id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [PasteText]
        public string name { get; set; }

        /// <summary>
        /// 需要申请 该类目是否需要申请才能用
        /// </summary>
        [PasteText]
        public bool need_to_apply { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [PasteText]
        public string tips { get; set; }

        /// <summary>
        /// 提交资质 该类目申请的时候是否一定要提交资质
        /// </summary>
        public bool mandatory { get; set; }

    }

多层级的,信息显示关键在于特性directsun

超级管理员
立即前往参与当前项目管理 多级嵌套
贴代码框架
贴代码框架PasteForm的在线文档,主要介绍理念和特性及实际案例!
贴代码文档
什么才叫操作文档?对于操作人员来说,遇到哪个字段不懂意思,点击下即可查阅说明,这就是最好的文档!
PasteSpider在线操作文档
PasteSpider是专门为开发者开发的部署工具,五分钟上手,小内存服务器也可以使用,使用旁载模式,运行更安全!!!目前仅支持linux的服务器,win服务器的版本将在不久到来!
贴代码在线客服文档
是客服系统也是营销系统,支持丰富的话术配置,支持自定义消息格式,支持多站点入驻模式,一键部署快速搭建!