修改favicon

上级 a951486d
public/favicon.ico

1.1 KB | W: | H:

public/favicon.ico

1.1 KB | W: | H:

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
<title><%= webpackConfig.name %></title>
<style>
html,
......@@ -204,4 +204,32 @@
</div>
</div>
</body>
<script>
window.onload = function() {
var op = 'open'
var ssa = window.location.host
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
var channel_id = JSON.parse(xhttp.response).data.channel_id
if (channel_id == 0) {
var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-inon';
link.rel = 'icon';
link.href = '<%= BASE_URL %>icon.ico'
document.getElementsByTagName('head')[0].appendChild(link);
} else {
var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-inon';
link.rel = 'icon';
link.href = '<%= BASE_URL %>favicon.ico'
document.getElementsByTagName('head')[0].appendChild(link);
}
}
};
xhttp.open("GET", 'http://192.168.26.179:6601/api/v1/oem/webSite/domainChannel?domain='+ssa+'&field='+op, true);
xhttp.send();
}
</script>
</html>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论