wx.getImageInfo 本地图可以 网络图片报错为什么?

小程序 文章 2022-03-09 18:40 756 0 全屏看文

AI助手支持GPT4.0

wx.getImageInfo 本地图可以 网络图片报错为什么?wx.getImageInfo This map can be used for network images Why is the error reported?

wx.getImageInfo 本地图可以 网络图片报错为什么?

网络图片报错信息 "getImageInfo:fail download image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open ....

网络域名url添加到了downloadFile里了,况且我也没有勾选校验域名,图片网址可以访问到

wx.getImageInfo({

        src:"https://****/images/img1.jpg",

        success (res) {

          console.log(res);

          self.setData({

            width:res.width,

            ytheightimg:res.height,


          })

        },

        fail(err) {

          console.log(err)

        },

d image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open 'C:UsersAdministratorAppDataLocal微信开发者工具User Data4ec2a556ea7781d86bd6e9eee09f452fWeappSimulatorWeappFileSystemo6zAJs6VEXTWuNuy771wJxIT98YMwx53ba2293ba2e9c1ftmpqXSespeVJ16x6fec88412eedd2023dd9218c1fde9440.jpg'" "getImageInfo:fail download image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open 'C:UsersAdministratorAppDataLocal微信开发者工具User Data4ec2a556ea7781d86bd6e9eee09f452fWeappSimulatorWeappFileSystemo6zAJs6VEXTWuNuy771wJxIT98YMwx53ba2293ba2e9c1ftmpqXSespeVJ16x6fec88412eedd2023dd9218c1fde9440.jpg'"

网络图片报错信息 "getImageInfo:fail download image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open .... 网络域名url添加到了downloadFile里了,况且我也没有勾选校验域名,图片网址可以访问到 wx.getImageInfo({ src:"https://****/images/img1.jpg", success (res) { console.log(res); self.setData({ width:res.width, ytheightimg:res.height, }) }, fail(err) { console.log(err) }, d image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open 'C:UsersAdministratorAppDataLocal微信开发者工具User Data4ec2a556ea7781d86bd6e9eee09f452fWeappSimulatorWeappFileSystemo6zAJs6VEXTWuNuy771wJxIT98YMwx53ba2293ba2e9c1ftmpqXSespeVJ16x6fec88412eedd2023dd9218c1fde9440.jpg'" "getImageInfo:fail download image fail. reason: downloadFile:fail Error: ENOENT: no such file or directory, open 'C:UsersAdministratorAppDataLocal微信开发者工具User Data4ec2a556ea7781d86bd6e9eee09f452fWeappSimulatorWeappFileSystemo6zAJs6VEXTWuNuy771wJxIT98YMwx53ba2293ba2e9c1ftmpqXSespeVJ16x6fec88412eedd2023dd9218c1fde9440.jpg'"

回答:

八九:

刚加嘛。开发工具>项目配置>刷新下域名信息.再试

紫筱姣姣:域名配置一直都有,wx.getImageInfo是域名配置后才用用到的
王一鸣:

你猜

微喵网络:

图片网址发出来看看

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
小程序里用web-view跳转的微擎页面无法实现微信支付?
服务商账号?
微信小商城好用吗?
微信小程序海外版可以支持第三方支付吗?
实现小程序内部接收服务端消息的需求,需求解决方案?
随便看看
微信开放平台跟公众平台有什么区别? 3608
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4799
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472