微信咨询

微信咨询

13610*910*9

服务热线 7*24小时

电话咨询

1688模板开发一些用到的接口文档笔记

iamdu2022-03-09 11:10:14 浏览: 437309

获取店铺首页接口:$urlAPI.getShopUrl()


velocity循环变量赋值引用

foreach ($x in [1..4])

set($offers = $offerAPI.queryByIds($appdata.offerIds($x)))


循环里把字符串转成整数类型

set($Integer = 0)

set($ab=$Integer.parseInt($appdata.pingshu))

foreach ($x in [1..$ab])

========================================

设置图片列表的默认图

================================
#set($imageLists = $appdata.ditu2)  
#if($null.isNull($imageLists)||$imageLists.size()==0)
  <img src="https://img.alicdn.com/imgextra/i4/2123198282/O1CN01JieCsT2B3D20GAPhv_!!2123198282.png"/>

#else  
  
  #foreach($items in $!appdata.ditu2)
 
  
  <img src="$items.image%20"/>
  
   #end 
  #end 

========================================