fix: 前端打开codelike

This commit is contained in:
CakeCN
2026-01-08 21:06:11 +08:00
parent af24c51a2f
commit befec5543c
3 changed files with 4 additions and 4 deletions

View File

@@ -86,8 +86,8 @@ document.addEventListener('DOMContentLoaded', function () {
})
socket.on('connect', function () {
});
socket.on('open-iframe', function(data) {
OpenIframe();
socket.on('open-iframe', function() {
OpenIframe(user_data);
});
// 监听来自服务器的消息
socket.on('voiceMessage', function (data) {

View File

@@ -208,7 +208,7 @@
console.error('Error fetching session:', error);
});
let lastiframe = null;
function OpenIframe(){
function OpenIframe(data){
// 等待1s再加载
setTimeout(() => {
// 在成功获取 session 后创建并插入 iframe

View File

@@ -187,7 +187,7 @@
let lastIframe = null;
function OpenIframe(){
function OpenIframe(data){
// 在成功获取 session 后创建并插入 iframe
const iframe = document.createElement('iframe');
const div=document.getElementById('vscodeWeb')