function getRandomNum(min, max) { // +1 包含最大值 return Math.floor(Math.random() * (max-min + 1)) + min; }