Commit 0a951e876abf952e7f65a68c5147a5a18e261d64

Authored by 648540858
1 parent b9228981

添加修改密码失败的提示

src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
@@ -95,7 +95,7 @@ public class MediaServiceImpl implements IMediaService { @@ -95,7 +95,7 @@ public class MediaServiceImpl implements IMediaService {
95 streamInfoResult.setHttps_ts(String.format("https://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); 95 streamInfoResult.setHttps_ts(String.format("https://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
96 streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); 96 streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
97 streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream)); 97 streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
98 - streamInfoResult.setRtc(String.format("http://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream)); 98 + streamInfoResult.setRtc(String.format("https://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream));
99 } 99 }
100 100
101 streamInfoResult.setTracks(tracks); 101 streamInfoResult.setTracks(tracks);
src/main/java/com/genersoft/iot/vmp/vmanager/user/UserController.java
@@ -76,7 +76,11 @@ public class UserController { @@ -76,7 +76,11 @@ public class UserController {
76 @PostMapping("/changePassword") 76 @PostMapping("/changePassword")
77 public String changePassword(@RequestParam String oldPassword, @RequestParam String password){ 77 public String changePassword(@RequestParam String oldPassword, @RequestParam String password){
78 // 获取当前登录用户id 78 // 获取当前登录用户id
79 - String username = SecurityUtils.getUserInfo().getUsername(); 79 + LoginUser userInfo = SecurityUtils.getUserInfo();
  80 + if (userInfo== null) {
  81 + return "fail";
  82 + }
  83 + String username = userInfo.getUsername();
80 LoginUser user = null; 84 LoginUser user = null;
81 try { 85 try {
82 user = SecurityUtils.login(username, oldPassword, authenticationManager); 86 user = SecurityUtils.login(username, oldPassword, authenticationManager);
web_src/src/components/dialog/changePassword.vue
@@ -106,6 +106,12 @@ export default { @@ -106,6 +106,12 @@ export default {
106 this.$router.push('/login'); 106 this.$router.push('/login');
107 this.sseSource.close(); 107 this.sseSource.close();
108 },800) 108 },800)
  109 + }else {
  110 + this.$message({
  111 + showClose: true,
  112 + message: '修改密码失败,是否已登录(接口鉴权关闭无法修改密码)',
  113 + type: 'error'
  114 + });
109 } 115 }
110 }).catch((error)=> { 116 }).catch((error)=> {
111 console.error(error) 117 console.error(error)