Browse Source

更新:一、登录后调用MQ消息接口。二、登出后调用MQ消息接口。三、修改北信源实时通讯漂浮按钮服务ip

LiZhi 3 years ago
parent
commit
c06e180a53

+ 7 - 0
src/views/main/main-navbar-user.vue

@@ -64,6 +64,13 @@ export default {
         cancelButtonText: this.$t('cancel'),
         type: 'warning'
       }).then(() => {
+        // 发送用户登出成功MQ消息
+        this.$http.get('/mq/user/logout').then(({ data: res }) => {
+          if (res.code !== 0) {
+            return this.$message.error(res.msg)
+          }
+        }).catch(() => {})
+        
         this.$http.post('/idaas/sso/logout').then(({ data: res }) => {
           if (res.code !== 0) {
             return this.$message.error(res.msg)

+ 4 - 1
src/views/main/main.vue

@@ -263,7 +263,7 @@ export default {
         if (res.code !== 0) {
           return this.$message.error(res.msg)
         }
-        console.log(res)
+        // console.log(res)
         this.$store.state.user.name = res.userInfo.displayName
         this.$store.state.user.organizations = res.userInfo.organizations[0].organizationName
         if (res.userInfo.extendField && res.userInfo.extendField.regionCode) {
@@ -285,7 +285,10 @@ export default {
       if (!this.areaCode) {
         return
       }
+      // 生产环境
       this.$http.get('http://10.110.34.19:30600/sysbase/area/admin/getCityAreaByCode?areaCode=' + this.areaCode).then(({ data: res }) => {
+      // 测试环境
+      // this.$http.get('http://10.110.37.15:30600/sysbase/area/admin/getCityAreaByCode?areaCode=' + this.areaCode).then(({ data: res }) => {
         if (res.code !== '0') {
           return this.$message.error(res.msg)
         }

+ 1 - 1
src/views/main/openPcexeBtn.vue

@@ -29,7 +29,7 @@ export default {
     },
     gotoExe () {
       this.vrv.pcsdk.startProcess({
-        ip: '10.110.35.108', // 服务器标识
+        ip: '10.110.35.108:10669', // 服务器标识
         token: Cookies.get('token') // 第三方登录token
       }).then(res => {
         console.log('res', res)

+ 8 - 0
src/views/pages/login.vue

@@ -103,6 +103,14 @@ export default {
             return this.$message.error(res.msg)
           }
           Cookies.set('token', res.sessionToken)
+          
+          // 发送用户登录成功MQ消息
+          this.$http.get('/mq/user/login').then(({ data: res }) => {
+            if (res.code !== 0) {
+              return this.$message.error(res.msg)
+            }
+          }).catch(() => {})
+          
           this.$router.replace({ name: 'home' })
         }).catch(() => {})
       })