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

时间:2017-08-07 19:30:18   收藏:0   阅读:2293

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


[{MsgId=3349810483943419227, FromUserName=@@855c3ada0e9c387cfbcff93e9a1a639f024bcfd136f6273bcc575101df019960,
ToUserName=@3596631068b3bed5c368dfd916f90d1e6d13450024b01657004bbc282eaece20, MsgType=3, Content=@67d753a2dc11ee84177839e48af13cb2aabc6a241d949d0f19df71eca5139eb3:<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, FromUserName=@3596631068b3bed5c368dfd916f90d1e6d13450024b01657004bbc282eaece20, ToUserName=@@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, FromUserName=@@855c3ada0e9c387cfbcff93e9a1a639f024bcfd136f6273bcc575101df019960,
    ToUserName=@3596631068b3bed5c368dfd916f90d1e6d13450024b01657004bbc282eaece20, MsgType=1, Content=@67d753a2dc11ee84177839e48af13cb2aabc6a241d949d0f19df71eca5139eb3:<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 赋值粘贴上去就好了,就可以拿到图片 很波折 网上几乎没有资料。对您有帮助请点赞谢谢

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!