魏熙美 5 år sedan
förälder
incheckning
6d54f4f158
2 ändrade filer med 4 tillägg och 3 borttagningar
  1. 2
    2
      src/pages/customer/recommendCustomer/index.jsx
  2. 2
    1
      src/utils/request.js

+ 2
- 2
src/pages/customer/recommendCustomer/index.jsx Visa fil

86
       ...apis.customer.customerRecommendRecommenderExport, 
86
       ...apis.customer.customerRecommendRecommenderExport, 
87
       responseType: 'blob',
87
       responseType: 'blob',
88
     }).then(response => {
88
     }).then(response => {
89
-      // console.log('response: ', response)
89
+      console.log('exportRecommendCustomer: ', response.body())
90
       download(response)
90
       download(response)
91
     }).catch(error => {
91
     }).catch(error => {
92
 
92
 
213
             </Button>
213
             </Button>
214
         </Form.Item>
214
         </Form.Item>
215
       </Form>
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
       </Button>
218
       </Button>
219
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
219
       <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 2
- 1
src/utils/request.js Visa fil

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