scanForPlugins^8.2
插件页面的扫一扫
#请求参数
| Prop | Type | Required | Default | Comment | 
| types | Array | Y | [] | 定制扫一扫类型 1 扫条码 2 拍食材 3 扫食谱 | 
| defaultType | Number | N | '2' | 扫一扫类型默认选择拍食材 | 
#接口调用示例
const params = {
  types: ["1", "2", "3"],
  defaultType: "1",
};
this.$bridge
  .scanForPlugins(params)
  .then((res) => {
    alert(res);
  })
  .catch((err) => {
    alert(err);
  });
#返回参数
| prop | Type | value | comment | 
| code | Number | 0 | 成功码 | 
| msg | String | 'xxxx' | msg | 
| type | Number | 1 | 1 扫条码;2 拍食材;3 扫食谱; | 
| data | String | 'xxx' | 条码值;食材图片 base64;食谱二维码 | 
失败时(level 或者 message 为空或者没有)返回
| Prop | Type | Value | 
| code | Number | -1摄像头没有权限 | 
| msg | String | 错误信息 |