From 7823f4ef5ae7e3cc4c49f44706b06ad99bb1cfe5 Mon Sep 17 00:00:00 2001
From: pyt <626651354@qq.com>
Date: 星期四, 13 二月 2025 16:16:47 +0800
Subject: [PATCH] bug修复
---
src/utils/utils.js | 43 +++++++------------------------------------
1 files changed, 7 insertions(+), 36 deletions(-)
diff --git a/src/utils/utils.js b/src/utils/utils.js
index b22f1cc..b285cd6 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -1,39 +1,10 @@
export function generateVerificationCode() {
- const characters = '123456789abcdefghijkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWXY';
- let code = '';
- for (let i = 0; i < 4; i++) {
- code += characters.charAt(Math.floor(Math.random() * characters.length));
- }
- return code;
-}
-
-export const exportExcell = (name, params, url) => {
- fetch('http://192.168.110.34:8081' + url, {
- method: 'post',
- body: JSON.stringify({
- ...params,
- }),
- headers: {
- Authorization: localStorage.getItem('token'),
- 'ConTent-Type': 'application/json;charset=UTF-8',
- timestamp: new Date().getTime(),
- client: localStorage.getItem('client')
- },
- responseType: 'blob',
- })
- .then((res) => res.blob())
- .then((res) => {
-
- const link = document.createElement('a');
- link.style.display = 'none';
- link.href = URL.createObjectURL(res);
- link.download = name;
- document.body.appendChild(link);
- link.click();
- // 释放的 URL 对象以及移除 a 标签
- URL.revokeObjectURL(link.href);
- document.body.removeChild(link);
- });
- };
\ No newline at end of file
+ const characters = '123456789abcdefghijkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWXY';
+ let code = '';
+ for (let i = 0; i < 4; i++) {
+ code += characters.charAt(Math.floor(Math.random() * characters.length));
+ }
+ return code;
+}
\ No newline at end of file
--
Gitblit v1.7.1