cms
模板引擎标签语法

评论列表数据

更新时间:2024-05-12

  1. 用法示例
  2. 点此复制
    <getCommentsList name="$List" vid="$.Q.id" page="$.Q.page" limit="$.Q.limit" order="'id asc'">
    	<foreach name="$item" index="$index" data="$List.List">
    		<li index="{{$index}}">{{$item.Name}}</li>
    	</foreach>
    </getCommentsList>
  3. 标签参数
  4. 参数说明
    字段名 字段类型 字段说明 是否必要 默认值
    page int 页码 false 1
    limit int 请求条数 false 10
    order string 排序:asc-升序,desc-降序 true desc
    vid int 视频id false
    name string 变量名 false $List
  5. 响应结果
  6. 200 模板渲染返回

    响应参数 响应示例

    响应参数
    字段名 字段类型 字段说明 是否必要 默认值
    Total int64 总数 true
    Count int 返回条数 true
    List slice 评论列表 true
    ID int64 评论id true
    ParentId int64 父id true
    Type int 类型:1视频 true
    Content string 内容 true
    ResourceName string 资源名称 true
    ResourceId int64 资源id true
    FormMemberId string 被评论会员id true
    Agree int 点赞数 true
    State int 状态 1待审核 2通过 3未通过 true
    Note string 不通过原因 true
    Ip string 评论者ip true
    ToId int64 被评论Id true
    ToContent string 被评论内容 true
    NotifyState int 1已查看 2未查看 true
    CreateAt int64 true
    UpdateAt int64 true
    Replys slice true
    ID int64 评论id true
    ParentId int64 父id true
    Type int 类型:1视频 true
    Content string 内容 true
    ResourceName string 资源名称 true
    ResourceId int64 资源id true
    FormMemberId string 被评论会员id true
    Agree int 点赞数 true
    State int 状态 1待审核 2通过 3未通过 true
    Note string 不通过原因 true
    Ip string 评论者ip true
    ToId int64 被评论Id true
    ToContent string 被评论内容 true
    NotifyState int 1已查看 2未查看 true
    CreateAt int64 true
    UpdateAt int64 true
    Replys slice true
    FormMember struct 评论回复列表 true
    ToMember struct 会员信息 true
    ToMemberId string 会员信息 true
    FormMember struct 评论回复列表 true
    Id string true
    Name string true
    HeadImg string true
    ToMember struct 会员信息 true
    Id string true
    Name string true
    HeadImg string true
    ToMemberId string 会员信息 true
    点此复制
    {
    	"Total": 0,
    	"Count": 0,
    	"List": Null
    }