魏熙美 5 gadus atpakaļ
vecāks
revīzija
6d54f4f158

+ 2
- 2
src/pages/customer/recommendCustomer/index.jsx Parādīt failu

@@ -86,7 +86,7 @@ function body(props) {
86 86
       ...apis.customer.customerRecommendRecommenderExport, 
87 87
       responseType: 'blob',
88 88
     }).then(response => {
89
-      // console.log('response: ', response)
89
+      console.log('exportRecommendCustomer: ', response.body())
90 90
       download(response)
91 91
     }).catch(error => {
92 92
 
@@ -213,7 +213,7 @@ function body(props) {
213 213
             </Button>
214 214
         </Form.Item>
215 215
       </Form>
216
-      <Button type="primary" onClick={() => exportRecommendCustomer()} className={Styles.SubmitButton} style={{ marginTop: '5px', marginBottom: '5px', display: 'none' }}>
216
+      <Button type="primary" onClick={() => exportRecommendCustomer()} className={Styles.SubmitButton} style={{ marginTop: '5px', marginBottom: '5px' }}>
217 217
         导出数据
218 218
       </Button>
219 219
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 2
- 1
src/utils/request.js Parādīt failu

@@ -58,7 +58,7 @@ request.interceptors.request.use((url, options) => {
58 58
         requestType: data instanceof FormData ? 'form' : 'json',
59 59
         credentials: 'include', // 带 cookie
60 60
         interceptors: true,
61
-        getResponse: true
61
+        getResponse: true,
62 62
       },
63 63
     }
64 64
   );
@@ -78,6 +78,7 @@ request.interceptors.response.use(async (response, options) => {
78 78
     } else {
79 79
       console.log('response: ', response)
80 80
       console.log('response.headers: ', response.headers)
81
+      // console.log('response.blob(): ', response.blob())
81 82
       const { code, data, message } = await response.clone().json();
82 83
       if (code != 1000) {
83 84
         notification.error({