138.API(拓展接口--打开小程序)

wx.arrayBufferToBase64(arrayBuffer):

将 ArrayBuffer 数据转成 Base64 字符串

示例代码

constarrayBuffer =newUint8Array([11,22,33])

constbase64 = wx.arrayBufferToBase64(arrayBuffer)


wx.base64ToArrayBuffer(base64):

将 Base64 字符串转成 ArrayBuffer 数据

示例代码

constbase64 ='CxYh'

constarrayBuffer = wx.base64ToArrayBuffer(base64)

你可能感兴趣的:(138.API(拓展接口--打开小程序))