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

27 lines
800 B
JavaScript

import home from './js/index.js'
import headNavEnd from "./js/headNavEnd.js";
import bindEvent from "./js/event/bindEvent.js";
import product from "./js/product.js";
import productInfo from './js/productInfo.js'
import template from "./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
}