扫码JSSDK载入

This commit is contained in:
iqudoo
2026-04-30 15:16:11 +08:00
parent 4a27189ad4
commit 6b27975a45
6 changed files with 28 additions and 18 deletions

View File

@@ -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;