可以提供下具体case看看呢
微信小程序webview中使用wx.chooseImage上传图片,点击左上角分享给好友后异常在微信小程序webview中打开H5页面,H5页面中调用wx.chooseImage进行图片上传操作,一切正常。在H5页面场景下,点击左上角的分享——> 复制链接 发送给好友,通过聊天记录链接进入小程序H5页面,选择图片能力也正常。 但是点击左上角分享——> 分享给好友,此时通过聊天记录进入小程序H5页面,唤起相册后,点击选择照片,页面直接卡死,一直loading转圈
星期三 18:46微信服务器在五秒内收不到响应会断掉连接,并且重新发起请求,总共重试三次。 关于重试的消息排重,推荐使用FromUserName + CreateTime 排重。 假如服务器无法保证在五秒内处理并回复,可以直接回复空串,微信服务器不会对此作任何处理,并且不会发起重试。
微信小程序后台的消息推送,设置了推送的服务器,如果网络超时,或者报错会重试推送吗?[图片]
星期三 18:45可以先确认是具体哪个接口问题,报什么错
部分手机上传图片选择图片之后点击上传没上传成功?部分手机上传图片选择图片之后点击上传没上传成功 async upfile() { let that = this if (that.limit != null && !isNaN(that.limit)) { if (that.limit >= 1) { uni.showToast({ title: '已达到最大上传数量', icon: 'none' }); return; } } let temps = await that.getURLInfo(); let Crop = await that.getCropimage(temps); let imgInfo = await that.getImgInfo(Crop.tempFilePath); // 获取图片信息 // let ctxInfo = await that.contraction(imgInfo, 'myCanvas'); // 图片压缩 //上传 that.url = ctxInfo.tempFilePath that.urlShow = true //base64 pathToBase64(that.url) .then(base64 => { this.Qualificationcertificate.ryzp = base64.split(',')[1] }) .catch(error => { }) }, //调用摄像头和图库获取路径 async getURLInfo() { try { let image = await new Promise((resolve, reject) => { uni.chooseMedia({ count: 1, // 默认9 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 success: function(res) { // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 resolve(res) }, fail(err) { reject(err) } }) }) return image } catch (err) { console.log(err); } }, //裁剪图片 async getCropimage(res) { try { let image = await new Promise((resolve, reject) => { wx.cropImage({ src: res.tempFiles[0].tempFilePath, // 图片路径 cropScale: '3:4', // 裁剪比例 success: function(res) { // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 if (!/(\.jpg|\.png|\.jpeg)$/.test(res.tempFilePath .toLowerCase())) { uni.showToast({ title: '请上传jpg、png或jpeg格式的照片', icon: 'none', duration: 2000 }); return; } resolve(res) }, fail(err) { reject(err) } }) }) return image } catch (err) { console.log(err); } }, /** * 图片压缩 * @param {object} file 图片信息:width、height、type、path * @param {string} canvasId canvas的id名 * @param {object} config 限制最大宽高 * @returns 压缩完成后的图片path */ async contraction(file, canvasId, config = { maxWidth: 180, maxHeight: 240 }) { try { let ctxInfo = await new Promise((resolve, reject) => { // 获取图片原始宽高 let width = file.width let height = file.height // 计算图片当前大小和目标大小的比例:目标大小 / 图片当前大小 // 根据比例调整图片的尺寸: // 新宽度 = 原始宽度 * √(目标大小 / 图片当前大小) // 新高度 = 原始高度 * √(目标大小 / 图片当前大小) // 宽高同比例调整 // 宽度 > 最大限宽 -> 重置尺寸 if (width > config.maxWidth) { const ratio = config.maxWidth / width width = config.maxWidth height = height * ratio } // 高度 > 最大限高度 -> 重置尺寸 if (height > config.maxHeight) { const ratio = config.maxHeight / height width = width * ratio height = config.maxHeight } // 获取canvas元素 const query = this.createSelectorQuery() let dom = query.select(`#${canvasId}`) dom.fields({ node: true, size: true }) .exec((res) => { // Canvas 对象 const canvas = res[0].node // 渲染上下文 const ctx = canvas.getContext('2d') // 根据设备像素比处理尺寸 = 大小 * 设备像素 const dpr = wx.getSystemInfoSync().pixelRatio canvas.width = width * dpr canvas.height = height * dpr ctx.scale(dpr, dpr) //创建img对象 let img = canvas.createImage(); img.src = file.path; // 给图片添加路径 //图片加载完毕 img.onload = function() { // 将图片绘制到 canvas ctx.drawImage(img, 0, 0, width, height) // 生成图片 wx.canvasToTempFilePath({ canvas, x: 0, y: 0, destWidth: width, destHeight: height, success(res) { resolve(res); // 生成临时文件路径 } }) } }) }) return ctxInfo } catch (err) { console.log(err); } }, /* 获取图片信息 * @param {string} tempFilePath 图片路径 * @returns 图片信息 */ async getImgInfo(tempFilePath) { try { let image = await new Promise((resolve, reject) => { wx.getImageInfo({ src: tempFilePath, success(res) { let imgInfo = { type: res.type, height: res.height, width: res.width, path: res.path } resolve(imgInfo) }, fail(err) { reject(err) } }) }) return image // callback(image) } catch (err) { console.log(err); } },
星期三 18:39现在还有问题吗,提供下appid和操作时间
补充小程序信息中的小程序介绍一栏,体质提交失败,保存失败的[图片]
星期三 16:23请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
RequestTask.abort()在真机上面正常,在开发工具上面失效,终止不了请求?[图片]
星期三 16:08请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
点聚合真机无法实现https://developers.weixin.qq.com/miniprogram/dev/component/map.html
星期三 16:04请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
体验版skyline模式下createSelectorQuery的exec不会触发回调?<canvas type="2d" id="canvas" style="position: absolute; width: 64px; height: 64px;"/> async initCanvas () { const { node: canvas } = await new Promise(resolve => { wx.createSelectorQuery() .select(`#${canvasId}`) .node() .exec(res => { console.log(res) }) }) } skyline模式下真机调试模式下可以出发,体验版不会触发,体验版只有打开调试会触发, 如果发布到线上会触发吗
星期三 15:52完整返回提供下呢
为什么登录出现invalid code,rid:?code是10022
星期三 15:49具体什么问题,是哪里需要替换小程序码呢
小程序码在哪里替换?小程序码替换是在哪里?? [图片]
星期三 15:48没什么报错吗
本地真机调试一切正常,上线出现白屏,如何解决?/pages/userinfo/wallet 这个页面打开空白,本地真机调试和体验版都是正常,请问什么原因呢?
星期三 15:46