小程序码在开发工具正常显示,在真机或预览下无法显示?

小程序 文章 2021-01-31 16:21 448 0 全屏看文

AI助手支持GPT4.0

小程序码在开发工具正常显示,在真机或预览下无法显示?The applet code is displayed normally in the development tool, but cannot be displayed on the real device or in the preview?

小程序码在开发工具正常显示,在真机或预览下无法显示?

wx.request({

      url:url,

      responseType: 'arraybuffer',

      success:res=>{

            let base64 = wx.arrayBufferToBase64(res.data); 

            base64 = 'data:image/jpeg;base64,' + base64 

            console.log(base64) 

          }

    })

通过这种方式调用后端返回的小程序码接口后,在使用paint组件绘制海报,小程序码可以在开发者工具中显示,但是在真机或者预览状态下不显示?

wx.request ({ url:url , responseType: 'arraybuffer', success:res= >{ let base64 = wx.arrayBufferToBase64 ( res.data ); base64 = ' data:image/jpeg;base64 , ' + base64 console.log (Base64)}}) after calling the small code interface returned by the back end in this way, when using the paint component to draw posters, the small code can be displayed in the developer tool, but not in the real machine or preview state?

回答:

PD.新城คิดถึง:早点睡吧
陈宇明:

检查下域名配置

dd:早点休息吧

-EOF-

AI助手支持GPT4.0