增加other分包页面
我的页面里增加跳转other分包跳转(仅在ios不是浏览器审核时展示)
This commit is contained in:
22
tuniao-ui/libs/function/array.js
Normal file
22
tuniao-ui/libs/function/array.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 打乱传入的数组
|
||||
*
|
||||
* @param {Array} array 待打乱的数组
|
||||
*/
|
||||
function random(array = []) {
|
||||
return array.sort(() => Math.random() - 0.5)
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为数组
|
||||
*
|
||||
* @param {Object} arr
|
||||
*/
|
||||
function isArray(arr) {
|
||||
return Object.prototype.toString.call(arr) === '[object Array]'
|
||||
}
|
||||
|
||||
export default {
|
||||
random,
|
||||
isArray
|
||||
}
|
||||
Reference in New Issue
Block a user