log文件引用报错处理,本地代理配置

This commit is contained in:
zxy
2024-02-04 13:38:23 +08:00
parent 7aec486f06
commit ef8cf0773c
3 changed files with 1805 additions and 2377 deletions

4122
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,26 @@
<template>
<span @click="logsFlag ? '' : handleOpen()">
<el-badge :value="logsFlag?'':logsLen"
:max="99">
<el-badge :value="logsFlag ? '' : logsLen" :max="99">
<i class="icon-rizhi1"></i>
</el-badge>
<el-dialog title="日志"
<el-dialog
title="日志"
fullscreen
:visible.sync="box"
width="100%"
append-to-body>
<logs></logs>
append-to-body
>
<!-- <logs></logs> -->
</el-dialog>
</span>
</template>
<script>
import { mapGetters } from "vuex";
import logs from "@/page/logs/index";
// import logs from "@/page/logs/index";
export default {
name: "top-logs",
components: { logs },
// components: { logs },
data() {
return {
box: false
@@ -39,5 +40,4 @@ export default {
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -1,40 +1,42 @@
module.exports = {
//路径前缀
publicPath: '/manage/',
outputDir: 'dist',
publicPath: "/manage/",
outputDir: "dist",
lintOnSave: true,
productionSourceMap: false,
chainWebpack: (config) => {
chainWebpack: config => {
//忽略的打包文件
config.externals({
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'element-ui': 'ELEMENT',
vue: "Vue",
"vue-router": "VueRouter",
vuex: "Vuex",
axios: "axios",
"element-ui": "ELEMENT"
});
const entry = config.entry('app');
entry.add('babel-polyfill').end();
entry.add('classlist-polyfill').end();
entry.add('@/mock').end();
const entry = config.entry("app");
entry.add("babel-polyfill").end();
entry.add("classlist-polyfill").end();
entry.add("@/mock").end();
},
devServer: {
host: "0.0.0.0",
port: 1888,
proxy: {
'/api': {
"/api": {
//本地服务接口地址
target: 'http://localhost:8000',
target: "http://192.168.31.246:8000",
ws: true,
changeOrigin: true,
pathRewrite: {
'^/api': '/'
"^/api": "/"
}
},
'/api/map': {
"/api/map": {
//本地服务接口地址
target: 'http://apis.map.qq.com',
target: "http://apis.map.qq.com",
ws: true,
pathRewrite: {
'^/api/map': '/'
"^/api/map": "/"
}
}
}