feat:会议模块换成原生 - web端配合修改

This commit is contained in:
weifashi 2023-07-05 18:36:06 +08:00
parent 560562755b
commit 9ceb00bf54
16 changed files with 145 additions and 18 deletions

View File

@ -1154,7 +1154,7 @@ class UsersController extends AbstractController
if (empty($meetingSetting['appid']) || empty($meetingSetting['app_certificate'])) {
return Base::retError('会议功能配置错误,请联系管理员');
}
$uid = $user->userid . '_' . Request::header('fd');
$uid = intval(str_pad( Request::header('fd'), 6, 9, STR_PAD_LEFT) . $user->userid);
try {
$service = new AgoraTokenGenerator($meetingSetting['appid'], $meetingSetting['app_certificate'], $meeting->channel, $uid);
} catch (\Exception $e) {
@ -1183,6 +1183,8 @@ class UsersController extends AbstractController
//
$data['appid'] = $meetingSetting['appid'];
$data['uid'] = $uid;
$data['userimg'] = $user->userimg;
$data['nickname'] = $user->nickname;
$data['token'] = $token;
$data['msgs'] = $msgs;
return Base::retSuccess('success', $data);

View File

@ -1242,4 +1242,6 @@ Markdown 格式发送
指定成员
项目人员可见
任务人员可见
选择指定人员
选择指定人员
加入会议失败

View File

@ -16828,5 +16828,16 @@
"de": "Eine reine wahl.",
"fr": "Aléatoire!",
"id": "Memilih semua"
},
{
"key": "加入会议失败",
"zh": "",
"zh-CHT": "加入會議失敗",
"en": "Failed to join a meeting",
"ko": "회의에 참여할 수 없습니다.",
"ja": "参加に失敗しました",
"de": "Ich wurde nicht gewählt.",
"fr": "Échec de la Réunion dadhésion",
"id": "Bergabung dengan konferensi gagal"
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]

View File

@ -297,6 +297,51 @@ export default {
this.$store.dispatch("getBasicData", 600)
}
}
//
window.__onMeetingEvent = ({act,uuid}) => {
switch (act) {
//
case "getInfo":
this.$store.dispatch("call", {
url: 'users/basic',
data: {
userid: [ (uuid+"").substring(6) ]
}
}).then(({data}) => {
$A.eeuiAppSendMessage({
action: 'updateMeetingInfo',
infos: {
uuid: uuid,
avatar: data[0]?.userimg,
username: data[0]?.nickname,
}
});
}).catch(({msg}) => {
$A.modalError(msg);
});
break;
//
case "success":
//
this.$store.dispatch("closeMeetingWindow","add")
break;
//
case "invent":
//
this.$store.dispatch("closeMeetingWindow","invitation")
break;
//
case "endMeeting":
break;
//
case "error":
this.$store.dispatch("closeMeetingWindow","error")
break;
default:
break;
}
}
//
window.__onKeyboardStatus = (data) => {
const message = $A.jsonParse(decodeURIComponent(data));

View File

@ -117,6 +117,7 @@
<script>
import {Store} from "le5le-store";
import { mapState } from 'vuex'
import MeetingPlayer from "./MeetingPlayer";
import DragBallComponent from "../../../components/DragBallComponent";
import UserSelect from "../../../components/UserSelect.vue";
@ -156,6 +157,10 @@ export default {
}
},
computed: {
...mapState(['meetingWindow']),
},
mounted() {
this.subscribe = Store.subscribe('addMeeting', this.onAdd);
},
@ -179,6 +184,28 @@ export default {
if (!val) {
this.$refs.meetingModal.modalIndex = this.$refs.meetingModal.handleGetModalIndex()
}
},
meetingWindow : {
handler(val) {
switch (val.type) {
case 'add':
this.addShow = val.show
this.loadIng = 0;
break;
case 'invitation':
this.invitationShow = val.show
this.invitationLoad = 0;
break;
case 'error':
this.addShow = val.show
this.loadIng = 0;
this.invitationShow = val.show
this.invitationLoad = 0;
$A.modalError('加入会议失败');
break;
}
},
immediate: true,
}
},
@ -235,13 +262,30 @@ export default {
delete data.name;
delete data.msgs;
//
$A.loadScript('js/AgoraRTC_N-4.17.0.js').then(_ => {
this.join(data)
}).catch(_ => {
$A.modalError("会议组件加载失败!");
}).finally(_ => {
if ($A.isEEUiApp) {
$A.eeuiAppSendMessage({
action: 'startMeeting',
meetingParams: {
token: data.token,
channel: data.channel,
uuid: data.uid,
appid: data.appid,
avatar: data.userimg,
username: data.nickname,
video: this.addData.tracks.includes("video"),
audio: this.addData.tracks.includes("audio"),
}
});
this.loadIng--;
})
}else{
$A.loadScript('js/AgoraRTC_N-4.17.0.js').then(_ => {
this.join(data)
}).catch(_ => {
$A.modalError("会议组件加载失败!");
}).finally(_ => {
this.loadIng--;
})
}
}).catch(({msg}) => {
this.loadIng--;
$A.modalError(msg);

View File

@ -3399,5 +3399,22 @@ export default {
resolve($A.jsonParse(data))
})
})
}
},
/** *****************************************************************************************/
/** *************************************** pgp *********************************************/
/** *****************************************************************************************/
/**
* 关闭会议窗口
* @param state
* @param data
*/
closeMeetingWindow({state}, type) {
state.meetingWindow = {
show: false,
type: type
};
},
}

View File

@ -194,4 +194,10 @@ export default {
// 审批待办未读数量
approveUnreadNumber: 0,
// 会议窗口
meetingWindow: {
show: false,
type: "",
}
};