From feaf0a9778879ef211c5587a513ba4cbdabb52d0 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 23 六月 2022 17:42:58 +0800
Subject: [PATCH] bug修复
---
src/api/utils.ts | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/api/utils.ts b/src/api/utils.ts
index 5b90c14..faa51d4 100644
--- a/src/api/utils.ts
+++ b/src/api/utils.ts
@@ -1,5 +1,4 @@
import request from "@/scripts/httpRequest";
-import qs from "qs";
// 鑾峰彇鑿滃崟鏁版嵁
export const getMenuListData = (query: any) => {
@@ -32,16 +31,19 @@
}
}
}
-// 鏁扮粍鍘婚噸-1鏍囪瘑鏈壘鍒�
-export const findInArr = (n: any, arr: any) => {
- for (let i = 0; i < arr.length; i++) {
- if (arr[i] === n) {
- return i
- }
- }
- return -1
-}
export const pad0 = (val: Number) => {
return val < 10 ? "0" + val : val;
}
+
+export const getUrlKey = (name: String) => {
+ return (
+ decodeURIComponent(
+ (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
+ location.href
+ ) || [, ""])[1].replace(/\+/g, "%20")
+ ) || null
+ );
+}
+
+
--
Gitblit v1.8.0