|
@@ -97,6 +97,25 @@ Page({
|
|
|
},
|
|
|
|
|
|
webViewParams() {
|
|
|
+ const regex = /^[\u4E00-\u9FA5A-Za-z0-9]+$/
|
|
|
+ '⎕'
|
|
|
+ // if (!regex.test(this.data.userInfo.nickName)) {
|
|
|
+ // this.setData({
|
|
|
+ // 'userInfo.nickName': 'user_' + this.data.userInfo.wxUserId
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ const filterNickname = (value: string) => {
|
|
|
+ var reg = /\\|\/|\?|\?|\*|\"|\“|\”|\'|\‘|\’|\<|\>|\{|\}|\[|\]|\【|\】|\:|\:|\、|\^|\$|\#|\&|\%|\!|\~|\`|\|/g;
|
|
|
+ var temp = value.replace(reg, "◻");
|
|
|
+ this.setData({
|
|
|
+ 'userInfo.nickName': encodeURIComponent(temp)
|
|
|
+ })
|
|
|
+ console.log('filterNickname',temp);
|
|
|
+
|
|
|
+ }
|
|
|
+ filterNickname(this.data.userInfo.nickName);
|
|
|
+
|
|
|
const params: SocketParams = {
|
|
|
vruserId: `${this.data.userInfo.wxUserId}`,
|
|
|
roomId: `${this.data.roomId}`,
|
|
@@ -202,10 +221,6 @@ Page({
|
|
|
if (!this.audioManger.ring) {
|
|
|
this.audioManger.start()
|
|
|
}
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.audioManger.changeMute(true)
|
|
|
- }, 2000)
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
@@ -297,8 +312,11 @@ Page({
|
|
|
},
|
|
|
handleSocketSignal(data) {
|
|
|
debugger
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
handleActionMuted(userId: string | undefined, muted: boolean | undefined) {
|
|
|
+ console.error('handleActionMuted');
|
|
|
if (userId && typeof muted !== "undefined") {
|
|
|
const f_userId = userId.replace('user_', '')
|
|
|
const app = getApp<IAppOption>();
|