对话平台调用Python的接口吗?我这边已经实现了,但是不知道为什么,有时候触发技能会回复:未配置内容,flask也没看到有请求,很奇怪啊
智能对话发送客服消息为啥没反应的呀?,已经正常加密了[图片]
05-27我也遇到了,测试号,死活无效,https://mp.weixin.qq.com/debug/测试也是这个错误
公众号向用户发送消息的API接口返回40003:invalid openid rid?公众号APPID: wxbc6e84f450dfb210 之前使用这个接口给用户发送消息是可以正常使用的,最近开始报40003这个错误?确认了用户的openid是没有问题的,在微信公众平台接口调试工具里测试也是同样的问题?这个可能的原因是什么呢?谢谢
05-15解决了,在ccs中把高度height注释掉就好了:https://developers.weixin.qq.com/s/uAqt1QmH7vFL
Canvas 2d 旋转图片在ios真机上与开发者工具输出不同(感觉高度少了一半)?//旋转图像 async RoImage(url) { let autoRotate = this.data.autoRotate, off = wx.createOffscreenCanvas({ type: '2d' }), image = off.createImage(); await new Promise((resolve, reject) => { wx.getImageInfo({ src: url, success(res) { //image.src = url; image.name = res.type; //变量定义、赋值 let width = res.width, height = res.height; console.log('[RoImage]处理前尺寸: ' + width + ' x ' + height); //绘制canvas 旋转图片 const $ = wx.createSelectorQuery(); $.select('#canvas').fields({ node: true, size: true }).exec((res) => { const canvas = res[0].node; const ctx = canvas.getContext('2d'); let bg = canvas.createImage(); bg.src = url; bg.onload = () => { if (height > width && autoRotate == '1') {//自动旋转 //旋转图片开始 console.log('旋转90度'); //画板宽高调换 canvas.width = height; canvas.height = width; //图片开始旋转 ctx.translate(height / 2, width / 2);//原点移动到(/2, /2)中心点 ctx.rotate(270 * Math.PI / 180);//-90度 ctx.drawImage(bg, -width / 2, -height / 2, width, height); //图片宽高调换 let ro_w = width, ro_h = height; width = ro_h; height = ro_w; console.log('[RoImage]处理后尺寸: ' + width + ' x ' + height); } else { //画板宽高调换 canvas.width = width; canvas.height = height; console.log('[RoImage]跳过旋转: ' + width + ' x ' + height); ctx.drawImage(bg, 0, 0, width, height); } //canvas转文件的临时路径 (本地路径) wx.canvasToTempFilePath({ canvas, quality: 1, fileType: "jpg", success: (res) => { //保存图片到本地 wx.saveImageToPhotosAlbum({ filePath: res.tempFilePath, success: (res) => { console.log(res); } }); console.log('[RoImage]处理完成', res.tempFilePath); image.src = res.tempFilePath; image.onload = resolve; // 绘制图片逻辑 } }) } }) }, fail(res) { image.src = url; console.log(res); image.onload = reject; // 绘制图片逻辑 } }); }) return image; }, 开发者工具: [图片] ios真机: [图片][图片]
2023-02-07自己写的一个函数,不知道大佬有没有更好的办法 var strDate = "['a','b'],['c','d'],['e','f']"; //eval("([" + strDate + "])"); console.log(str_to_arr(strDate)); function str_to_arr(str){ var a='',b=[]; s = str.split('],['); //console.log(s.length); for(var i = 0;i < s.length;i++){ //console.log(s[i]); if(i==0){ a = s[i].substr(1); a = a.replace(/\'/g, ""); a = a.replace(/\"/g, ""); a = a.split(","); //console.log(a); }else if(i == Number(s.length-1)){ //console.log('del'); a = s[i].substr(0,s[i].length-1); a = a.replace(/\'/g, ""); a = a.replace(/\"/g, ""); a = a.split(","); //console.log(a); }else{ a = s[i] a = a.replace(/\'/g, ""); a = a.replace(/\"/g, ""); a = a.split(","); //console.log(a); } b.push(a); } return b; }
问一下这样的字符串"['a','b']['c','d']"怎么转换数组?问一下这样的字符串 var str = "['a','b'],['c','d']"; 怎么转换成这样的 ['a','b'],['c','d'] 数组? 发现eval("([" + str + "])")用不了。。。 [图片]
2021-12-18个人主体迁移公司要交钱吗
小程序迁移主体,迁移函拼接上传啥意思?需要迁移小程序主体,迁移函拼接上传啥意思?
2021-12-18[图片] php,mysql可以这样,云数据库怎么搞?
云数据库小数点自增自减怎么操作?const _ = db.command db.collection('todos').doc('todo-id').update({ data: { progress: _.inc(10) } }) //这可以加减整数,小数会有精度问题 db.collection('user').where({ _openid: openid }).get().then(res => { var dq_money = res.data[0].money; var ok_money = accAdd(dq_money, money); db.collection('user').doc(openid) .update({ data: { money: ok_money } }).then(res => { console.log('[' + openid + ']' + msg + '增加金额[' + money + ']成功', res) }) }) //这个会出现同时调用时覆盖 问一下大佬们是怎么解决余额小数点加减的?
2021-10-09