没有官方可用的API

function random(min, max) {
    return Math.random() * (max - min)  + min;
}