例如
//选取1个
"_card_Currency|1": ["人民币", "美元", "日元", "全币种", "港币"]
//重复2次(我要的不是重复)
"_card_Currency|2": ["人民币", "美元", "日元", "全币种", "港币"]
例如
//选取1个
"_card_Currency|1": ["人民币", "美元", "日元", "全币种", "港币"]
//重复2次(我要的不是重复)
"_card_Currency|2": ["人民币", "美元", "日元", "全币种", "港币"]
Mock.Random.extend({
constellations: [
{ image: "../../images/shopDetail/df1.png", name: "可预约" },
{ image: "../../images/shopDetail/df2.png", name: "提供WIFI" },
{ image: "../../images/shopDetail/df3.png", name: "免费停车" },
{ image: "../../images/shopDetail/df4.png", name: "内设包厢" }
],
//自定义占位符名字tags
tags: function (date) {
//随机选择2个作为返回值
//return this.pick(this.constellations, 2)
//随机选择2-4个作为返回值
return this.pick(this.constellations, 2, 4)
},
})
数据占位符 DPD
使用 @tags