|
@@ -40,11 +40,6 @@ PC端 /opt/nginx/nginx/html/page_docs/
|
|
|
│ ├── _mixin.scss
|
|
|
│ └── _variables.scss
|
|
|
├── components
|
|
|
-│ ├── CardItem.vue # 卡片型文件缩略展示
|
|
|
-│ ├── HelloWorld.vue
|
|
|
-│ ├── List.vue # 列表展示
|
|
|
-│ ├── ListItem.vue # 列表型文件缩略展示
|
|
|
-│ └── Search.vue # 顶部搜索框
|
|
|
├── main.js
|
|
|
├── router.js
|
|
|
├── set-public-path.js
|
|
@@ -52,8 +47,6 @@ PC端 /opt/nginx/nginx/html/page_docs/
|
|
|
├── 404.vue
|
|
|
├── Content.vue # 内容页
|
|
|
├── Home.vue # 首页
|
|
|
- ├── Keep.vue # 收藏
|
|
|
- ├── Mine.vue # 我的
|
|
|
└── Search.vue # 搜索结果列表页
|
|
|
|
|
|
```
|
|
@@ -75,46 +68,26 @@ PC端 /opt/nginx/nginx/html/page_docs/
|
|
|
3. 访问`/swordfish/frontPage/docs/sess/index`
|
|
|
|
|
|
##### 部署
|
|
|
-```
|
|
|
-# 剑鱼文库 前端配置
|
|
|
-location ^~/page_docs_app {
|
|
|
- if ($uri ~ \.html$) {
|
|
|
- add_header Pragma no-cache;
|
|
|
- add_header Expires 0;
|
|
|
- add_header Cache-Control no-cache,no-store,must-revalidate;
|
|
|
- }
|
|
|
- root /opt/nginx/nginx/html/;
|
|
|
- index index.html;
|
|
|
- try_files $uri $uri/ /page_docs_app/index.html;
|
|
|
-}
|
|
|
|
|
|
-location ^~/page_docs {
|
|
|
- if ($uri ~ \.html$) {
|
|
|
- add_header Pragma no-cache;
|
|
|
- add_header Expires 0;
|
|
|
- add_header Cache-Control no-cache,no-store,must-revalidate;
|
|
|
- }
|
|
|
- root /opt/nginx/nginx/html/;
|
|
|
- index index.html;
|
|
|
- try_files $uri $uri/ /page_docs/index.html;
|
|
|
-}
|
|
|
-```
|
|
|
+###### 剑鱼文库 前端配置
|
|
|
|
|
|
-```
|
|
|
+```nginx
|
|
|
+# 如果nginx配置文件中有这段代码,则 不需要 再次配置
|
|
|
# 静态资源配置
|
|
|
# 1. 禁止html缓存
|
|
|
-location ~ ^\/(.*).html {
|
|
|
+location ~ ^\/page_(.*)\.html {
|
|
|
add_header Pragma no-cache;
|
|
|
add_header Expires 0;
|
|
|
add_header Cache-Control no-cache,no-store,must-revalidate;
|
|
|
-
|
|
|
+
|
|
|
root html;
|
|
|
+ # root /opt/nginx/nginx/html/;
|
|
|
}
|
|
|
-# 2. 静态资源配置(vue程序刷新404问题)
|
|
|
+
|
|
|
+# 2.静态资源配置(vue程序刷新404问题)
|
|
|
location ~ ^\/page_(.*?)\/ {
|
|
|
root html;
|
|
|
index index.html;
|
|
|
try_files $uri $uri/ /page_$1/index.html;
|
|
|
}
|
|
|
-```
|
|
|
-
|
|
|
+```
|