From 74e5d38d9a0e94421ceceea37c4677e5b57364ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 十月 2022 00:33:18 +0800 Subject: [PATCH] 2022-10-14 --- src/utils/utils-custom.js | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index d021b1a..e667b47 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -700,17 +700,15 @@ } /** - * @description 鏁版嵁婧愬悕绉帮紝鐢ㄤ簬缁熶竴鏌ヨ - * @return {String} name + * @description 缁勪欢鍚嶅姞鍚庣紑 */ - static getdataName () { + static getSignName () { let name = [] let _options = 'abcdefghigklmnopqrstuvwxyz' - for (let i = 0; i < 6; i++) { + for (let i = 0; i < 3; i++) { name.push(_options.substr(Math.floor(Math.random() * 26), 1)) } - name.splice(3, 0, new Date().getTime()) - return name.join('') + return (Math.floor(Math.random()*10) + name.join('')).toUpperCase() } /** @@ -728,12 +726,8 @@ item.uuid = _uuid - if (item.dataName) { - item.dataName = this.getdataName() - } - // 閲嶇疆缁勪欢鍚嶇О - let sign = this.getdataName().toUpperCase().substr(-4) + let sign = this.getSignName() if (item.plot) { // 鍥捐〃 item.plot.name = item.plot.name + sign item.name = item.plot.name -- Gitblit v1.8.0