- 云开发里面存储的缓存配置啥作用,我把缓存配置时间改成2天?
能解决小程序页面展示图片卡顿问题吗?
2022-11-06 - 怎么把云服务器上图片变成http图片呢?
cloud://pqtz2-9gzchr9694281166.7071-pqtz2-9gzchr9694281166-1309635073/sxfriend_list_photo/oskUN5hwrBJ7EqZSIwUEI6EkWNlA881664419082570.jpg
2022-10-26 - chooseMedia生成的临时图片路径,网页打开,访问不了?
wx.chooseMedia(Object object)生成的临时文件路径访问不了 http://tmp/jdchhlErdF5Zb719e17fada334252d70776ea09530b9.jpg
2022-10-26 - 为啥生成的图片临时路径,打开网页看不到图片啊?
http://tmp/H7UF0so34vrpb719e17fada334252d70776ea09530b9.jpg 以前感觉可以,为啥这里不行?
2022-10-26 - 想识别上传图片是否是人脸,用wx.createVKSession,说不支持?
报错 VM13673 WAService.js:1 createVKSession:fail The current device does not support version "v1"(env: Windows,mp,1.05.2111300; lib: 2.27.0) 在微信开发者工具代码如下: // 静态图片检测模式处理 const session = wx.createVKSession({ track: { face: { mode: 2 } // mode: 1 - 使用摄像头;2 - 手动传入图像 }, version: 'v1' }) var frameBuffer = "cloud://pqtz2-9gzchr9694281166.7071-pqtz2-9gzchr9694281166-1309635073/icon_enter.png"; // var session.detectFace({ frameBuffer:frameBuffer, // 图片 ArrayBuffer 数据。人脸图像像素点数据,每四项表示一个像素点的 RGBA width: 100, // 图像宽度 height: 100, // 图像高度 scoreThreshold: 0.5, // 评分阈值 sourceType: 1, modelMode: 1, }) // 静态图片检测模式下,每调一次 detectFace 接口就会触发一次 updateAnchors 事件 session.on('updateAnchors', anchors => { console.log('anchors.points', anchors.points) console.log('anchors.origin', anchors.origin) console.log('anchors.size', anchors.size) console.log('anchors.angle', anchors.angle) })
2022-10-21 - 上传图片,有什么方式检查是否是正脸图片?
请教大佬,谢谢!
2022-10-20 - import QRCode from '../../../utils/**.js‘报错?
在login.js中import QRCode from '../utils/weapp.qrcode.esm.js'; 这import就报错。 VM4853:4681 页面【pages/login/login]错误: Error: module 'pages/login/login.js' is not defined, require args is 'pages/login/login.js' at I (VM4698 WAService.js:1) at <anonymous>:4678:7 at doWhenAllScriptLoaded (<anonymous>:5007:21) at Object.scriptLoaded (<anonymous>:5035:5) at Object.<anonymous> (<anonymous>:5060:22)(env: Windows,mp,1.05.2111300; lib: 2.25.4) (anonymous) @ VM4853:4681 doWhenAllScriptLoaded @ VM4806:5007 scriptLoaded @ VM4806:5035 (anonymous) @ VM4806:5060 load (async) (anonymous) @ assubloader.js:1 V @ VM4698 WAService.js:1 loadScripts @ assubloader.js:1 async function (async) loadScripts @ assubloader.js:1 loadAppResourceScripts @ assubloader.js:1 (anonymous) @ VM4806:5079 (anonymous) @ VM4806:5085 loadScripts @ assubloader.js:1 async function (async) loadScripts @ assubloader.js:1 loadAppResourceScripts @ assubloader.js:1 (anonymous) @ VM4802:1 t.loadScripts @ VM13 asdebug.js:1 loadAppService @ VM13 asdebug.js:1 messagerCallback @ VM13 asdebug.js:1 (anonymous) @ VM13 asdebug.js:1 g @ VM13 asdebug.js:1 f @ VM13 asdebug.js:1 (anonymous) @ VM13 asdebug.js:1 _ws.onmessage @ VM13 asdebug.js:1 VM4698 WAService.js:1 Error: module 'pages/login/login.js' is not defined, require args is 'pages/login/login.js' at I (VM4698 WAService.js:1) at <anonymous>:4678:7 at doWhenAllScriptLoaded (<anonymous>:5007:21) at Object.scriptLoaded (<anonymous>:5035:5) at Object.<anonymous> (<anonymous>:5060:22)(env: Windows,mp,1.05.2111300; lib: 2.25.4) errorReport @ VM4698 WAService.js:1 thirdErrorReport @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 u @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 _privEmit @ VM4698 WAService.js:1 emit @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 xe @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 xe @ VM4698 WAService.js:1 onLoad @ VM4698 WAService.js:1 ee @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 emit @ VM4698 WAService.js:1 (anonymous) @ VM4698 WAService.js:1 c @ VM13 asdebug.js:1 r @ VM13 asdebug.js:1 window.onerror @ VM4691:1 doWhenAllScriptLoaded @ VM4806:5007 scriptLoaded @ VM4806:5035 (anonymous) @ VM4806:5060 error (async) t.default @ VM4691:1 168 @ VM4691:1 n @ VM4691:1 (anonymous) @ VM4691:1 (anonymous) @ VM4691:1 VM4698 WAService.js:1 Error: module 'pages/login/login.js' is not defined, require args is 'pages/login/login.js' at I (VM4698 WAService.js:1) at <anonymous>:4678:7 at doWhenAllScriptLoaded (<anonymous>:5007:21) at Object.scriptLoaded (<anonymous>:5035:5) at Object.<anonymous> (<anonymous>:5060:22)(env: Windows,mp,1.05.2111300; lib: 2.25.4)
2022-10-18 - 想执行完一个方法后再执行后面语句,有时方法执行时用了方法后面的参数?
that.toViewBottom(); //上面先滑动,下面再显示输入框 that.setData({ bottom_val: t.detail.height, //输入框高度 }); 我想执行完页面向上滑动that.toViewBottom()后,再执行后面设置一个输入框的高度,可是滑动语句滑动时,好像使用了后面输入框的参数,怎么能让方法执行完再执行后面语句呢?
2022-10-15 - 在微信开发者工具测试,可以获取分享小程序的的用户openid,可是手机测试,获取不成功?
app.js onLaunch: function(e) { var object = wx.getLaunchOptionsSync(); this.globalData.inviteUserId = object.query.tid; //接收用户得到分享用户的openId, console.log('inviteUserIdquareMain22-', object.query.tid); var inviteUserId = object.query.tid;// wx.setStorage({ //存储首页的推荐的图片 key: "inviteUserId", data: inviteUserId }); wx.showShareMenu({ withShareTicket: true }) }, test.js onShareAppMessage: function() { wx.showShareMenu({ withShareTicket: true }) var t = "/pages/square/squareMain/squareMain"; console.log('myInfo.openId--onShareAppMessage55-', myInfo.openId); return (t = "/pages/square/squareMain/squareMain?tid=" + myInfo.openId), { title: "", path: t }; },
2022-10-05 - 微信小程序-携带参数转发分享页面,可是在分享页面onload那有时取到参数,有时取不到?
打开分享页面的onLoad,有时能取到分享携带的参数,有时得不到,看了一些分享文章,感觉点击分享页,onload可能没执行,请教怎么样能 稳定的获得分享页送来的参数呢? 微信小程序点击右上角按钮分享页面 onShareAppMessage: function(res) { if (res.from === ‘button’) { // 来自页面内转发按钮 } return { title: “这个小程序真棒”, path: “pages/start/start” } } 页面按钮转发,给按钮添加open-type的share属性,就会触发转发 分享名片 接下来如果你转发名片的时候还想携带参数的话,就在跳转的页面后面加上参数的值 onShareAppMessage: function(res) { if (res.from === ‘button’) { // 来自页面内转发按钮 } return { title: “这个小程序真好”, path: ‘pages/start/start?commentUserId=’ + app.globalData.commentUserId } }, 要想取到这个值就需要在跳转那个页面onload里面拿 onLoad: function(options) { //获取分享转发页面时携带的参数 commentUserId =options.commentUserId; }
2022-10-02