zrg
37 分钟以前 196e1b3cf2017cfa25038f9c8ef5071e046f0abf
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())