华为荣耀9i使用文件管理器writeFile返回成功但实际没有覆盖还是老数据

发布于 8 年前作者 yshen8439 次浏览最后编辑 8 年前来自 ask

var savePath = `${wx.env.USER_DATA_PATH}/sharempc.jpeg`;

       wx.getFileSystemManager().writeFile({

         filePath: savePath,

         data: array,

         encoding: ‘binary’,

         success: resW => {

           this.setData({

             qrcodeBase64: base64,

             qrcodeUrl: savePath

           });

         },

         fail: resF => {

           console.log(resF);

         }

       });

1 回复
xiuyingchang
xiuyingchang1 楼6 年前

我也碰到这个问题,请问现在解决了嘛