作者解决了吗?我也遇到解析就中文乱码问题
wx.request流式字符乱码问题这里怎么转字符都会乱码 但是用postman请求就没一点儿问题 const requestTask = wx.request({ url: 'https://ark.cn-beijing.volces.com/api/v3/bots/chat/completions', method: 'POST', enableChunked: true, responseType: "arraybuffer", // 以 ArrayBuffer 格式接收数据 data: { "model": '', "messages": [{ "role": "user", "content": "写一个文章" }], "stream": true, }, header: { 'content-type': 'application/json', 'Authorization': 'Bearer xxx' }, success: response => {}, fail: error => {} }); requestTask.onChunkReceived((response) => { const arrayBuffer = response.data; const uint8Array = new Uint8Array(arrayBuffer); const str = new TextDecoder('utf-8').decode(uint8Array); console.log('str:',str) }); [图片]
06-042024年10月10日了,我也遇到了,还没有解决
wx.uploadFile报413是什么原因?wx.uploadFile({ url: app.API.newImageUpload, filePath: item.path, name: 'file', header: { "content-type": "application/json" }, }) 只要上传原图就会报错,和图片大小没关系,原图也不到1M,在开发版中不会出现,只会在正式版里出现,报错内容如下 {"data": "<html> \n<head><title>413 Request Entity Too Large</title></head> \n<body> \n<center><h1>413 Request Entity Too Large</h1></center> \n<hr><center>openresty/1.19.9.1</center> \n</body> \n</html> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n<!-- a padding to disable MSIE and Chrome friendly error page --> \n", "header": {"Access-Control-Allow-Origin": "*", "Connection": "keep-alive", "Set-Cookie": "acw_tc=0b3c7da216844122592593626efa565e39c19dcf2ab1b56f8b6f68610c6396;path=/;HttpOnly;Max-Age=1800", "Content-Length": "591", "Date": "Thu, 18 May 2023 12:17:39 GMT", "Content-Type": "text/html; charset=utf-8", "protocol": "http/1.1"}, "statusCode": 413, "cookies": ["acw_tc=0b3c7da216844122592593626efa565e39c19dcf2ab1b56f8b6f68610c6396;path=/;HttpOnly;Max-Age=1800"], "errMsg": "uploadFile:ok"}
2024-10-10都2023年了,还没加噢
小程序的tabBar的icon大小能自定义吗文档里面推荐的是81px*81px,但是实际效果图片偏大,而配置项里面也没有icon可调节的参数。现在是还没有支持吗?有没有好的解决方案?
2023-03-16