File:goods-offer.html
Method:query(table,*app,*connect)
default.goods
对像不存在
xmls/goods.xmls
...d}']);
}

}

$function defaultImg(imgpath){
$if($string.isEmpty(@imgpath)==1||$file.existsFile($file.getMapPath(@imgpath))==0){
$return(images/default.jpg);
}
$else{
$return(@imgpath);
}
}

$function substr(str,len){
@strlen=$string(@str).length();
$if(@strlen>0){
$if(@strlen>@len){
@nstr=$string(@str).substring(0,@len);
$return(["{@nstr}..."]);
}
$else{
$return(@str);
}
}
$else{
$return(@str);
}

}
//产品详细
$sub productOfferview(){
@
query=$query(goods,goods);
@crid=$http.get(crid,0,N);
@tplx=$http.get(tplx,0,N);
@query[GoodsId]=@crid;
@GoMap=@query.map(['GoodsId,GoodsName,ParaType,UserId,Price,Pic,CatalogId,SerialsId'],['GoodsId={*GoodsId}']);
@db=$db();
@db[AreaId]=$shell[AreaId];
@db[SerialsId]=@GoMap[SerialsId];
@db[CatalogId]=@GoMap[CatalogId];
@countcrid=@db.dataScalar(['select count(*) from goods_goods goo left join usmanufactor man on goo.ManufactorId=man.ManufactorId where goo.Status=1 and man.Status=1 and ...