修复导出问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
import { genQueryParam } from '@/utils/system-helper';
|
||||
|
||||
// ==================================许愿礼物配置====================================
|
||||
// 表单
|
||||
@@ -70,9 +71,6 @@ export const promiseStarUserRecordPage = query => {
|
||||
});
|
||||
};
|
||||
export const promiseStarUserRecordExport = query => {
|
||||
return request({
|
||||
url: '/admin/promiseStarUserRecord/export',
|
||||
method: 'get',
|
||||
data: query
|
||||
});
|
||||
window.location.href = `/admin/promiseStarUserRecord/export?${genQueryParam(query)}`
|
||||
return;
|
||||
};
|
||||
|
@@ -36,3 +36,12 @@ 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