errMsg: "getImageInfo:fail 文件格式不正确"?

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

wx.getImageInfo({

                    src: view.url,

                    success: (res) => {

                      view.sWidth = res.width;

                      view.sHeight = res.height;

                    },

                    fail: (error) => {

                      view.url = “”;

                      console.error(`getImageInfo ${view.url} failed, ${JSON.stringify(error)}`);

                    },

                    complete: () => {

                      completeCount++;

                      if (preCount === completeCount) {

                        resolve(paletteCopy);

                      }

                    },

                  });

1 回复
xiuying57
xiuying571 楼4 年前

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html