cms
模板引擎标签语法

公告列表数据

更新时间:2024-05-12

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

    响应参数 响应示例

    响应参数
    字段名 字段类型 字段说明 是否必要 默认值
    Total int64 总数 true
    Count int 返回条数 true
    List slice 数据列表 true
    Id int64 true
    Name string 名称 true
    Content string 内容 true
    NoticeType int 公告类型 2普通 1弹窗 true
    State int 状态 1启用 2禁用 true
    Sort int 排序 true
    StartTime int64 启用时间 true
    ExpirationTime int64 过期时间 true
    Link string 跳转链接 true
    CreateAt int64 true
    UpdateAt int64 true
    Sites slice true
    Id int64 id true
    Name string 站点名称 true
    Domain string 站点域名 true
    Logo string 站点logo(base64) true
    Icon string 站点图标(base64) true
    RunMode string 站点 true
    OpenCache bool 缓存开关(运行静态有效) true
    CacheTime int 缓存时间(运行静态有效) true
    State int 状态 1开启 2关闭 true
    QQ string qq true
    Wechat string 微信 true
    Email string 邮箱 true
    Telegraph string 电报 true
    CloseReason string 关闭原因 true
    Note string 备注(站点关闭原因等) true
    Region string 自定义地区 true
    Language string 自定义语言 true
    Label string 自定义语言 true
    Year string 自定义年份 true
    StatisticalCode string 统计代码 true
    CreateAt int64 true
    UpdateAt int64 true
    Visitor int 游客状态 1开启 2关闭 true
    Agent bool 是否开启代理 true
    Gzip int gzip 1开启 2关闭 true
    Gzip_level int gzip等级 true
    ApkDownTotal int64 true
    IosDownTotal int64 true
    CustomerVisitor bool 游客状态 true
    Sort int 排序 true
    MessageBoardStatus int 留言状态 1开启展示 2关闭展示 true
    PluginSwitch int 会员、分销、客服、留言系统开关 true
    ICP string 备案号 true
    Domains slice true
    Id int64 true
    DomainName string true
    Remark string true
    IsTls int true
    CertStatus int true
    Message string true
    Cer string true
    Key string true
    AutoApply bool true
    AutoRenew bool true
    ExpiredTime int64 true
    ExpireTipTime int64 true
    CreateAt int64 true
    UpdateAt int64 true
    ResolverType int true
    DNSSettingID int64 true
    ShowDate int64 true
    TlsType int true
    ChannelCode string true
    ChannelName string true
    ChannelBindAt int64 true
    SiteId int64 站点id true
    SecurityChain int true
    ReferAllowBlank int true
    ApiCacheNum int true
    CamiState int 是否可激活 true
    Type int true
    IsAllSite int 是否是全站应用,1-是,2-否 true
    PopupTrigger int 弹窗触发方式 true
    点此复制
    {
    	"Total": 0,
    	"Count": 0,
    	"List": Null
    }