[英]Fiori launchpad becomes unresponsive after chatbot plugin deployment
我们使用Recast.AI为我们的内部部署ERP开发了聊天机器人功能。
基本上,我们使用以下代码在On-Premise Fiori启动板上部署了一个插件; 然而,在聊天机器人启动后,Fiori启动板冻结,我们无法在Fiori Launchpad上执行任何操作。 SAP Note 2544600中的选项对我们没有帮助。 任何想法,可能是什么问题?
问候,
卡兰
sap.ui.define([
"sap/ui/core/UIComponent",
], function (UIComponent) {
"use strict";
return UIComponent.extend("com.abc.chatbot.Component", {
/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* @public
* @override
*/
init: function () {
// call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
var renderer = sap.ushell.Container.getRenderer("fiori2");
if (!document.getElementById("recast-webchat")) {
var s = document.createElement("script");
s.setAttribute("id", "recast-webchat");
s.setAttribute("src", "https://cdn.recast.ai/webchat/webchat.js");
//document.body.appendChild(s);
if (document.body != null) {
document.body.appendChild(s);
}
}
s.setAttribute("channelId", "abc");
s.setAttribute("token", "xyz");
}
});
});
问题在于appendChild; 这使得启动板没有响应。 不知道什么可以替代,因为我尝试了各种方法,如创建div,片段。
自从Fiori修复后,网络聊天已经更新。 它现在应该工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.