Commit 10f756e4 by 赵增煜

替换logo

parent 7da29c91
......@@ -6,12 +6,7 @@ function replace_logo(){
console.log("Replace logo");
}
function replaceQrCode(){
var elements = document.querySelectorAll('.store-qrcode');
// 遍历这些元素
elements.forEach(function(element) {
// 将每个元素的 HTML 内容替换为空字符串
element.innerHTML = '';
});
var element = document.querySelector('.store-qrcode');if (element) {element.innerHTML = '';}
}
function replaceKeywords(keyword, replacement) {
// 获取整个文档的body元素
......@@ -39,8 +34,18 @@ function traverseNodes(node, keyword, replacement) {
}
}
}
function replace_logo(){
// 选择所有具有 'logo-icon' 类的元素
const logoIcons = document.querySelectorAll('.logo-icon');
// 遍历每个找到的元素,并更新其 background 样式
logoIcons.forEach(element => {
// 替换背景图片的 URL 和位置等信息
element.style.background = "url('http://cloud-rx-prod-1324994225.tongzhitang.cn/static/images/logo.png') no-repeat 0px 0px / 1000px 1200px";
});
}
window.onload = function() {
replaceQrCode();
//replaceQrCode();
replaceKeywords('新橙科技', '同知堂科技');
replaceKeywords('粤ICP备15024370号-7', '苏ICP备2023017636号-1');
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment