Przeglądaj źródła

修复头像不显示的bug

xie.bx 3 lat temu
rodzic
commit
6e7ed1b318

+ 0 - 4
im-platform/src/main/java/com/bx/implatform/config/WebSecurityConfg.java

@@ -42,8 +42,6 @@ import java.io.PrintWriter;
 public class WebSecurityConfg extends WebSecurityConfigurerAdapter {
 
 
-    @Value("${web-ui.login-page}")
-    private String loginPage;
 
     @Qualifier("securityUserDetailsServiceImpl")
     @Autowired
@@ -62,7 +60,6 @@ public class WebSecurityConfg extends WebSecurityConfigurerAdapter {
             .and()
             //2、登录配置表单认证方式
             .formLogin()
-            .loginPage(loginPage)//自定义登录页面的url
             .usernameParameter("username")//设置登录账号参数,与表单参数一致
             .passwordParameter("password")//设置登录密码参数,与表单参数一致
             .loginProcessingUrl("/login")//配置默认登录入口
@@ -77,7 +74,6 @@ public class WebSecurityConfg extends WebSecurityConfigurerAdapter {
             .and()
             //4、session管理
             .sessionManagement()
-            .invalidSessionUrl(loginPage) //失效后跳转到登陆页面
             .and()
             //5、禁用跨站csrf攻击防御
             .csrf()

+ 1 - 4
im-platform/src/main/resources/application.yml

@@ -30,12 +30,9 @@ mybatis-plus:
     - classpath*:mapper/*.xml
 minio:
   endpoint: http://127.0.0.1:9001 #内网地址
-  public: http://3xagfu.natappfree.cc/file  #外网访问地址
+  public: http://127.0.0.1:9001  #外网访问地址
   accessKey: admin
   secretKey: 12345678
   bucketName: box-im
   imagePath: image
   filePath: file
-
-web-ui:
-  login-page: http://localhost:8080

+ 7 - 0
im-ui/.env.development

@@ -0,0 +1,7 @@
+
+ENV = 'development'
+
+// 接口请求地址
+VUE_APP_BASE_API = '/api'
+
+VUE_APP_WS_URL = 'ws://localhost:8878/im'

+ 6 - 0
im-ui/.env.production

@@ -0,0 +1,6 @@
+ENV = 'production'
+
+# 接口地址
+VUE_APP_BASE_API  = 'http://8.134.92.70/api'
+
+VUE_APP_WS_URL = 'ws://8.134.92.70:81/im'

+ 1 - 1
im-ui/src/components/group/AddGroupMember.vue

@@ -1,5 +1,5 @@
 <template>
-	<el-dialog title="邀请好友" :visible.sync="visible" v-if="visible" width="50%" :before-close="handleClose">
+	<el-dialog title="邀请好友" :visible.sync="visible"  width="50%" :before-close="handleClose">
 		<div class="agm-container">
 			<div class="agm-l-box">
 				<el-input width="200px" placeholder="搜索好友" class="input-with-select" v-model="searchText" @keyup.enter.native="handleSearch()">

+ 7 - 5
im-ui/src/components/setting/Setting.vue

@@ -1,5 +1,5 @@
 <template>
-	<el-dialog class="setting" title="设置" :visible.sync="visible" width="30%" :before-close="handleClose">
+	<el-dialog class="setting" title="设置" :visible.sync="visible"  width="30%" :before-close="handleClose">
 		<el-form :model="userInfo" label-width="80px" :rules="rules" ref="settingForm">
 			<el-form-item label="头像">
 				<file-upload  class="avatar-uploader"
@@ -99,10 +99,12 @@
 				return `${process.env.VUE_APP_BASE_API}/image/upload`;
 			}
 		},
-		mounted() {
-			// 深拷贝
-			let mine = this.$store.state.userStore.userInfo;
-			this.userInfo = JSON.parse(JSON.stringify(mine));
+		watch: {
+			visible: function(newData, oldData) {
+				// 深拷贝
+				let mine = this.$store.state.userStore.userInfo;
+				this.userInfo = JSON.parse(JSON.stringify(mine));
+			}
 		}
 	}
 </script>

+ 1 - 1
im-ui/src/store/userStore.js

@@ -11,7 +11,7 @@ export default {
 				console.log("用户切换")
 				this.commit("resetChatStore");
 			}
-			state.userInfo = Object.assign(state.userInfo, userInfo);
+			state.userInfo = userInfo;
 		}
 	}
 	

+ 2 - 1
im-ui/src/view/Friend.vue

@@ -1,7 +1,7 @@
 <template>
 	<el-container>
 		<el-aside width="250px" class="l-friend-box">
-			<div class="l-friend-header" height="5%">
+			<div class="l-friend-header">
 				<div class="l-friend-search">
 					<el-input width="200px" placeholder="搜索好友" v-model="searchText">
 						<el-button slot="append" icon="el-icon-search"></el-button>
@@ -162,6 +162,7 @@
 			border: #dddddd solid 1px;
 			background: white;
 			.l-friend-header {
+				height: 50px;
 				display: flex;
 				align-items: center;
 				padding: 5px;