微信开发中遇到的问题,关于cdnmidimgurl 图片获取

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了微信开发中遇到的问题,关于cdnmidimgurl 图片获取相关的知识,希望对你有一定的参考价值。

访问了微信服务器 返回的数据:


[{MsgId=3349810483943419227, [email protected]@855c3ada0e9c387cfbcff93e9a1a639f024bcfd136f6273bcc575101df019960,
[email protected]bc282eaece20, MsgType=3, [email protected]ca5139eb3:<br/>&lt;?xml version="1.0"?&gt;<br/>&lt;msg&gt;<br/>
    &lt;img aeskey="9041f5e2bd24448cb491b170d11359a1" encryver="1" cdnthumbaeskey="9041f5e2bd24448cb491b170d11359a1"
    cdnthumburl="304b0201000444304202010002044e42ea3002033d0af602041784277d020459881ebf042033636365313266326333623137646335386264386432666132363462396532300201000201000400"
    cdnthumblength="7414" cdnthumbheight="150" cdnthumbwidth="150" cdnmidheight="0" cdnmidwidth="0" cdnhdheight="0" cdnhdwidth="0"
    cdnmidimgurl="304b0201000444304202010002044e42ea3002033d0af602041784277d020459881ebf042033636365313266326333623137646335386264386432666132363462396532300201000201000400"
    length="114545" cdnbigimgurl="304b0201000444304202010002044e42ea3002033d0af602041784277d020459881ebf042033636365313266326333623137646335386264386432666132363462396532300201000201000400"
    hdlength="1075893" md5="468cbe6b3ace5631e328742617f75be8" /&gt;<br/>&lt;/msg&gt;<br/>, Status=3, ImgStatus=2, CreateTime=1502101328, VoiceLength=0, PlayLength=0, FileName=, FileSize=,
    MediaId=, Url=, AppMsgType=0, StatusNotifyCode=0, StatusNotifyUserName=, RecommendInfo={UserName=, NickName=, QQNum=0, Province=, City=, Content=, Signature=, Alias=, Scene=0, VerifyFlag=0,
    AttrStatus=0, Sex=0, Ticket=, OpCode=0}, ForwardFlag=0, AppInfo={AppID=, Type=0}, HasProductId=0, Ticket=, ImgHeight=150, ImgWidth=150, SubMsgType=0, NewMsgId=3349810483943419227, OriContent=},
    
    
    
    
    {MsgId=2158808381938188662, [email protected]4bbc282eaece20, [email protected]@ec95a738b5eb7aa986bd7faf657109d2f8ae3ade07d9761578ddcc821ead09a1, MsgType=47,
    Content=, Status=3, ImgStatus=2, CreateTime=1502101333, VoiceLength=0, PlayLength=0, FileName=, FileSize=, MediaId=, Url=, AppMsgType=0, StatusNotifyCode=0, StatusNotifyUserName=,
    RecommendInfo={UserName=, NickName=, QQNum=0, Province=, City=, Content=, Signature=, Alias=, Scene=0, VerifyFlag=0, AttrStatus=0, Sex=0, Ticket=, OpCode=0}, ForwardFlag=0, AppInfo={AppID=, Type=0}, HasProductId=1,
    Ticket=, ImgHeight=240, ImgWidth=240, SubMsgType=0, NewMsgId=2158808381938188662, OriContent=}, {MsgId=3605932036682179079, [email protected]@855c3ada0e9c387cfbcff93e9a1a639f024bcfd136f6273bcc575101df019960,
    [email protected]bc282eaece20, MsgType=1, [email protected]ca5139eb3:<br/>【京东】欧洲原装进口 膜太 油烟机清洁去污剂 油污净
    <br/>--------------------<br/>京东价:49元<br/>券后价:29元<br/>领券下单:https://union-click.jd.com/jdc?d=p9G9IX<br/>--------------------<br/>【推荐理由】清除厨房重油污地面玻璃污渍一喷到位!葡萄牙原装进口清洁剂油污净!
    , Status=3, ImgStatus=1, CreateTime=1502101335, VoiceLength=0, PlayLength=0, FileName=, FileSize=, MediaId=, Url=, AppMsgType=0, StatusNotifyCode=0, StatusNotifyUserName=, RecommendInfo={UserName=, NickName=, QQNum=0,
    Province=, City=, Content=, Signature=, Alias=, Scene=0, VerifyFlag=0, AttrStatus=0, Sex=0, Ticket=, OpCode=0}, ForwardFlag=0, AppInfo={AppID=, Type=0},
 HasProductId=0, Ticket=, ImgHeight=0, ImgWidth=0, SubMsgType=0, NewMsgId=3605932036682179079, OriContent=}]

 

已经从这里拿到了文字信息 是content,不过 图片呢 很纠结 给了个这个cdnbigimgurl  还有  key  一开始我就被误导了 ,各种解码 url 不过都不对 ,最后和同事讨论时发现只需要msgid就好了,访问这个地址 https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg?&MsgID=2050693735910020868   把msgid 赋值粘贴上去就好了,就可以拿到图片 很波折 网上几乎没有资料。对您有帮助请点赞谢谢
























以上是关于微信开发中遇到的问题,关于cdnmidimgurl 图片获取的主要内容,如果未能解决你的问题,请参考以下文章

浅谈关于微信公众号开发的分享

关于微信网页/H5游戏开发中二维码无法识别的解决方法

关于cocos creator 使用socket-io在生成微信小游戏遇到的各种问题

关于微信小程序开发中如何动态的往数组中添加对象,并进行更改

关于微信支付预下单统一下单“操作超时”问题

关于二维码扫描的开发,遇到的问题,以及最终结果