Skip to content

Commit 1adbf1d

Browse files
committed
[U] 调整后端目录
1 parent 03548b4 commit 1adbf1d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎router/router.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ func RunApp() {
2626
// 注册文档
2727
RegDocs(engine)
2828
// 静态目录
29+
engine.Static(`/dist`, "dist")
2930
engine.Static(`/static`, "static")
3031
// ico
3132
engine.File(`/favicon.ico`, "favicon.ico")
3233
// 前后端分离页面
33-
engine.File("/dashboard*", "static/dist/index.html")
34+
engine.File("/dashboard*", "dist/index.html")
3435
//--- 页面 -- start
3536
// 首页
3637
engine.GET(`/`, control.IndexView)

‎vue/vue.config.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const resolve = dir => {
55
};
66
module.exports = {
77
// 部署应用时的根路径(默认'/'),也可用相对路径
8-
publicPath: process.env.NODE_ENV === "development" ? "/" : "/static/dist/", //http://127.0.0.1:88/static/dist/修改为你的URL+/dist/",
8+
publicPath: process.env.NODE_ENV === "development" ? "/" : "/dist/", //http://127.0.0.1:88/static/dist/修改为你的URL+/dist/",
99
// 运行时生成的生产环境构建文件的目录(默认''dist'',构建之前会被清除)
10-
outputDir: "../static/dist",
10+
outputDir: "../dist",
1111
// 放置生成的静态资源(s、css、img、fonts)的(相对于 outputDir 的)目录(默认'')
1212
assetsDir: "",
1313
// 指定生成的 index.html 的输出路径(相对于 outputDir)也可以是一个绝对路径。

0 commit comments

Comments
 (0)