From ed6fd5e89b812b4466d2930963fe8211a14f6e51 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Thu, 11 Jul 2024 14:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=A1=86=E6=9E=B6=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron.vite.config.mjs | 11 ++++++----- jsconfig.json | 14 ++++++++++++++ src/renderer/src/api/file/index.js | 10 ++++++++++ .../src/components/file-upload/index.vue | 17 +++++++---------- src/renderer/src/views/prepare/index.vue | 2 +- 5 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 jsconfig.json create mode 100644 src/renderer/src/api/file/index.js diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index d19fc20..12cab0b 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -1,5 +1,5 @@ import { resolve } from 'path' -// const path = require('path') +import path from 'path' import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import vue from '@vitejs/plugin-vue' import WindiCSS from "vite-plugin-windicss" @@ -14,15 +14,16 @@ export default defineConfig({ renderer: { resolve: { alias: { - '@': resolve('./src/renderer/src'), - // '@': path.join(__dirname, './src/renderer/src'), + // '@': resolve('./src/renderer/src'), + // '@': path.resolve(__dirname, 'src/renderer/src'), + '@': path.join(__dirname, './src/renderer/src'), } }, server: { proxy: { '/dev-api': { - target: 'http://27.128.240.72:7865', - // target: 'http://192.168.2.52:7863', + // target: 'http://27.128.240.72:7865', + target: 'http://192.168.2.52:7863', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') }, diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..63f8c59 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "@/*":[ + "src/renderer/src/*" + ] + } + }, + "exclude": [ + "node_modeules", + "dist" + ] +} diff --git a/src/renderer/src/api/file/index.js b/src/renderer/src/api/file/index.js new file mode 100644 index 0000000..d7e590b --- /dev/null +++ b/src/renderer/src/api/file/index.js @@ -0,0 +1,10 @@ +// 查询evaluation列表 +import request from '@/utils/request' + +export const getSmarttalkPage = (params) => { + return request({ + url: '/smarttalk/file/getSmarttalkPage', + method: 'post', + params + }) +} diff --git a/src/renderer/src/components/file-upload/index.vue b/src/renderer/src/components/file-upload/index.vue index 5195a8c..f4829de 100644 --- a/src/renderer/src/components/file-upload/index.vue +++ b/src/renderer/src/components/file-upload/index.vue @@ -16,7 +16,8 @@ \ No newline at end of file + \ No newline at end of file -- 2.44.0.windows.1