Click to get the corresponding array contents
Array structure:
{
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();
},