core
    正在准备搜索索引...

    接口 YmxDeviceScan

    扫码

    interface YmxDeviceScan {
        scanCode(data: ScanCodeData): Promise<ScanCodeResult>;
    }

    层级 (查看层级一览)

    索引

    方法

    方法

    • 调起客户端扫码界面进行扫码

      参数

      返回 Promise<ScanCodeResult>

      ymx.scanCode({
      scanType: ['barCode', 'qrCode']
      }).then(res => {
      alert(JSON.stringify(res));
      });
      ymx.scanCode({
      onlyFromCamera: true
      }).then(res => {
      alert(JSON.stringify(res));
      });