NProgress.start() var isDomain = document.domain; if (isDomain.indexOf('onloon.cc') > -1) { document.domain = 'onloon.cc'; console.log('domain -- onloon.cc') } else if (isDomain.indexOf('onloon.net') > -1) { document.domain = 'onloon.net'; console.log('preDomain -- onloon.net') } window.apiHost = 'https://server.onloon.cc'; var shopId = '227822152693380191'; var them = '12'; var styles = ''; var version = '1.0.0'; // ie特殊处理 :them 13 19 var isIEOrEdge = navigator.appName === 'Microsoft Internet Explorer' || (navigator.appName === 'Netscape' && navigator.appVersion.indexOf('Edge') > -1) console.log('isIEOrEdge:' + isIEOrEdge) if (isIEOrEdge) { document.body.setAttribute('class', 'ms-browser') } // 获取来源 var plat = 0; if (self.name.indexOf('app_runner_fb') > -1 ) { // facebook plat = 1; } if (self.name.indexOf('buyer-editor') > -1 ) { plat = 2; } if (self.name.indexOf('buyer-preview') > -1) { plat = 3; } if (self.name.indexOf('seller-preview') > -1) { plat = 4; } if (plat == 2 || plat == 3 || plat == 4) { var layerdiv = document.createElement('div') document.body.appendChild(layerdiv) layerdiv.className = 'iframe-layer' }