1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| import { CommonUtils } from "./common"
| class mpaasScan {
| mpaasScanModule
| constructor() {
| this.mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
| }
|
| scanCode(callback) {
| this.mpaasScanModule.mpaasScan({
| 'hideAlbum': true,
| 'timeoutInterval':'10', //超时时间
| 'timeoutText':'未识别到二维码' //超时提醒
| },(ret) => {
| console.log("识别的内容: ", ret.resp_result)
| callback.call(null ,ret.resp_result)
| })
| }
| }
|
| export let MpaasScan = Object.freeze(new mpaasScan())
|
|