commit | 070005a28c5acc53a30da3a77ff0ff542497c4ff | [log] [tgz] |
---|---|---|
author | guangchao.xu <guangchao.xu@supwisdom.com> | 周一 12月 07 09:56:40 2020 +0800 |
committer | guangchao.xu <guangchao.xu@supwisdom.com> | 周一 12月 07 09:56:40 2020 +0800 |
tree | 940554ee4a1b12c26bc2694586a7d80c42d9cc37 | |
parent | 5653eca0850571e2f03479bbb17ec056ce0770a9 [diff] [blame] |
更新大理市民卡app
diff --git a/uview-ui/libs/function/random.js b/uview-ui/libs/function/random.js new file mode 100644 index 0000000..e155279 --- /dev/null +++ b/uview-ui/libs/function/random.js
@@ -0,0 +1,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;