diff --git a/.env.development b/.env.development index 9b3c2c7..dc34e7e 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,10 @@ ENV = development # 本地环境接口地址 -# VITE_API_URL = http://4155gf93ll13.vicp.fun/admin +VITE_API_URL = http://4155gf93ll13.vicp.fun/admin # VITE_API_URL = http://localhost:13579/admin # VITE_API_URL = https://cankao.cs.com.cn/admin -VITE_API_URL = http://123.60.153.169:8040/admin +# VITE_API_URL = http://123.60.153.169:8040/admin # VITE_API_URL = /api diff --git a/src/views/pages/jnh/import.vue b/src/views/pages/jnh/import.vue index 17b2f21..df09987 100644 --- a/src/views/pages/jnh/import.vue +++ b/src/views/pages/jnh/import.vue @@ -6,7 +6,14 @@ {{ errorMsg }} - +
点击或拖拽文件至此处导入
支持格式.xlsx/.xls,文件大小≤10MB
@@ -26,6 +33,7 @@ import { onMounted, reactive, ref } from 'vue'; import { NextLoading } from '/@/utils/loading'; import { ElMessage, ElMessageBox } from 'element-plus'; import { getUploadUrl } from '/@/api/jnh'; +import { Session } from '/@/utils/storage'; const baseUrl = ref(import.meta.env.VITE_API_UR); const emit = defineEmits(['close']); @@ -37,6 +45,10 @@ const rules = reactive({ const form = ref({}); const dialogTableVisible = ref(false); +const uploadHeader = ref({ + 'auth-token': `${Session.get('token')}`, +}); + function open(data) { dialogTableVisible.value = true; if (data) { @@ -60,6 +72,7 @@ function handleSuccess(res) { // 页面加载时 onMounted(() => { NextLoading.done(); + baseUrl.value = import.meta.env.VITE_API_URL; }); defineExpose({ diff --git a/src/views/pages/jnh/index.vue b/src/views/pages/jnh/index.vue index ccd1fc4..8488f5d 100644 --- a/src/views/pages/jnh/index.vue +++ b/src/views/pages/jnh/index.vue @@ -24,7 +24,7 @@ - + @@ -37,7 +37,20 @@ - + + +