27 lines
788 B
JavaScript
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
|
|
} |