检索到应用程序菜单 html 后,它显示为文本而不是 html。铬抱怨Resource interpreted as Script but transferred with MIME type text/plain
。我在 Force.com 平台上使用 MVC。我尝试将响应的内容类型指定为“text/html”和“application/javascript”,但都没有成功。
[编辑 1]
代码
<script>
intuit.ipp.anywhere.setup({
menuProxy: "https://c.na55.visual.force.com/"
+ "apex/bluedot",
grantUrl: "https://c.na55.visual.force.com/"
+ "apex/authpage"
});
</script>
<ipp:bluedot>
<div id="intuitPlatformAppMenu">
<a id="intuitPlatformAppMenuLogo" href="javascript:void(0);" title="Intuit App Center">
<span id="intuitPlatformAppMenuDot"> </span>
</a>
<div id="intuitPlatformAppMenuDropdown" style="display: none;">
<div id="intuitPlatformAppMenuDropdownTop"></div>
<div id="intuitPlatformAppMenuDropdownInner">
<<=======
</div>
</div>
</div>
</ipp:bluedot>
当下拉菜单打开时,代码将作为字符串添加到箭头位置,并将类“open”添加到#intuitPlatformAppMenuLogo。
图片
[编辑 2]
服务器端顶点代码
public with sharing class GetBlueDotMenu {
public String response {get; set;}
public GetBlueDotMenu() {
QbApiController api = new QbApiController ('GET', 'QB API' , null, null, 'https://appcenter.intuit.com/api/v1/Account/AppMenu');
response = api.execute();
}
}
api.execute() 返回响应正文并将其保存到response
然后在页面上呈现。