File:product-details.htm
Method:map.get(key,default)
table??get
类型不正确
xmls/product.xmls
...ery[ContentId]=$argv(0);

@table=@query.map(*,['ContentId={*ContentId}']);
@querycatalog=$query(catalog,content);
@catalogtable=@querycatalog.map(*,['CatalogId={@table[CatalogId]}']);
@dates=@table[CreateDate];
@date=$datetime(@dates);
@year=@date.year();
@month=@date.month();
@day=@date.day();
$return($empty);
}


//商品详情页
$sub Productdetails(){

@query=$query(product,product);
@query[ProductId]=$argv(0);
@table=@query.map(*,['ProductId={*ProductId}']);
//读取image相册图片为@imgs
@
cid=@table[CatalogId];
@image=@table[Images];
@json=$datatable.loadJson(@image);
@imgs=$string();
@json.foreach(){
@pic=$var[src];
@imgs.append(["
<div class="swiper-slide">
<div class="slide-img"><img src="{@pic}"></div>
</div>
"]);
//类别名称
@queryt=$query(catalog,product);
@tablet=@queryt.map(*,['CatalogId={@cid}']);
@parentname=@tablet[CatalogName];
}

@dates=@table[CreateDate];
@date=$datetime(@dates);
@year=@date.year();
@month=@date.month();
@day=@date.day();
$return($e...