From 5be7b6794eca6f1c0b6a13459156919b49a38ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Fri, 15 Apr 2022 21:40:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue/src/views/system/article/manager.vue | 67 ++++++++++++--------- document/admin-mysql.sql | 5 +- document/admin-sqlserver.sql | 1 + 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/ZR.Vue/src/views/system/article/manager.vue b/ZR.Vue/src/views/system/article/manager.vue index 8b2623b..41046a1 100644 --- a/ZR.Vue/src/views/system/article/manager.vue +++ b/ZR.Vue/src/views/system/article/manager.vue @@ -10,7 +10,7 @@ - + @@ -39,15 +39,17 @@ - + diff --git a/document/admin-mysql.sql b/document/admin-mysql.sql index d8da0fe..b8f754b 100644 --- a/document/admin-mysql.sql +++ b/document/admin-mysql.sql @@ -679,8 +679,9 @@ insert into sys_config values(1, '主框架页-默认皮肤样式名称', 's insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' ); insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' ); insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)'); -INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', '', '2022-04-10 10:11:27', '', NULL, NULL); -INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', '2022-04-14 00:00:00', 'admin', NULL, NULL); +INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', '', sysdate(), '', NULL, NULL); +INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', sysdate(), 'admin', NULL, NULL); +INSERT INTO `sys_config`(`configId`, `configName`, `configKey`, `configValue`, `configType`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', sysdate(), '', NULL, NULL); -- ---------------------------- -- 18、代码生成业务表 diff --git a/document/admin-sqlserver.sql b/document/admin-sqlserver.sql index ad28447..374ee07 100644 --- a/document/admin-sqlserver.sql +++ b/document/admin-sqlserver.sql @@ -699,6 +699,7 @@ insert into sys_config values('主框架页-侧边栏主题', 'sys.ind insert into sys_config values('账号自助-验证码开关', 'sys.account.captchaOnOff', '1', 'Y', 'admin', GETDATE(), '', null, '开启验证码功能(off、关闭,1、动态验证码 2、动态gif泡泡 3、泡泡 4、静态验证码)'); INSERT INTO sys_config VALUES('本地文件上传访问域名', 'sys.file.uploadurl', 'http://localhost:8888', 'Y', 'admin', GETDATE(), '', NULL, NULL); INSERT INTO sys_config VALUES('开启注册功能', 'sys.account.register', 'true', 'Y', 'admin', GETDATE(), '', NULL, NULL); +INSERT INTO sys_config VALUES('文章预览地址', 'sys.article.preview.url', 'http://www.izhaorui.cn/article/details/', 'Y', 'admin', GETDATE(), '', NULL, NULL); GO From dea63fdefda479ca3ab9bbb52ea9918a35ff488a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Sat, 16 Apr 2022 07:48:26 +0800 Subject: [PATCH 2/4] update router/index.js --- ZR.Vue3/src/router/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ZR.Vue3/src/router/index.js b/ZR.Vue3/src/router/index.js index ca9c963..aea32ce 100644 --- a/ZR.Vue3/src/router/index.js +++ b/ZR.Vue3/src/router/index.js @@ -38,11 +38,11 @@ export const constantRoutes = [ component: () => import('@/views/login'), hidden: true }, -{ - path: '/register', - component: () => import('@/views/register'), - hidden: true -}, +// { +// path: '/register', +// component: () => import('@/views/register'), +// hidden: true +// }, { path: "/:pathMatch(.*)*", component: () => import('@/views/error/404'), From 4bd9a3e1563529017eb95aaa05bc28a10b67142a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Sat, 16 Apr 2022 07:57:05 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9vite=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue3/vite.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ZR.Vue3/vite.config.js b/ZR.Vue3/vite.config.js index 77bf236..1801211 100644 --- a/ZR.Vue3/vite.config.js +++ b/ZR.Vue3/vite.config.js @@ -27,7 +27,8 @@ export default defineConfig(({ target: 'modules', outDir: 'dist', //指定输出目录 assetsDir: 'assets', //指定静态资源存储目录 - minify: 'terser' //混淆器,terser构建后文件体积更小 + minify: 'terser', //混淆器,terser构建后文件体积更小 + publicDir: import.meta.env.VITE_APP_ROUTER_PREFIX }, // vite 相关配置 server: { From ac6d84d999a1c0f669a7230109ef5d8059d79eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Sat, 16 Apr 2022 12:41:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=89=93=E5=8C=85=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue3/src/router/index.js | 2 +- ZR.Vue3/vite.config.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ZR.Vue3/src/router/index.js b/ZR.Vue3/src/router/index.js index aea32ce..5b20d3b 100644 --- a/ZR.Vue3/src/router/index.js +++ b/ZR.Vue3/src/router/index.js @@ -80,7 +80,7 @@ export const constantRoutes = [ }]; const router = createRouter({ - history: createWebHistory(), + history: createWebHistory(import.meta.env.VITE_APP_ROUTER_PREFIX), routes: constantRoutes, // scrollBehavior(to, from, savedPosition) { // if (savedPosition) { diff --git a/ZR.Vue3/vite.config.js b/ZR.Vue3/vite.config.js index 1801211..414bb23 100644 --- a/ZR.Vue3/vite.config.js +++ b/ZR.Vue3/vite.config.js @@ -3,10 +3,7 @@ import path from 'path' import createVitePlugins from './vite/plugins' // https://vitejs.dev/config/ -export default defineConfig(({ - mode, - command -}) => { +export default defineConfig(({ mode, command }) => { const env = loadEnv(mode, process.cwd()) return { plugins: createVitePlugins(env, command === 'build'), @@ -21,6 +18,7 @@ export default defineConfig(({ // https://cn.vitejs.dev/config/#resolve-extensions extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'], }, + base: env.VITE_APP_ROUTER_PREFIX, // 打包配置 build: { sourcemap: command === 'build' ? false : true, @@ -28,7 +26,6 @@ export default defineConfig(({ outDir: 'dist', //指定输出目录 assetsDir: 'assets', //指定静态资源存储目录 minify: 'terser', //混淆器,terser构建后文件体积更小 - publicDir: import.meta.env.VITE_APP_ROUTER_PREFIX }, // vite 相关配置 server: {