- 小程序升级多端项目之后云开发无法访问?
云开发的未登陆用户访问已打开, envid也设置了,文档上的也都设置了,但是还是报错,errMsg: 没有权限,请先开通云开发或者云托管 wx.cloud.init({ traceUser: true, appid: 'wx9fe84966c528215', envid: 'persona-7gre3ofddb95d8d', }) 限设置问未云资源权限设置
08-17 - 小程序可以使用tone.js吗?
官网地址 https://tonejs.github.io/
2022-09-17 - InnerAudioContext播放延迟问题?
节拍器,声明了三个InnerAudioContext实例,分别播放不同的音效,ide测试速度在500次/秒没问题,但是手机200次/秒以上就不稳定,每次声音的间隔出偏差,安卓好一些,ios100多的时候还会出现时响时不响。文件是本地的 const myAudio1 = wx.createInnerAudioContext({ useWebAudioImplement: true }); myAudio1.src = "pages/index/audio/586.mp3" const myAudio2 = wx.createInnerAudioContext({ useWebAudioImplement: true }); myAudio2.src = "pages/index/audio/187.mp3" const myAudio3 = wx.createInnerAudioContext({ useWebAudioImplement: true }); myAudio3.src = "pages/index/audio/strong.mp3" moveBar() { var that = this; var test = that.data.count % 3 if (test === 0) { myAudio1.play() } else if (test === 1) { myAudio2.play() } else if (test === 2) { myAudio3.play() } that.setData({ count: that.data.count + 1, show: !that.data.show }) }, // 开始 startHandle() { var that = this; Play = setInterval(function () { that.moveBar(); }, time); that .setData({ isPlay: true }) },
2022-09-08 - createInnerAudioContext熄屏之后如何保持继续播放?
全局中也已经申明了,但是熄屏马上就停止了,因为我是要播放本地文件,没办法用BackgroundAudioManager "requiredBackgroundModes":["autio","backgroundAudioManager"]
2022-09-02 - audio真机播放无声音?开发者工具正常播放的
开发者工具正常播放,但是真机无论安卓还是ios都没有声音 <audio src="../../audio/strong.mp3" action="{{strongAction}}" bindplay="play1"></audio> <audio src="../../audio/187.mp3" action="{{weekAction}}" bindplay="play2"></audio>
2022-09-02 - this.animate动画结束后停留在结束位置?
这个应该咋写?
2022-08-04 - js动画问题请教,有偿?
[图片] 这样一个页面,小球绕中心点公转的同时自转,上下滑动改变公转的椭圆路线,左右滑动改变小球在椭圆轨道的位置,同时小球size的改变创造空间感,这个应该怎么写,有偿请教或帮忙写个demo
2022-08-02 - 云开发“检查环境“ 发生了错误?
多个小程序的云开发都出现了这个错误 appid:wxff9bf8acd6f6c822 appid:wx510fc6826695e0ef
2021-10-21 - 云函数内递归执行顺序?
云函数内递归的执行顺序,代码在下面 我想让await traverse(agent.data) returnData.agent = str 这个代码全部执行完之后再往下执行,怎么办? // 云函数入口文件 const cloud = require('wx-server-sdk') cloud.init() const db = cloud.database() const _ = db.command let str = [] // 云函数入口函数 exports.main = async (event, context) => { switch (event.action) { case 'statistical': { return statistical(event) } //统计代理商和服务商总数 default: { return } } } /* 统计代理商和服务商总数 */ async function statistical(event) { var tmpData = [] var returnData = {} var serviceList = [] var c1 = new cloud.Cloud({ resourceAppid: 'wx64dbfc5c3e44d', resourceEnv: 'cloud1-4gbakrj73c10a', }) await c1.init() const db = c1.database() var agent = await db.collection('agentList').where({ higherSalse: event.higherSalse, higherAgent: event.higherAgent, }).get() str = str.concat(agent.data) await traverse(agent.data) returnData.agent = str var data1 = await db.collection('serviceList').where({ higherAgent: event.higherAgent }).get() serviceList = serviceList.concat(data1.data) for (var i = 0; i < str.length; i++) { var data2 = await db.collection('serviceList').where({ higherAgent: str[i].identificationCode }).get() serviceList = serviceList.concat(data2.data) } returnData.serviceList = serviceList return returnData } async function traverse(agent) { var c1 = new cloud.Cloud({ resourceAppid: 'wx64dbfc5c3e44d', resourceEnv: 'cloud1-4gbakrj73c10', }) await c1.init() const db = c1.database() var tmpData = [] for (var i = 0; i < agent.length; i++) { //console.log('查询次数',i) await db.collection('agentList').where({ higherAgent: agent[i].identificationCode, }).get().then(res => { //console.log('查询', i, tmpData.length) if (res.data.length > 0) { str = str.concat(res.data) traverse(res.data) } }) } }
2021-08-16 - ocr识别问题
//识别身份证 async function idCard(imgUrl) { try { const result = await cloud.openapi.ocr.idcard({ type: 'photo', imgUrl: imgUrl }) return result } catch (err) { console.log(err) return err } } //识别银行卡 async function bankCard(imgUrl) { try { const result = await cloud.openapi.ocr.bankCard({ type: 'photo', imgUrl: imgUrl }) return result } catch (err) { console.log(err) return err } } //识别驾驶证 async function drivingLicense(imgUrl) { try { const result = await cloud.openapi.ocr.drivingLicense({ type: 'photo', imgUrl: imgUrl }) return result } catch (err) { console.log(err) return err } } 身份证识别没问题,银行卡与驾驶证识别都出错了, [图片] 银行卡识别返回结果: result: {errCode: -604100, errMsg: "system error: error code: -604100" [图片] 驾驶证识别返回结果错误百出 result: cardPositionFront: {pos: {…}} errCode: 0 errMsg: "openapi.ocr.drivingLicense:ok" imgSize: {w: 700, h: 540} issueDate: "90423" model: "05Z" owner: "广东省化州市中垣镇塘桑墨柱公吴川" registerDate: "80423" useCharacter: "旅机中出" vin: "2030423"
2021-04-27