Просмотр исходного кода

修复用户名中文乱码的bug

xie.bx 3 лет назад
Родитель
Сommit
35905a2779
2 измененных файлов с 4 добавлено и 2 удалено
  1. 3 1
      im-ui/src/components/chat/ChatVoice.vue
  2. 1 1
      im-ui/src/view/Login.vue

+ 3 - 1
im-ui/src/components/chat/ChatVoice.vue

@@ -48,7 +48,8 @@
 		methods: {
 			handleClose() {
 				// 关闭前清除数据
-				this.rc.stop();
+				this.rc.destroy();
+				this.rc = new Recorder();
 				this.audio.pause();
 				this.mode = 'RECORD';
 				this.state = 'STOP';
@@ -118,6 +119,7 @@
 						url: url
 					}
 					this.$emit("send", data);
+					this.handleClose();
 				})
 			}
 		}

+ 1 - 1
im-ui/src/view/Login.vue

@@ -85,7 +85,7 @@
 				let reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
 				let arr = document.cookie.match(reg)
 			    if (arr){
-					 return (arr[2]);
+					 return unescape(arr[2]);
 				}
 			    return '';
 			 },