haiwei-ui 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -190,7 +190,9 @@
|
|
|
190
190
|
computed: {
|
|
191
191
|
...mapState('app/user', { token: 'token' }),
|
|
192
192
|
uploadUrl() {
|
|
193
|
-
|
|
193
|
+
// 从axios默认配置中获取baseURL,如果不存在则使用全局变量或默认值
|
|
194
|
+
const baseURL = this.$http?.axios?.defaults?.baseURL || window.__HAIWEI_API_BASE_URL__ || '/api'
|
|
195
|
+
return `${baseURL}/admin/excel/parseexcel`
|
|
194
196
|
},
|
|
195
197
|
headers() {
|
|
196
198
|
return {
|
|
@@ -346,7 +348,9 @@
|
|
|
346
348
|
}
|
|
347
349
|
}
|
|
348
350
|
|
|
349
|
-
|
|
351
|
+
// 使用与uploadUrl相同的逻辑获取API基础URL
|
|
352
|
+
const baseURL = this.$http?.axios?.defaults?.baseURL || window.__HAIWEI_API_BASE_URL__ || '/api'
|
|
353
|
+
this.$http.post(`${baseURL}/admin/excel/parseexcel`, formData, config)
|
|
350
354
|
.then(response => {
|
|
351
355
|
if (response.data.successful) {
|
|
352
356
|
this.fileInfo = response.data.data.basicInfo
|