From e477179cd5a100440855bff8a951cefa70567ed1 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 3 Aug 2022 13:00:42 +0800 Subject: [PATCH] refactor: store action name --- .../src/main/resources/application-local.yaml | 22 +++++++++---------- yudao-ui-admin-vue3/src/store/modules/user.ts | 2 +- .../src/views/Login/components/LoginForm.vue | 2 +- .../src/views/Login/components/MobileForm.vue | 2 +- yudao-ui-admin/vue.config.js | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index fb31aa345..fbfcbfd08 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -45,33 +45,33 @@ spring: datasource: master: name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://39.107.87.6:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 username: root - password: 123456 - # username: sa - # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W + password: Root@xingyu123 + # username: sa + # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 name: ruoyi-vue-pro - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://39.107.87.6:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 username: root - password: 123456 - # username: sa - # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W + password: Root@xingyu123 + # username: sa + # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 127.0.0.1 # 地址 + host: 39.107.87.6 # 地址 port: 6379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 + database: 4 # 数据库索引 + password: xingyu # 密码,建议生产环境开启 jasypt: encryptor: diff --git a/yudao-ui-admin-vue3/src/store/modules/user.ts b/yudao-ui-admin-vue3/src/store/modules/user.ts index 0d0813bcd..a8aa17de8 100644 --- a/yudao-ui-admin-vue3/src/store/modules/user.ts +++ b/yudao-ui-admin-vue3/src/store/modules/user.ts @@ -39,7 +39,7 @@ export const useUserStore = defineStore({ } }, actions: { - async getUserInfoAction(userInfo: UserInfoVO) { + async setUserInfoAction(userInfo: UserInfoVO) { if (!getAccessToken()) { this.resetState() return null diff --git a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue index 5347521c9..4cdf76e40 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue @@ -112,7 +112,7 @@ const handleLogin = async (params) => { const res = await LoginApi.loginApi(loginData.loginForm) setToken(res) const userInfo = await LoginApi.getInfoApi() - await userStore.getUserInfoAction(userInfo) + await userStore.setUserInfoAction(userInfo) await getRoutes() loginLoading.value = false } diff --git a/yudao-ui-admin-vue3/src/views/Login/components/MobileForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/MobileForm.vue index f6be870e3..0ffd9d6dc 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/MobileForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/MobileForm.vue @@ -103,7 +103,7 @@ const signIn = async () => { .then(async (res) => { setToken(res?.token) const userInfo = await getInfoApi() - await userStore.getUserInfoAction(userInfo) + await userStore.setUserInfoAction(userInfo) getRoutes() }) .catch(() => {}) diff --git a/yudao-ui-admin/vue.config.js b/yudao-ui-admin/vue.config.js index 62d82b481..b05da0123 100644 --- a/yudao-ui-admin/vue.config.js +++ b/yudao-ui-admin/vue.config.js @@ -10,7 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || '芋道管理系统' // 网页标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 8081 // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions