Creator1.9.3 微信保存文件到本地在开发者工具上可以用到手机上路径找不到 有没有大佬可以帮我解决一下

onLoad: function () {
this.label.string = this.text;

    this.scheduleOnce(() => {
        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
            var canvas = cc.game.canvas;
            var width = cc.winSize.width;
            var height = cc.winSize.height;
            canvas.toTempFilePath({
                x: 0,
                y: 0,
                width: width,
                height: height,
                destWidth: width / 2,
                destHeight: height / 2,
                success: (res) => {
                    //.可以保存该截屏图片
                    console.log(res)
                    // wx.shareAppMessage({
                    //     imageUrl: res.tempFilePath
                    // })
                    let tf = res.tempFilePath;
                    console.log(tf);
                    wx.getFileSystemManager().saveFile({
                        tempFilePath: tf,
                        success: (res) => {
                            console.log(res.savedFilePath) // res.savedFilePath 为一个本地缓存文件路径

                            let node = new cc.Node();
                            let sprite = node.addComponent(cc.Sprite);
                            cc.find('Canvas').addChild(node, 100);
                            cc.loader.load(res.savedFilePath, (err, res) => {
                                if (err) return console.error(err);
                                console.log(res);
                                sprite.spriteFrame = new cc.SpriteFrame(res);
                            });
                        },
                        fail: res => {
                            console.log('err:', res);
                        }
                    })
                }
            })
        }
    }, 3);
},

之前测试过在某些手机上截图文件无法保存。
建议你在微信开发者社区查一下。

在社区里也没找到解决方案啊2.0以下版本到手机上都会出现这问题,我用2.0.9测的又没问题,但我项目升级又很麻烦,求助:grin: