chenhaozhe
2025-09-12 fb2f2b71c1908cd1630418779a7613cd7970cb96
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class mpaasScan {
    mpaasScanModule
    constructor() {
        this.mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
    }
 
    scanCode(callback) {
        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())