浏览代码

密码加密取消匿名

FinalYu 2 年之前
父节点
当前提交
0d5d8c9063
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      chuanyi_client2/src/components/LeftMenu/index.vue

+ 6 - 1
chuanyi_client2/src/components/LeftMenu/index.vue

@@ -297,9 +297,14 @@ export default {
         if (valid) {
         if (valid) {
           // 参数封装
           // 参数封装
           let params = JSON.parse(JSON.stringify(this.connForm))
           let params = JSON.parse(JSON.stringify(this.connForm))
-          params.ipPassword = encrypt(this.connForm.ipPassword, getPubKey())
           params.dataSourceName = this.datasourceForm.datasourceName
           params.dataSourceName = this.datasourceForm.datasourceName
           params.dataSourceDescribe = this.datasourceForm.desc
           params.dataSourceDescribe = this.datasourceForm.desc
+          if (params.isAnonymous == 1) {
+            params.ipPassword = ''
+            params.ipUserName = ''
+          } else {
+            params.ipPassword = encrypt(this.connForm.ipPassword, getPubKey())
+          }
           if (this.chooseConnServer) {
           if (this.chooseConnServer) {
             params.typeId = this.chooseConnServer.typeId
             params.typeId = this.chooseConnServer.typeId
           } else if (this.chooseServerType) {
           } else if (this.chooseServerType) {