当前位置:网站首页>小程序image 无法显示base64 图片 解决办法 有效
小程序image 无法显示base64 图片 解决办法 有效
2022-07-25 11:02:00 【hexiaoniao】
网上找的办法。没有效果!!!!坑死了!!!!
var data = res.data
var array = wx.base64ToArrayBuffer(res.data)
var base64 = wx.arrayBufferToBase64(array)
if (res.statusCode == 200) {
that.setData({
imageData: 'data:image/jpeg;base64,' + base64, // data 为接口返回的base64字符串
})
}
正确的办法是
image1path = image1path.replace(/[\r\n]/g,"");
无效你来打我!!!
边栏推荐
猜你喜欢

Brpc source code analysis (VI) -- detailed explanation of basic socket
![[leetcode brush questions]](/img/86/5f33a48f2164452bc1e14581b92d69.png)
[leetcode brush questions]

WIZnet嵌入式以太网技术培训公开课(免费!!!)

SQL injection less17 (error injection + subquery)

Information management system for typical works of urban sculpture (picture sharing system SSM)

JDBC summary

教你如何通过MCU将S2E配置为UDP的工作模式

Risks in software testing phase

Talking about Devops monitoring, how does the team choose monitoring tools?

LeetCode 50. Pow(x,n)
随机推荐
Various controls ==pyqt5
JS常用内置对象 数据类型的分类 传参 堆栈
[leetcode brush questions]
第4章线性方程组
Oracle parsing XML with the same name
SQL language (4)
绘图==PYQT5
JS作用域以及预解析
Plot ==pyqt5
How does the whole network display IP ownership?
Javescript loop
MySQL historical data supplement new data
【leetcode刷题】
Convert string to number
谣言检测文献阅读十一—Preventing rumor spread with deep learning
W5500多节点连接
Small program of vegetable distribution in community
论文解读(MaskGAE)《MaskGAE: Masked Graph Modeling Meets Graph Autoencoders》
brpc源码解析(五)—— 基础类resource pool详解
11. Reading rumors spread with deep learning