Skip to content
On this page

TrinaPlugin startScan

介绍

通过扫码获取相关信息;暂时支持:二维码、条形码

示例

js
window.cordova.exec(
  (data) => {
    console.log("成功", data);
  },
  (err) => {
    console.log("失败", err);
  },
  "TrinaPlugin",
  "startScan",
  [type]
);

API

入参

参数必传类型默认值说明
type是int0电站提示图片是否显示 0:显示 1:隐藏

出参

  • 成功返回 string扫码文本

  • 失败返回:string文本说明(扫码失败或异常日志)