main
kgdxpr 7 months ago
parent 48d4215600
commit 05d04ef32c

@ -34,9 +34,8 @@
console.log(res);
if (res.success) {
var appId = res.data;
var iframe = '<iframe src="http://10.10.14.206:8080/ui/chat/' + appId + '" style="width: 100%; height: 100%;" frameborder="0" allow="microphone"></iframe>';
var iframe = '<iframe src="http://10.10.14.206:8080/ui/chat/' + appId + '" style="width: 100%; height: 99.5%;" frameborder="0" allow="microphone"></iframe>';
$('body').append(iframe);
} else {
var loadIndex = layer.msg('AI助手初始化中...', {
icon: 16,
@ -47,22 +46,35 @@
url: '/QingLong/maxkb/createApplication',
type: 'post',
async: false,
success: function (result) {
if (result.success) {
layer.close(loadIndex);
success: function (res) {
console.log(res);
if (res.success) {
var appId = res.data;
var iframe = '<iframe src="http://10.10.14.206:8080/ui/chat/' + appId + '" style="width: 100%; height: 100%;" frameborder="0" allow="microphone"></iframe>';
var iframe = '<iframe src="http://10.10.14.206:8080/ui/chat/' + appId + '" style="width: 100%; height: 99.5%;" frameborder="0" allow="microphone"></iframe>';
$('body').append(iframe);
} else {
layer.close(loadIndex);
layer.msg(result.message, {
layer.msg(res.message, {
icon: 2,
time: 2000
});
}
layer.close(loadIndex);
},
error: function (xhr, status, error) {
layer.close(loadIndex);
layer.msg("AI助手异常请稍后再试", {
icon: 2,
time: 2000
});
}
});
}
},
error: function (xhr, status, error) {
layer.msg("AI助手异常请稍后再试", {
icon: 2,
time: 2000
});
}
});
@ -71,14 +83,12 @@
// icon: 16,
// shade: 0.05
// });
// // 模拟关闭
// setTimeout(function () {
// layer.close(loadIndex);
// var appId = "5b45c7e216579a41";
// var iframe = '<iframe src="http://10.10.14.207:8080/ui/chat/' + appId + '" style="width: 100%; height: 99.5%;" frameborder="0" allow="microphone"></iframe>';
// $('body').append(iframe);
// $('body').append(format(iframeUrl, appId));
// }, 1000);

Loading…
Cancel
Save