From 356c5930e8bb7d36e1c01fe99606b00e4c0ea070 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 12 Aug 2021 15:12:45 +0800
Subject: [PATCH] 初版集成

---
 pages/videoCall/videoCall.nvue |   27 +++++++++++++++++----------
 store/mutations.js             |    1 +
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/pages/videoCall/videoCall.nvue b/pages/videoCall/videoCall.nvue
index 647c891..c8ca717 100644
--- a/pages/videoCall/videoCall.nvue
+++ b/pages/videoCall/videoCall.nvue
@@ -263,7 +263,7 @@
 						
 						} else if (d.res == 1) {
 							that.channel = d.roomId;
-							console.log('对方在线-- 等待对方接受');
+							console.log('对方在线-- 等待对方接受',d);
 							// call = true;
 							setTimeout(res => {
 								// uni.navigateBack();
@@ -336,18 +336,19 @@
 			// 初始化
 			async init() {
 				// 查看权限
-				if (uni.getSystemInfoSync().platform == 'ios') {
-					//查看相机权限
-					await this.requestAndroidPermission("camera", 'ios');
-					//查看录音权限
-					await this.requestAndroidPermission("record", 'ios');
+				console.log('开始初始化')
+				// if (uni.getSystemInfoSync().platform == 'ios') {
+				// 	//查看相机权限
+				// 	await this.requestAndroidPermission("camera", 'ios');
+				// 	//查看录音权限
+				// 	await this.requestAndroidPermission("record", 'ios');
 
-				} else if (uni.getSystemInfoSync().platform === 'android') {
+				// } else if (uni.getSystemInfoSync().platform === 'android') {
 					//查看相机权限
 					await this.requestAndroidPermission("android.permission.CAMERA", 'android');
 					//查看录音权限
 					await this.requestAndroidPermission("android.permission.RECORD_AUDIO", 'android');
-				}
+				// }
 				// 初始化 setCallBack
 				await this.callbackFn();
 				// 初始化 create
@@ -355,10 +356,15 @@
 				await RtcModule.create({
 					"appId": this.appid
 				}, (res) => {
-					console.log(res);
+					console.log(res,11111111111111111111111111111111);
 				});
 				this.uid = this.randomFn(6);
-				console.log(this.uid, '当前id码')
+				console.log('初始化完成’',this.uid, '当前id码');
+				uni.showToast({
+					title: this.uid,
+					duration: 2000,
+					// icon: 'none'
+				});
 			},
 			//设置角色
 			setClientRole(num) {
@@ -381,6 +387,7 @@
 					mask: true
 				});
 				//加入房间
+				console.log('room', this.channel,'useid',this.uid)
 				await RtcModule.joinChannel({
 					"token": "",
 					"channelId": this.channel,
diff --git a/store/mutations.js b/store/mutations.js
index f9870da..9fcaae0 100644
--- a/store/mutations.js
+++ b/store/mutations.js
@@ -46,6 +46,7 @@
 			state.puserID = data.userID;
 			state.avatar = data.avatar;
 		}
+		console.log('登入数据传输成功  开始进入连接')
 		
 		uni.connectSocket({
 			url: 'ws://192.168.0.111:9034/websocket'

--
Gitblit v1.9.3