miniProgram callWxMethod 失败?
发布于 4 年前 作者 xiuyingcui 1402 次浏览 来自 问答

具体如代码所示 :

const  automator = require('miniprogram-automator');
class TEEE {
    async start() {
        let miniProgram = await automator.launch({
            cliPath'D:/Program Files (x86)/Tencent/微信web开发者工具/cli.bat',
            projectPath'./dist/'
        });
        try {
            const fsm = await miniProgram.callWxMethod('getFileSystemManager', {});
            console.log(fsm);
        } catch (e) {
            console.log(e);
        }
    }
}

const a = new TEEE();

a.start();

这个调用, fsm  一直不会返回东西也没有响应。
1 回复

callWxMethod 无法调用这种返回值不是数据的接口,改成用 evaluate 接口执行代码?

回到顶部