Browse Source

修复头像不显示的bug

master
xie.bx 3 years ago
parent
commit
6e7ed1b318
  1. 4
      im-platform/src/main/java/com/bx/implatform/config/WebSecurityConfg.java
  2. 5
      im-platform/src/main/resources/application.yml
  3. 7
      im-ui/.env.development
  4. 6
      im-ui/.env.production
  5. 2
      im-ui/src/components/group/AddGroupMember.vue
  6. 4
      im-ui/src/components/setting/Setting.vue
  7. 2
      im-ui/src/store/userStore.js
  8. 3
      im-ui/src/view/Friend.vue

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

5
im-platform/src/main/resources/application.yml

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

7
im-ui/.env.development

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

6
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'

2
im-ui/src/components/group/AddGroupMember.vue

@ -1,5 +1,5 @@
<template> <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-container">
<div class="agm-l-box"> <div class="agm-l-box">
<el-input width="200px" placeholder="搜索好友" class="input-with-select" v-model="searchText" @keyup.enter.native="handleSearch()"> <el-input width="200px" placeholder="搜索好友" class="input-with-select" v-model="searchText" @keyup.enter.native="handleSearch()">

4
im-ui/src/components/setting/Setting.vue

@ -99,12 +99,14 @@
return `${process.env.VUE_APP_BASE_API}/image/upload`; return `${process.env.VUE_APP_BASE_API}/image/upload`;
} }
}, },
mounted() { watch: {
visible: function(newData, oldData) {
// //
let mine = this.$store.state.userStore.userInfo; let mine = this.$store.state.userStore.userInfo;
this.userInfo = JSON.parse(JSON.stringify(mine)); this.userInfo = JSON.parse(JSON.stringify(mine));
} }
} }
}
</script> </script>
<style lang="scss" > <style lang="scss" >

2
im-ui/src/store/userStore.js

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

3
im-ui/src/view/Friend.vue

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

Loading…
Cancel
Save