File:news-details.htm
Method:map.get(key,default)
NewsMap??get
类型不正确
xmls/news.xmls
...];
}
@Time=$var[Modified];
@DateTime=$datetime.format(@Time,yyyy-MM-dd);
};
@map=$map();
@map[list]=@content;
@map[pages]=$number.ceiling((@count/6));
@map[count]=@count;
$write(@map.toJson());
}
//新闻详情
$sub GetNewsPagesdetails(){
@query=$query(content,content);
@querylog=$query(catalog,content);
@query[ContentId]=$argv(0);
@AreaId=$shell[AreaId];
@query[AreaId]=@AreaId;
@NewsMap=@query.map(*,['AreaId={*AreaId} and Status=1 and ContentId={*ContentId}']);
@querylog[CatalogId]=@
NewsMap[CatalogId];
@CatalogName=@querylog.scalar(CatalogName,['CatalogId={*CatalogId}']);
@Time=@NewsMap[Modified];
@DateTime=$datetime.format(@Time,yyyy-MM-dd);
$return($empty);
}
//上一篇,下一篇
$sub NewsListCase(){
@query=$query(content,content);
@querytwo=$query(content,content);
@ContentId=$argv(0,0);
@query[ContentId]=@ContentId;
@logid=@query.scalar(CatalogId,['ContentId={*ContentId}']);
@query[CatalogId]=@logid;
@AreaId=$shell[AreaId];
@query[AreaId]=@AreaId;
@newsid=@query.ma...