新增工作组会议、
This commit is contained in:
@@ -573,3 +573,17 @@ export function encrypt(publicKey, message) {
|
||||
const txt = encrypt.encrypt(message)
|
||||
return txt
|
||||
}
|
||||
/**
|
||||
* 校验数组是否有重复的元素
|
||||
* */
|
||||
export function isRepeat(arr) {
|
||||
var hash = {};
|
||||
for(var i in arr) {
|
||||
if(hash[arr[i]]) {
|
||||
return true;
|
||||
}
|
||||
// 不存在该元素,则赋值为true,可以赋任意值,相应的修改if判断条件即可
|
||||
hash[arr[i]] = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user