我在这个假期工作,发现我的代码无法在 HTTPS 上运行。我的 LOCALDEV 是 HTTP,我们的生产服务器是 HTTPS。
出于某种原因,当我在本地拥有 JS 时,YUI 会出去获取 JS。
我在服务器上…………
最后是我的代码:
YUI().use('autocomplete', 'autocomplete-filters', 'autocomplete-highlighters', function (Y) {
var notes = [
"Dr Follow Up Complete Notes",
"Fax Document Notes",
"Event Notes",
"Email Information Notes",
"Corresponding Document Notes",
"Return Call Notes",
"Admit Notes",
"Discharge Notes",
"Other Notes",
"Excellent Resource Notes",
"Good Resource Notes",
"Neutral Resource Notes",
"Poor Resource Notes",
"Unacceptable Resource Notes",
];
var inputNode = Y.one('#name');
inputNode.plug(Y.Plugin.AutoComplete, {
resultFilters : 'phraseMatch',
resultHighlighter: 'phraseMatch',
source : notes,
minQueryLength : 0
});
inputNode.ac.get('boundingBox').setStyle('zIndex', 50);
inputNode.on('focus', function () {
inputNode.ac.sendRequest('');
})
==================================================== =================================
这是在我添加之后:base: 'include/javascript/yui3/build'
我的构建中没有那个目录。