debug
This commit is contained in:
52
code/public/template/shikong/huiyuan/js/public/common.js
Normal file
52
code/public/template/shikong/huiyuan/js/public/common.js
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
import {
|
||||
checkIsLoginFn,
|
||||
hideCctvDomByEquipmentClass,
|
||||
intiHistoryHref,
|
||||
init,
|
||||
isSearchValid,
|
||||
pageJumpFn
|
||||
} from './commonFun.js';
|
||||
import CommonCctv from '../cctv/common.js';
|
||||
|
||||
/**
|
||||
* 所有页面调用的js
|
||||
*/
|
||||
const commonJs = function(){
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
hideCctvDomByEquipmentClass()
|
||||
intiHistoryHref()
|
||||
init()
|
||||
CommonCctv.init()
|
||||
|
||||
// 格式化轮播广告和 顶部导航的间隙
|
||||
function getHeaderHeight() {
|
||||
if(document.getElementById('header') && document.querySelector('.j-booth-elements-header')){
|
||||
var intHeaderHeight = document.getElementById('header').offsetHeight;
|
||||
document.querySelector('.j-booth-elements-header').style.height = intHeaderHeight + 'px';
|
||||
}
|
||||
}
|
||||
// 当窗口大小改变时调整高度
|
||||
window.onresize = getHeaderHeight();
|
||||
// 页面加载时调整高度
|
||||
window.onload = getHeaderHeight();
|
||||
})
|
||||
}()
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 会员 板块初始化
|
||||
*/
|
||||
const MenBerPublicJs = function () {
|
||||
const selectors = [
|
||||
".bill-web",".bind-web", ".buy-web", ".capital-flow-web", ".charge-web",".member-info-web",
|
||||
".recfeedback-web", ".setting-web",
|
||||
".withdrawal-funds-web", ".my-promotion-web",
|
||||
".withdrawal-records-web"
|
||||
];
|
||||
|
||||
if (selectors.some(selector => document.querySelector(selector))) {
|
||||
window.addEventListener('load', checkIsLoginFn);
|
||||
}
|
||||
}()
|
||||
Reference in New Issue
Block a user