init
This commit is contained in:
27
public/web/static/js/global.js
Normal file
27
public/web/static/js/global.js
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
const config = {
|
||||
|
||||
userName:'',
|
||||
userPhone:'',
|
||||
usercompany:'',
|
||||
EMPUID:''
|
||||
}
|
||||
|
||||
let bindToGlobal=function(obj, key){
|
||||
if (typeof window[key] === 'undefined') {
|
||||
window[key] = {};
|
||||
}
|
||||
|
||||
for (let i in obj) {
|
||||
window[key][i] = obj[i]
|
||||
}
|
||||
|
||||
}
|
||||
bindToGlobal(config,'_const')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user