//排序函数
getSortFun(order, sortBy) {
var ordAlpah = order == "asc" ? ">" : "<";
var sortFun = new Function(
"a",
"b",
"return a." + sortBy + ordAlpah + "b." + sortBy + "?1:-1"
);
return sortFun;
},
vm.arr.sort(vm.getSortFun('desc','gift_count')) gift_count数组某一值 desc降序 asc升序