微信小程序 setData 数组赋值数组出错了?
this.setData({arr1:arr2});
然后排序arr2
var arr2=this.data.arr2;
for(var i=0;i<arr2.length-1;i++){
for(var j=0;j<arr2.length-i-1;j++){
if(arr2[j]>arr2[j+1]){
var temp = arr2[j];
arr2[j] = arr2[j+1];
arr2[j+1] = temp;
}
}
}