From 5d13b68c5a4aa7f0304719495a5b17c90ccf7226 Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Tue, 27 Feb 2024 18:21:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wishingStar/wishingStar.js | 4 ++-- src/utils/maintainer.js | 9 +++++++++ src/utils/system-helper.js | 9 --------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/api/wishingStar/wishingStar.js b/src/api/wishingStar/wishingStar.js index cf3e182..90b6d33 100644 --- a/src/api/wishingStar/wishingStar.js +++ b/src/api/wishingStar/wishingStar.js @@ -1,6 +1,6 @@ import request from '@/utils/request'; import qs from 'qs'; -import { genQueryParam } from '@/utils/system-helper'; +import { genQueryParam } from '@/utils/maintainer'; // ==================================许愿礼物配置==================================== // 表单 @@ -71,6 +71,6 @@ export const promiseStarUserRecordPage = query => { }); }; export const promiseStarUserRecordExport = query => { - window.location.href = `/admin/promiseStarUserRecord/export?${genQueryParam(query)}` + window.location.href = `/admin/promiseStarUserRecord/export?${genQueryParam(query)}`; return; }; diff --git a/src/utils/maintainer.js b/src/utils/maintainer.js index 95393f8..94a36be 100644 --- a/src/utils/maintainer.js +++ b/src/utils/maintainer.js @@ -47,4 +47,13 @@ export function apiResult(json) { $("#tipMsg").text("请求失败,错误信息:" + json.message); $("#tipModal").modal('show'); return false; +} + +export function genQueryParam(json) { + if (!json) return '' + return cleanArray(Object.keys(json).map(key => { + if (json[key] === undefined) return '' + return encodeURIComponent(key) + '=' + + encodeURIComponent(json[key]) + })).join('&'); } \ No newline at end of file diff --git a/src/utils/system-helper.js b/src/utils/system-helper.js index 335aa36..2004767 100644 --- a/src/utils/system-helper.js +++ b/src/utils/system-helper.js @@ -35,13 +35,4 @@ export function dateFormat (date, fmt) { date = o = padLeftZero = null; return fmt; -} - -export function genQueryParam(json) { - if (!json) return '' - return cleanArray(Object.keys(json).map(key => { - if (json[key] === undefined) return '' - return encodeURIComponent(key) + '=' + - encodeURIComponent(json[key]) - })).join('&'); } \ No newline at end of file