修复查询参数
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
@@ -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('&');
|
||||
}
|
@@ -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('&');
|
||||
}
|
Reference in New Issue
Block a user