扫码JSSDK载入
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import './polyfill';
|
||||
import _global from './polyfill/_global';
|
||||
import { setConfig, getVersion } from './services/config';
|
||||
import { onScanListener, offScanListener, setStatusListener, getStatus, startScan, stopScan, clear } from './services/provider/scan';
|
||||
import { initWxJssdk } from './services/wx';
|
||||
@@ -8,10 +7,6 @@ import { printDebug } from './utils/logger';
|
||||
let _readyPromise = null;
|
||||
let _calledReady = false;
|
||||
|
||||
(function () {
|
||||
_global.__IScanReady__ && _global.__IScanReady__();
|
||||
})();
|
||||
|
||||
export function isReadyCalled() {
|
||||
return _calledReady;
|
||||
}
|
||||
@@ -24,9 +19,9 @@ function config(config) {
|
||||
return _readyPromise;
|
||||
}
|
||||
_readyPromise = Promise.resolve().then(() => {
|
||||
printDebug('-------------------------------');
|
||||
printDebug('-------------------------------------');
|
||||
printDebug('sdk_version:', getVersion());
|
||||
printDebug('-------------------------------');
|
||||
printDebug('-------------------------------------');
|
||||
initWxJssdk();
|
||||
return Promise.resolve().then(() => {
|
||||
_calledReady = true;
|
||||
|
||||
Reference in New Issue
Block a user