From 6a5962fe9544005dba620b00fb36c25fe2da4e76 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期二, 16 十一月 2021 15:24:46 +0800 Subject: [PATCH] 后端没修改的情况下添加默认背景图 --- src/api/utils.ts | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/api/utils.ts b/src/api/utils.ts index 5b90c14..1088596 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,17 @@ } } } -// 鏁扮粍鍘婚噸-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