houde_web_api/public/static/js/news.js
2023-04-16 23:05:17 +08:00

27 lines
788 B
JavaScript

import headNavEnd from "./hyw/js/headNavEnd.js";
import bindEvent from "./hyw/js/event/bindEvent.js";
import product from "./hyw/js/product.js";
import productInfo from './hyw/js/productInfo.js'
import template from "./hyw/js/template.js";
//入口文件
const fn = document.getElementsByTagName('body')[0].className,
init = () => {
String.prototype?.replaceAll === undefined && (()=>{
String.prototype.replaceAll = function (s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2)
}
})()
template()
eval(`
if(typeof ${fn} === 'function'){
${fn}()
}`)
headNavEnd()
bindEvent()
return true
}
window.onload=function (){
init() && delete window.option
}