errMsg: "getImageInfo:fail 文件格式不正确"?
发布于 4 年前 作者 zhangxiuying 3631 次浏览 来自 问答

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 回复

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

回到顶部