update:暂时恢复先前的随机生成uuid

This commit is contained in:
3030332422
2025-10-14 18:06:57 +08:00
parent 13ce67e4c7
commit 0e1392de35
7 changed files with 47 additions and 9 deletions
+11
View File
@@ -126,6 +126,17 @@ export function randomNum(min, max) {
return Math.round(Math.random() * (max - min) + min)
}
/**
* 获取uuid
*/
export function getUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16)
})
}
/**
* 验证手机号格式
* @param {string} mobile 手机号