点击获取到对应的数组内容
数组结构:
{
date: "2018-03-13",
z_num: "450",
m_num: "6",
money: "3956.67",
id: 13,
line: [{
placeholder: "在线收益",
item_unm: "2000.60",
num: 1
}, {
placeholder: "现金收益",
item_unm: "400.00",
num: 1
}, {
placeholder: "退款金额",
item_unm: "1565.07",
num: 1
}]
},
js:
bindDate:function(e){
var that = this;
var datas = that.data.datas;
var id = e.currentTarget.dataset.id;
for (let i in datas){
var datdId = datas[i][id].line;
that.setData({
line: datdId
})
}
console.log(id);
that.getTotalPrice();
},
https://github.com/Liuniuliu/...
已经放入github