控制台打印当前支持的平台
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
import './polyfill';
|
||||
import {
|
||||
supportList,
|
||||
onScanListener, offScanListener, setStatusListener, getStatus,
|
||||
startScan, stopScan, scanVideo, scanImage, clear
|
||||
} from './services/provider/scan';
|
||||
@@ -24,6 +25,7 @@ function config(config) {
|
||||
_readyPromise = Promise.resolve().then(() => {
|
||||
printDebug('-------------------------------------');
|
||||
printDebug('sdk_version:', getVersion());
|
||||
printDebug('support_list:', supportList.map(item => item.name + ':' + item.support).join(', '));
|
||||
printDebug('-------------------------------------');
|
||||
initWxJssdk();
|
||||
return Promise.resolve().then(() => {
|
||||
|
||||
@@ -435,4 +435,27 @@ export function scanImage() {
|
||||
}).finally(() => {
|
||||
__closed();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const supportList = [
|
||||
{
|
||||
name: "bridge",
|
||||
support: inRuntime()
|
||||
},
|
||||
{
|
||||
name: "wx",
|
||||
support: isSupportWxScan()
|
||||
},
|
||||
{
|
||||
name: "web",
|
||||
support: isSupportWebScan()
|
||||
},
|
||||
{
|
||||
name: "image",
|
||||
support: isSupportImageScan()
|
||||
},
|
||||
{
|
||||
name: "scanner",
|
||||
support: true
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user