Commit d0faa4d9 by zhouzy

sn输入验证

1 parent c019fef7
...@@ -43,7 +43,9 @@ function listRequisitionMemberCard(params) { ...@@ -43,7 +43,9 @@ function listRequisitionMemberCard(params) {
function getMemberCardDetail(params) { function getMemberCardDetail(params) {
return GlAxios.get(`${path}/getMemberCardDetail`,{ params }) return GlAxios.get(`${path}/getMemberCardDetail`,{ params })
} }
function exportMemberCardByBatchId(params) {
return GlAxios.post(`${path}/exportMemberCardByBatchId`,params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString'})
}
export { export {
// getdetailsMemberInfo, // getdetailsMemberInfo,
...@@ -56,5 +58,6 @@ export { ...@@ -56,5 +58,6 @@ export {
listMemberBatch, listMemberBatch,
listMemberCard, listMemberCard,
listRequisitionMemberCard, listRequisitionMemberCard,
getMemberCardDetail getMemberCardDetail,
exportMemberCardByBatchId
} }
...@@ -29,15 +29,22 @@ const common = { ...@@ -29,15 +29,22 @@ const common = {
if (!response) { if (!response) {
return return
}; };
let url = window.URL.createObjectURL(new Blob([response.data], { console.log(response)
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' let a = document.createElement('a')
})); let blob = new Blob([response.data], { type: "application/vnd.ms-excel" })
let link = document.createElement('a'); let objectUrl = URL.createObjectURL(blob)
link.style.display = 'none'; a.setAttribute("href", objectUrl)
link.href = url; a.setAttribute("download", '订单信息.xls')
link.setAttribute('download', options.fileName || 'excel.xlsx'); a.click()
document.body.appendChild(link); // let url = window.URL.createObjectURL(new Blob([response.data], {
link.click(); // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
// }));
// let link = document.createElement('a');
// link.style.display = 'none';
// link.href = url;
// link.setAttribute('download', options.fileName || 'excel.xlsx');
// document.body.appendChild(link);
// link.click();
if (options.success) { if (options.success) {
(options.success)(); (options.success)();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!