feat:合并

This commit is contained in:
lixg
2022-12-13 21:05:25 +08:00
parent a521ba7309
commit fa797444d8
3 changed files with 101 additions and 102 deletions

View File

@@ -2,25 +2,25 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 17:28:10 * @Date: 2022-11-21 17:28:10
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-13 18:56:24 * @LastEditTime: 2022-12-13 20:37:15
* @FilePath: /fe-stu/src/App.vue * @FilePath: /fe-stu/src/App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<div id="container"> <div id="container">
<!-- <div id="nav">--> <div id="nav">
<!-- <router-link--> <router-link
<!-- v-for="item in routes"--> v-for="item in routes"
<!-- :key="item.path"--> :key="item.path"
<!-- :to="item.path"--> :to="item.path"
<!-- :class="{--> :class="{
<!-- link: true,--> link: true,
<!-- active: name === item.name,--> active: name === item.name,
<!-- }"--> }"
<!-- >--> >
<!-- {{ item.name }}--> {{ item.name }}
<!-- </router-link>--> </router-link>
<!-- </div>--> </div>
<main> <main>
<router-view /> <router-view />
</main> </main>
@@ -34,7 +34,7 @@ export default defineComponent({
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
console.log("router", router.getRoutes(), route); console.log("router", router.getRoutes(), route);
console.log(import.meta.env.DEV) console.log(import.meta.env.DEV);
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });

View File

@@ -122,8 +122,7 @@
<div class="right"> <div class="right">
<div class="righttitle"> <div class="righttitle">
<img <img
width="20px" style="width: 20px; height: 20px"
height="20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">投票时间</div> <div class="text">投票时间</div>
@@ -154,8 +153,7 @@
</div> </div>
<div class="righttitle"> <div class="righttitle">
<img <img
width="20px" style="width: 20px; height: 20px"
height="20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />

View File

@@ -2,96 +2,97 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 17:28:10 * @Date: 2022-11-21 17:28:10
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-12 16:49:27 * @LastEditTime: 2022-12-13 20:49:00
* @FilePath: /fe-stu/vite.config.js * @FilePath: /fe-stu/vite.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import {defineConfig} from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import legacy from '@vitejs/plugin-legacy' import legacy from '@vitejs/plugin-legacy'
import {viteMockServe} from 'vite-plugin-mock' import { viteMockServe } from 'vite-plugin-mock'
import topLevelAwait from "vite-plugin-top-level-await"; import topLevelAwait from "vite-plugin-top-level-await";
const path = require('path') const path = require('path')
const url = 'http://localhost:30001' // const url = 'http://localhost:30001'
export default defineConfig(({command}) => const url = 'http://111.231.196.214:12013/manageApi'
({ export default defineConfig(({ command }) =>
base: '/fe-student', ({
plugins: [ base: '/fe-student',
vue(), plugins: [
// legacy({ vue(),
// targets: ['chrome 64', 'defaults', 'not IE 11'] // legacy({
// }), // targets: ['chrome 64', 'defaults', 'not IE 11']
topLevelAwait({ // }),
promiseExportName: '__tla', topLevelAwait({
promiseImportName: i => `__tla_${i}` promiseExportName: '__tla',
}), promiseImportName: i => `__tla_${i}`
// viteMockServe({ }),
// mockPath: './src/mock/mocks', // viteMockServe({
// }) // mockPath: './src/mock/mocks',
], // })
resolve: { ],
alias: [ resolve: {
{find: '@', replacement: path.resolve(__dirname, 'src')} alias: [
] { find: '@', replacement: path.resolve(__dirname, 'src') }
}, ]
server: { },
proxy: { server: {
'/file/upload': { proxy: {
target: 'http://111.231.196.214:30001', '/file/upload': {
changeOrigin: true, target: 'http://111.231.196.214:30001',
}, changeOrigin: true,
'/stu': { },
target: url, '/stu': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/queryVoteSubmitDetailById': { },
target: url, '/queryVoteSubmitDetailById': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/work': { },
target: url, '/work': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/discuss': { },
target: url, '/discuss': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/discussSubmit': { },
target: url, '/discussSubmit': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/comment': { },
target: url, '/comment': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/vote': { },
target: url, '/vote': {
changeOrigin: true, target: url,
}, changeOrigin: true,
'/admin': { },
target: url, '/admin': {
changeOrigin: true, target: url,
}, '/activity': { changeOrigin: true,
target: url, }, '/activity': {
changeOrigin: true, target: url,
}, '/liveBroadcast': { changeOrigin: true,
target: url, }, '/liveBroadcast': {
changeOrigin: true, target: url,
}, '/examination': { changeOrigin: true,
target: url, }, '/examination': {
changeOrigin: true, target: url,
}, '/assessment': { changeOrigin: true,
target: url, }, '/assessment': {
changeOrigin: true, target: url,
}, '/workSubmit': { changeOrigin: true,
target: url, }, '/workSubmit': {
changeOrigin: true, target: url,
}, '/userbasic': { changeOrigin: true,
target: 'https://u-pre.boe.com', }, '/userbasic': {
changeOrigin: true, target: 'https://u-pre.boe.com',
}, changeOrigin: true,
} },
} }
}) }
})
) )