//res.data你的数组
res.data.forEach(function (item, index) {
console.log('------->', index);
// item.tt item.yixian 就是你要赋值的
item.tt = that.number(res.data[index].dd)
// 字符串转数组split(","); 根据逗号转数组
item.yixian = res.data[index].ypdizhi.split(",");
})
小程序给数组遍历赋值,字符串转数组
最新推荐文章于 2022-11-14 20:34:52 发布