From dd2dcd4ad1232d458211d24cfdc51fa031021acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 22 Nov 2023 17:52:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_env/web/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_env/web/Dockerfile b/docker_env/web/Dockerfile index 7f7fc2b..9d465d1 100644 --- a/docker_env/web/Dockerfile +++ b/docker_env/web/Dockerfile @@ -1,7 +1,7 @@ FROM registry.cn-zhangjiakou.aliyuncs.com/dvadmin-pro/dvadmin3-base-web:16.19-alpine WORKDIR /web/ COPY web/. . -RUN yarn install +RUN yarn install --registry=https://registry.npm.taobao.org RUN yarn build FROM nginx:alpine From 0131d31808ba56c05981045133b79a1d3a06e971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 22 Nov 2023 21:58:10 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_env/nginx/my.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_env/nginx/my.conf b/docker_env/nginx/my.conf index 30fa210..e1db0b7 100644 --- a/docker_env/nginx/my.conf +++ b/docker_env/nginx/my.conf @@ -28,6 +28,6 @@ server { proxy_send_timeout 600s; real_ip_header X-Forwarded-For; rewrite ^/api/(.*)$ /$1 break; #重写 - proxy_pass http://177.8.0.12:8000/; # 设置代理服务器的协议和地址 + proxy_pass http://177.10.0.12:8000/; # 设置代理服务器的协议和地址 } } From 2baba8e36f11146a973d2c99d6324fd46769a2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 23 Nov 2023 16:19:35 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 2 +- web/src/i18n/lang/en.ts | 248 ++++++++++++++------------- web/src/i18n/lang/zh-cn.ts | 272 ++++++++++++++++-------------- web/src/i18n/pages/login/zh-cn.ts | 2 +- web/src/layout/upgrade/index.vue | 8 +- 5 files changed, 275 insertions(+), 257 deletions(-) diff --git a/web/package.json b/web/package.json index 807cd61..43b7cb8 100644 --- a/web/package.json +++ b/web/package.json @@ -62,7 +62,7 @@ "@typescript-eslint/parser": "^5.46.0", "@vitejs/plugin-vue": "^4.0.0", "@vue/compiler-sfc": "^3.2.45", - "eslint": "^8.29.0", + "eslint": "^8.54.0", "eslint-plugin-vue": "^9.8.0", "prettier": "^2.8.1", "sass": "^1.56.2", diff --git a/web/src/i18n/lang/en.ts b/web/src/i18n/lang/en.ts index 3b6541b..7218975 100644 --- a/web/src/i18n/lang/en.ts +++ b/web/src/i18n/lang/en.ts @@ -1,123 +1,131 @@ // 定义内容 export default { - router: { - home: 'home', - system: 'system', - systemMenu: 'systemMenu', - systemRole: 'systemRole', - systemUser: 'systemUser', - systemDept: 'systemDept', - systemDic: 'systemDic', - limits: 'limits', - limitsFrontEnd: 'FrontEnd', - limitsFrontEndPage: 'FrontEndPage', - limitsFrontEndBtn: 'FrontEndBtn', - limitsBackEnd: 'BackEnd', - limitsBackEndEndPage: 'BackEndEndPage', - personal: 'personal', - }, - staticRoutes: { - signIn: 'signIn', - notFound: 'notFound', - noPower: 'noPower', - }, - user: { - title0: 'Component size', - title1: 'Language switching', - title2: 'Menu search', - title3: 'Layout configuration', - title4: 'news', - title5: 'Full screen on', - title6: 'Full screen off', - dropdownLarge: 'large', - dropdownDefault: 'default', - dropdownSmall: 'small', - dropdown1: 'home page', - dropdown2: 'Personal Center', - dropdown3: '404', - dropdown4: '401', - dropdown5: 'Log out', - dropdown6: 'Code warehouse', - searchPlaceholder: 'Menu search: support Chinese, routing path', - newTitle: 'notice', - newBtn: 'All read', - newGo: 'Go to the notification center', - newDesc: 'No notice', - logOutTitle: 'Tips', - logOutMessage: 'This operation will log out. Do you want to continue?', - logOutConfirm: 'determine', - logOutCancel: 'cancel', - logOutExit: 'Exiting', - }, - tagsView: { - refresh: 'refresh', - close: 'close', - closeOther: 'closeOther', - closeAll: 'closeAll', - fullscreen: 'fullscreen', - closeFullscreen: 'closeFullscreen', - }, - notFound: { - foundTitle: 'Wrong address input, please re-enter the address~', - foundMsg: 'You can check the web address first, and then re-enter or give us feedback.', - foundBtn: 'Back to home page', - }, - noAccess: { - accessTitle: 'You are not authorized to operate~', - accessMsg: 'Contact information: add QQ group discussion 665452019', - accessBtn: 'Reauthorization', - }, - layout: { - configTitle: 'Layout configuration', - oneTitle: 'Global Themes', - twoTopTitle: 'top bar set up', - twoMenuTitle: 'Menu set up', - twoColumnsTitle: 'Columns set up', - twoTopBar: 'Top bar background', - twoTopBarColor: 'Top bar default font color', - twoIsTopBarColorGradual: 'Top bar gradient', - twoMenuBar: 'Menu background', - twoMenuBarColor: 'Menu default font color', - twoIsMenuBarColorGradual: 'Menu gradient', - twoColumnsMenuBar: 'Column menu background', - twoColumnsMenuBarColor: 'Default font color bar menu', - twoIsColumnsMenuBarColorGradual: 'Column gradient', - threeTitle: 'Interface settings', - threeIsCollapse: 'Menu horizontal collapse', - threeIsUniqueOpened: 'Menu accordion', - threeIsFixedHeader: 'Fixed header', - threeIsClassicSplitMenu: 'Classic layout split menu', - threeIsLockScreen: 'Open the lock screen', - threeLockScreenTime: 'screen locking(s/s)', - fourTitle: 'Interface display', - fourIsShowLogo: 'Sidebar logo', - fourIsBreadcrumb: 'Open breadcrumb', - fourIsBreadcrumbIcon: 'Open breadcrumb icon', - fourIsTagsview: 'Open tagsview', - fourIsTagsviewIcon: 'Open tagsview Icon', - fourIsCacheTagsView: 'Enable tagsview cache', - fourIsSortableTagsView: 'Enable tagsview drag', - fourIsShareTagsView: 'Enable tagsview sharing', - fourIsFooter: 'Open footer', - fourIsGrayscale: 'Grey model', - fourIsInvert: 'Color weak mode', - fourIsDark: 'Dark Mode', - fourIsWartermark: 'Turn on watermark', - fourWartermarkText: 'Watermark copy', - fiveTitle: 'Other settings', - fiveTagsStyle: 'Tagsview style', - fiveAnimation: 'page animation', - fiveColumnsAsideStyle: 'Column style', - fiveColumnsAsideLayout: 'Column layout', - sixTitle: 'Layout switch', - sixDefaults: 'One', - sixClassic: 'Two', - sixTransverse: 'Three', - sixColumns: 'Four', - tipText: 'Click the button below to copy the layout configuration to `/src/stores/themeConfig.ts` It has been modified in.', - copyText: 'replication configuration', - resetText: 'restore default', - copyTextSuccess: 'Copy succeeded!', - copyTextError: 'Copy failed!', - }, + router: { + home: 'home', + system: 'system', + systemMenu: 'systemMenu', + systemRole: 'systemRole', + systemUser: 'systemUser', + systemDept: 'systemDept', + systemDic: 'systemDic', + limits: 'limits', + limitsFrontEnd: 'FrontEnd', + limitsFrontEndPage: 'FrontEndPage', + limitsFrontEndBtn: 'FrontEndBtn', + limitsBackEnd: 'BackEnd', + limitsBackEndEndPage: 'BackEndEndPage', + personal: 'personal', + }, + staticRoutes: { + signIn: 'signIn', + notFound: 'notFound', + noPower: 'noPower', + }, + user: { + title0: 'Component size', + title1: 'Language switching', + title2: 'Menu search', + title3: 'Layout configuration', + title4: 'news', + title5: 'Full screen on', + title6: 'Full screen off', + dropdownLarge: 'large', + dropdownDefault: 'default', + dropdownSmall: 'small', + dropdown1: 'home page', + dropdown2: 'Personal Center', + dropdown3: '404', + dropdown4: '401', + dropdown5: 'Log out', + dropdown6: 'Code warehouse', + searchPlaceholder: 'Menu search: support Chinese, routing path', + newTitle: 'notice', + newBtn: 'All read', + newGo: 'Go to the notification center', + newDesc: 'No notice', + logOutTitle: 'Tips', + logOutMessage: 'This operation will log out. Do you want to continue?', + logOutConfirm: 'determine', + logOutCancel: 'cancel', + logOutExit: 'Exiting', + }, + tagsView: { + refresh: 'refresh', + close: 'close', + closeOther: 'closeOther', + closeAll: 'closeAll', + fullscreen: 'fullscreen', + closeFullscreen: 'closeFullscreen', + }, + notFound: { + foundTitle: 'Wrong address input, please re-enter the address~', + foundMsg: 'You can check the web address first, and then re-enter or give us feedback.', + foundBtn: 'Back to home page', + }, + noAccess: { + accessTitle: 'You are not authorized to operate~', + accessMsg: 'Contact information: add QQ group discussion 665452019', + accessBtn: 'Reauthorization', + }, + layout: { + configTitle: 'Layout configuration', + oneTitle: 'Global Themes', + twoTopTitle: 'top bar set up', + twoMenuTitle: 'Menu set up', + twoColumnsTitle: 'Columns set up', + twoTopBar: 'Top bar background', + twoTopBarColor: 'Top bar default font color', + twoIsTopBarColorGradual: 'Top bar gradient', + twoMenuBar: 'Menu background', + twoMenuBarColor: 'Menu default font color', + twoIsMenuBarColorGradual: 'Menu gradient', + twoColumnsMenuBar: 'Column menu background', + twoColumnsMenuBarColor: 'Default font color bar menu', + twoIsColumnsMenuBarColorGradual: 'Column gradient', + threeTitle: 'Interface settings', + threeIsCollapse: 'Menu horizontal collapse', + threeIsUniqueOpened: 'Menu accordion', + threeIsFixedHeader: 'Fixed header', + threeIsClassicSplitMenu: 'Classic layout split menu', + threeIsLockScreen: 'Open the lock screen', + threeLockScreenTime: 'screen locking(s/s)', + fourTitle: 'Interface display', + fourIsShowLogo: 'Sidebar logo', + fourIsBreadcrumb: 'Open breadcrumb', + fourIsBreadcrumbIcon: 'Open breadcrumb icon', + fourIsTagsview: 'Open tagsview', + fourIsTagsviewIcon: 'Open tagsview Icon', + fourIsCacheTagsView: 'Enable tagsview cache', + fourIsSortableTagsView: 'Enable tagsview drag', + fourIsShareTagsView: 'Enable tagsview sharing', + fourIsFooter: 'Open footer', + fourIsGrayscale: 'Grey model', + fourIsInvert: 'Color weak mode', + fourIsDark: 'Dark Mode', + fourIsWartermark: 'Turn on watermark', + fourWartermarkText: 'Watermark copy', + fiveTitle: 'Other settings', + fiveTagsStyle: 'Tagsview style', + fiveAnimation: 'page animation', + fiveColumnsAsideStyle: 'Column style', + fiveColumnsAsideLayout: 'Column layout', + sixTitle: 'Layout switch', + sixDefaults: 'One', + sixClassic: 'Two', + sixTransverse: 'Three', + sixColumns: 'Four', + tipText: 'Click the button below to copy the layout configuration to `/src/stores/themeConfig.ts` It has been modified in.', + copyText: 'replication configuration', + resetText: 'restore default', + copyTextSuccess: 'Copy succeeded!', + copyTextError: 'Copy failed!', + }, + upgrade: { + title: 'New version upgrade', + msg: 'It\'s a new version. Update it now!Don\'t worry, update quickly oh!', + desc: 'Tip: The update restores the default configuration', + btnOne: 'Cruel refusal', + btnTwo: 'Update now', + btnTwoLoading: 'updating', + }, }; diff --git a/web/src/i18n/lang/zh-cn.ts b/web/src/i18n/lang/zh-cn.ts index 567cb9a..6fc6ef3 100644 --- a/web/src/i18n/lang/zh-cn.ts +++ b/web/src/i18n/lang/zh-cn.ts @@ -1,134 +1,144 @@ // 定义内容 export default { - router: { - home: '首页', - system: '系统管理', - config: '常规配置', - log: '日志管理', - /* 常规配置 */ - configSystem: '系统配置', - configDict: '字典管理', - configArea: '地区管理', - configFile: '附件管理', - /* 系统管理 */ - systemMenu: '菜单管理', - systemRole: '角色管理', - systemUser: '用户管理', - systemDept: '部门管理', - /* 日志管理 */ - loginLog: '登录日志', - operationLog: '操作日志', - systemApiWhiteList: '接口白名单', - limits: '权限管理', - limitsFrontEnd: '前端控制', - limitsFrontEndPage: '页面权限', - limitsFrontEndBtn: '按钮权限', - limitsBackEnd: '后端控制', - limitsBackEndEndPage: '页面权限', - personal: '个人中心', - }, - staticRoutes: { - signIn: '登录', - notFound: '找不到此页面', - noPower: '没有权限', - }, - user: { - title0: '组件大小', - title1: '语言切换', - title2: '菜单搜索', - title3: '布局配置', - title4: '消息', - title5: '开全屏', - title6: '关全屏', - dropdownLarge: '大型', - dropdownDefault: '默认', - dropdownSmall: '小型', - dropdown1: '首页', - dropdown2: '个人中心', - dropdown3: '404', - dropdown4: '401', - dropdown5: '退出登录', - dropdown6: '代码仓库', - searchPlaceholder: '菜单搜索:支持中文、路由路径', - newTitle: '通知', - newBtn: '全部已读', - newGo: '前往通知中心', - newDesc: '暂无通知', - logOutTitle: '提示', - logOutMessage: '此操作将退出登录, 是否继续?', - logOutConfirm: '确定', - logOutCancel: '取消', - logOutExit: '退出中', - }, - tagsView: { - refresh: '刷新', - close: '关闭', - closeOther: '关闭其它', - closeAll: '全部关闭', - fullscreen: '当前页全屏', - closeFullscreen: '关闭全屏', - }, - notFound: { - foundTitle: '地址输入错误,请重新输入地址~', - foundMsg: '您可以先检查网址,然后重新输入或给我们反馈问题。', - foundBtn: '返回首页', - }, - noAccess: { - accessTitle: '您未被授权,没有操作权限~', - accessMsg: '联系方式:加QQ群探讨 665452019', - accessBtn: '重新授权', - }, - layout: { - configTitle: '布局配置', - oneTitle: '全局主题', - twoTopTitle: '顶栏设置', - twoMenuTitle: '菜单设置', - twoColumnsTitle: '分栏设置', - twoTopBar: '顶栏背景', - twoTopBarColor: '顶栏默认字体颜色', - twoIsTopBarColorGradual: '顶栏背景渐变', - twoMenuBar: '菜单背景', - twoMenuBarColor: '菜单默认字体颜色', - twoIsMenuBarColorGradual: '菜单背景渐变', - twoColumnsMenuBar: '分栏菜单背景', - twoColumnsMenuBarColor: '分栏菜单默认字体颜色', - twoIsColumnsMenuBarColorGradual: '分栏菜单背景渐变', - threeTitle: '界面设置', - threeIsCollapse: '菜单水平折叠', - threeIsUniqueOpened: '菜单手风琴', - threeIsFixedHeader: '固定 Header', - threeIsClassicSplitMenu: '经典布局分割菜单', - threeIsLockScreen: '开启锁屏', - threeLockScreenTime: '自动锁屏(s/秒)', - fourTitle: '界面显示', - fourIsShowLogo: '侧边栏 Logo', - fourIsBreadcrumb: '开启 Breadcrumb', - fourIsBreadcrumbIcon: '开启 Breadcrumb 图标', - fourIsTagsview: '开启 Tagsview', - fourIsTagsviewIcon: '开启 Tagsview 图标', - fourIsCacheTagsView: '开启 TagsView 缓存', - fourIsSortableTagsView: '开启 TagsView 拖拽', - fourIsShareTagsView: '开启 TagsView 共用', - fourIsFooter: '开启 Footer', - fourIsGrayscale: '灰色模式', - fourIsInvert: '色弱模式', - fourIsDark: '深色模式', - fourIsWartermark: '开启水印', - fourWartermarkText: '水印文案', - fiveTitle: '其它设置', - fiveTagsStyle: 'Tagsview 风格', - fiveAnimation: '主页面切换动画', - fiveColumnsAsideStyle: '分栏高亮风格', - fiveColumnsAsideLayout: '分栏布局风格', - sixTitle: '布局切换', - sixDefaults: '默认', - sixClassic: '经典', - sixTransverse: '横向', - sixColumns: '分栏', - tipText: '点击下方按钮,复制布局配置去 `src/stores/themeConfig.ts` 中修改。', - copyText: '一键复制配置', - resetText: '一键恢复默认', - copyTextSuccess: '复制成功!', - copyTextError: '复制失败!', - }, + router: { + home: '首页', + system: '系统管理', + config: '常规配置', + log: '日志管理', + /* 常规配置 */ + configSystem: '系统配置', + configDict: '字典管理', + configArea: '地区管理', + configFile: '附件管理', + /* 系统管理 */ + systemMenu: '菜单管理', + systemRole: '角色管理', + systemUser: '用户管理', + systemDept: '部门管理', + /* 日志管理 */ + loginLog: '登录日志', + operationLog: '操作日志', + systemApiWhiteList: '接口白名单', + limits: '权限管理', + limitsFrontEnd: '前端控制', + limitsFrontEndPage: '页面权限', + limitsFrontEndBtn: '按钮权限', + limitsBackEnd: '后端控制', + limitsBackEndEndPage: '页面权限', + personal: '个人中心', + }, + staticRoutes: { + signIn: '登录', + notFound: '找不到此页面', + noPower: '没有权限', + }, + user: { + title0: '组件大小', + title1: '语言切换', + title2: '菜单搜索', + title3: '布局配置', + title4: '消息', + title5: '开全屏', + title6: '关全屏', + dropdownLarge: '大型', + dropdownDefault: '默认', + dropdownSmall: '小型', + dropdown1: '首页', + dropdown2: '个人中心', + dropdown3: '404', + dropdown4: '401', + dropdown5: '退出登录', + dropdown6: '代码仓库', + searchPlaceholder: '菜单搜索:支持中文、路由路径', + newTitle: '通知', + newBtn: '全部已读', + newGo: '前往通知中心', + newDesc: '暂无通知', + logOutTitle: '提示', + logOutMessage: '此操作将退出登录, 是否继续?', + logOutConfirm: '确定', + logOutCancel: '取消', + logOutExit: '退出中', + }, + tagsView: { + refresh: '刷新', + close: '关闭', + closeOther: '关闭其它', + closeAll: '全部关闭', + fullscreen: '当前页全屏', + closeFullscreen: '关闭全屏', + }, + notFound: { + foundTitle: '地址输入错误,请重新输入地址~', + foundMsg: '您可以先检查网址,然后重新输入或给我们反馈问题。', + foundBtn: '返回首页', + }, + noAccess: { + accessTitle: '您未被授权,没有操作权限~', + accessMsg: '联系方式:加QQ群探讨 665452019', + accessBtn: '重新授权', + }, + layout: { + configTitle: '布局配置', + oneTitle: '全局主题', + twoTopTitle: '顶栏设置', + twoMenuTitle: '菜单设置', + twoColumnsTitle: '分栏设置', + twoTopBar: '顶栏背景', + twoTopBarColor: '顶栏默认字体颜色', + twoIsTopBarColorGradual: '顶栏背景渐变', + twoMenuBar: '菜单背景', + twoMenuBarColor: '菜单默认字体颜色', + twoMenuBarActiveColor: '菜单高亮背景色', + twoIsMenuBarColorGradual: '菜单背景渐变', + twoColumnsMenuBar: '分栏菜单背景', + twoColumnsMenuBarColor: '分栏菜单默认字体颜色', + twoIsColumnsMenuBarColorGradual: '分栏菜单背景渐变', + twoIsColumnsMenuHoverPreload: '分栏菜单滑鼠悬停预加载', + threeTitle: '界面设置', + threeIsCollapse: '菜单水平折叠', + threeIsUniqueOpened: '菜单手风琴', + threeIsFixedHeader: '固定 Header', + threeIsClassicSplitMenu: '经典布局分割菜单', + threeIsLockScreen: '开启锁屏', + threeLockScreenTime: '自动锁屏(s/秒)', + fourTitle: '界面显示', + fourIsShowLogo: '侧边栏 Logo', + fourIsBreadcrumb: '开启 Breadcrumb', + fourIsBreadcrumbIcon: '开启 Breadcrumb 图标', + fourIsTagsview: '开启 Tagsview', + fourIsTagsviewIcon: '开启 Tagsview 图标', + fourIsCacheTagsView: '开启 TagsView 缓存', + fourIsSortableTagsView: '开启 TagsView 拖拽', + fourIsShareTagsView: '开启 TagsView 共用', + fourIsFooter: '开启 Footer', + fourIsGrayscale: '灰色模式', + fourIsInvert: '色弱模式', + fourIsDark: '深色模式', + fourIsWartermark: '开启水印', + fourWartermarkText: '水印文案', + fiveTitle: '其它设置', + fiveTagsStyle: 'Tagsview 风格', + fiveAnimation: '主页面切换动画', + fiveColumnsAsideStyle: '分栏高亮风格', + fiveColumnsAsideLayout: '分栏布局风格', + sixTitle: '布局切换', + sixDefaults: '默认', + sixClassic: '经典', + sixTransverse: '横向', + sixColumns: '分栏', + tipText: '点击下方按钮,复制布局配置去 `src/stores/themeConfig.ts` 中修改。', + copyText: '一键复制配置', + resetText: '一键恢复默认', + copyTextSuccess: '复制成功!', + copyTextError: '复制失败!', + }, + upgrade: { + title: '新版本升级', + msg: '新版本来啦,马上更新尝鲜吧!不用担心,更新很快的哦!', + desc: '提示:更新会还原默认配寘', + btnOne: '残忍拒绝', + btnTwo: '马上更新', + btnTwoLoading: '更新中', + }, }; diff --git a/web/src/i18n/pages/login/zh-cn.ts b/web/src/i18n/pages/login/zh-cn.ts index 61f994d..6ab9813 100644 --- a/web/src/i18n/pages/login/zh-cn.ts +++ b/web/src/i18n/pages/login/zh-cn.ts @@ -1,7 +1,7 @@ // 定义内容 export default { label: { - one1: '用户名登录', + one1: '账号密码登录', two2: '手机号登录', }, link: { diff --git a/web/src/layout/upgrade/index.vue b/web/src/layout/upgrade/index.vue index 7fe861a..e361012 100644 --- a/web/src/layout/upgrade/index.vue +++ b/web/src/layout/upgrade/index.vue @@ -76,10 +76,10 @@ const delayShow = () => { }; // 页面加载时 onMounted(() => { - // delayShow(); - // setTimeout(() => { - // state.btnTxt = t('message.upgrade.btnTwo'); - // }, 200); + delayShow(); + setTimeout(() => { + state.btnTxt = t('message.upgrade.btnTwo'); + }, 200); }); From 6172dea399222bd1a251634dc3670b1913c5d5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 23 Nov 2023 16:33:19 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=95=86?= =?UTF-8?q?=E4=B8=9A=E6=8E=88=E6=9D=83=E6=A0=87=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layout/component/main.vue | 2 +- web/src/layout/footer/index.vue | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/layout/component/main.vue b/web/src/layout/component/main.vue index fd3f599..9250d1e 100644 --- a/web/src/layout/component/main.vue +++ b/web/src/layout/component/main.vue @@ -4,7 +4,7 @@ - + diff --git a/web/src/layout/footer/index.vue b/web/src/layout/footer/index.vue index 526cd8f..67e6e5c 100644 --- a/web/src/layout/footer/index.vue +++ b/web/src/layout/footer/index.vue @@ -1,8 +1,7 @@ From 42e6c7b6003501580586423c35e89c446ac5a73a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 23 Nov 2023 18:55:25 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20websocket=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/websocketConfig.py | 2 +- web/src/App.vue | 14 +++-- web/src/i18n/lang/zh-cn.ts | 4 +- web/src/i18n/lang/zh-tw.ts | 2 +- web/src/layout/navBars/breadcrumb/user.vue | 69 +++++++++++++++++++++- web/src/layout/upgrade/index.vue | 2 +- web/src/stores/interface/index.ts | 1 + web/src/stores/userInfo.ts | 4 ++ web/src/utils/websocket.ts | 20 +++++-- 9 files changed, 100 insertions(+), 18 deletions(-) diff --git a/backend/application/websocketConfig.py b/backend/application/websocketConfig.py index c36d97a..ab2cd64 100644 --- a/backend/application/websocketConfig.py +++ b/backend/application/websocketConfig.py @@ -73,7 +73,7 @@ class DvadminWebSocket(AsyncJsonWebsocketConsumer): unread_count = await _get_message_unread(self.user_id) if unread_count == 0: # 发送连接成功 - await self.send_json(set_message('system', 'SYSTEM', '连接成功')) + await self.send_json(set_message('system', 'SYSTEM', '您已上线')) else: await self.send_json( set_message('system', 'SYSTEM', "请查看您的未读消息~", diff --git a/web/src/App.vue b/web/src/App.vue index ec824fa..caa36ca 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -59,12 +59,6 @@ onBeforeMount(() => { setIntroduction.cssCdn(); // 设置批量第三方 js setIntroduction.jsCdn(); - //websockt 模块 - try { - //websocket.init(wsReceive) - } catch (e) { - console.log('websocket错误'); - } }); // 页面加载时 onMounted(() => { @@ -93,6 +87,14 @@ watch( () => route.path, () => { other.useTitle(); + if (!websocket.websocket) { + //websockt 模块 + try { + websocket.init(wsReceive) + } catch (e) { + console.log('websocket错误'); + } + } }, { deep: true, diff --git a/web/src/i18n/lang/zh-cn.ts b/web/src/i18n/lang/zh-cn.ts index 6fc6ef3..6289a39 100644 --- a/web/src/i18n/lang/zh-cn.ts +++ b/web/src/i18n/lang/zh-cn.ts @@ -40,6 +40,8 @@ export default { title4: '消息', title5: '开全屏', title6: '关全屏', + retry: '重试上线', + onlinePrompt: '当前离线状态,是否重试上线?', dropdownLarge: '大型', dropdownDefault: '默认', dropdownSmall: '小型', @@ -75,7 +77,7 @@ export default { }, noAccess: { accessTitle: '您未被授权,没有操作权限~', - accessMsg: '联系方式:加QQ群探讨 665452019', + accessMsg: '请联系管理员', accessBtn: '重新授权', }, layout: { diff --git a/web/src/i18n/lang/zh-tw.ts b/web/src/i18n/lang/zh-tw.ts index 35e406f..ea00164 100644 --- a/web/src/i18n/lang/zh-tw.ts +++ b/web/src/i18n/lang/zh-tw.ts @@ -123,7 +123,7 @@ export default { }, noAccess: { accessTitle: '您未被授權,沒有操作許可權~', - accessMsg: '聯繫方式:加QQ群探討665452019', + accessMsg: '請聯系管理員', accessBtn: '重新授權', }, layout: { diff --git a/web/src/layout/navBars/breadcrumb/user.vue b/web/src/layout/navBars/breadcrumb/user.vue index f4cf706..620a076 100644 --- a/web/src/layout/navBars/breadcrumb/user.vue +++ b/web/src/layout/navBars/breadcrumb/user.vue @@ -57,9 +57,33 @@ :class="!state.isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'" > +
+ + + + + +
- + + + + + {{ userInfos.username === '' ? 'common' : userInfos.username }} @@ -79,7 +103,7 @@