async getHome() {
let temp = await http.getHome();
//随机方法
function getRandomElements(arr, count) {
var shuffled = arr.slice(0),
i = arr.length,
min = i - count,
temp,
index;
while (i-- > min) {
index = Math.floor((i + 1) * Math.random());
temp = shuffled[index];
shuffled[index] = shuffled[i];
shuffled[i] = temp;
// console.log(shuffled[i]);
}
return shuffled.slice(min);
}
if (temp != null) {
this.recommend.push(getRandomElements(temp, 1));
}
// console.log(this.recommend);
},