时间:2019-05-07 来源:小程序工厂
你贴出来的 base64 格式不太对,可以用在线的工具解码试试,可能要你们后台自查一下啦
没错,只是没有加 data:image/png;base64, 开头,在微信小程序还是显示不出来
不是开头的问题,你贴出来的 base64 确实有问题,没法解出图片。你可以用各种在线工具试一下
/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAUADwDASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx
BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK
U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3
uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvZrq3
trdpJokDxsXYg5dfmfOT1PAAz2zn0qgNY1S3jj1Jo4ksJQpMbys7RLlRubjkfMDgc8irF5b3b2V9
EfJX7UWXcxwCwJ6Htz6/hWE001xpqaQqyxXBSOOWORGAQbgdzZ6Dkc+/ua3sZSbR097NrAHl6YbY
XYfc0d0xKMuDnhSSpztxk4rPsNZ146zdW16dNljt7USP9k3HY5Pyhgx3A4BJGOOM4zmp9Q1ZNGsb
mW7RJYYlDxo/O8nPRsHqT9736DnFbTLF9LsbaaQmO5nXzpmGzLSN8zkYAHBwMdxwDisnG9RanSpW
pvQq6n4t1az1iyg/s63XTri5igmnkl8zfvxnagIK4G7rkcDp3vaz4kbRNMuNS2mVIQVjUk4kBYAA
88EZHJ5wfpnlfGGq2FrqOn232nFza3sM84VThBydwIGMYKnA9a6ForLW/D011Bbm/sJFctGiEu4G
eFU4O4EcDOcgH0NbWRk+ayKdr4q1q1u7Ua7b2dvHeuIlmsmbMUhUkK6NuDEkAZBGMcnFdPbXkqRe
XCJJUQ7Q6wlgf1GPp/TFeX2Fjp2s6vpUGl6hf3kdnIskk93KWS2jQZEahgoG8jA542jsDXosFqJo
hvSQlRgFd/Q8/wBw+v8AnqVZEpslvGb+0riLcdpRic4P8AOPT+Ee/vVL7XJheF3K24NjkHjGOw6Y
x0/IUUVS2QPdl3U7aKNJJEQKVm2ADpgqG/nn/OKbqU7ERAAASxK7AdiTk4+pA/L3OSikug31GTOL
OSF4442MkSyMGXjJBBH0OelPSdo9VijABWKUxoT1Ck4xn27UUUCINQnaS/lJVAVJTheoGRk+9JJJ
GscB+zREtHkk7h0JHY+1FFHRB1Z//9k=
用这个,这个是接口输出的数据,经过
wx.base64ToArrayBuffer(data) 就报错了
测试没有复现错误噢,测试用例:wechatide://minicode/I07iX2mU7m39