绿满眶商城微信小程序-uniapp
peng
2025-10-30 c61f03cfe1fcf023c7128f77f3d692aef309f77f
1
2
3
4
5
6
7
8
9
10
function random(min, max) {
    if (min >= 0 && max > 0 && max >= min) {
        let gab = max - min + 1;
        return Math.floor(Math.random() * gab + min);
    } else {
        return 0;
    }
}
 
export default random;