- 为什么我的背景音乐真机播放中断,说是src null?
[图片] 我调用的是 wx.getBackgroundAudioManager
2020-03-27 - 请问大佬我想用云函数更新数据库数据不成功?
[图片]是不是我函数的confit.json文件权限没配好,我是小白,可以教我怎么配吗,谢谢~
2020-03-24 - 为什么init了还是报错,云函数调用怎么玩呀?
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) const cloud = require('wx-server-sdk')
2020-03-23 - 都已经在云函数js页面写了cloud.init({ env:'xxx'})还是报错啊啊啊 ?
报错:VM67:1 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 3a71a602-6c11-11ea-8756-52540054168a, cloud function service error code -504002, error message errCode: -1 unknown error | errMsg: Cloud API isn't enabled, please call init first 请先调用 init 完成初始化后再调用其他云 API。init 方法可传入一个对象用于设置默认配置,详见文档。; at cloud.callFunction api;
2020-03-22 - 大佬救我,为什么我调用updateMyCount函数报错,调用其他函数无反应啊?
我小程序开发,从checkResul函数开始,在里面调用不了声明的函数,数据库权限是所以人可读,假如注释掉updateMyCount函数就会执行到if(0==sam)的打印sam=0就停了,哭了呜呜呜 // pages/last/last.js var util = require('../../utils/util.js');//用于时间 //const $ = db.command.aggregate const app = getApp();//获取全局对象userInfo={} const db = wx.cloud.database();//引入数据库 var myDate; var time; var wxNum; var place; var age; var hopeSex; var samOrDiffCity; Page({ data: { myJoinId:'', //报名参加创建join时自己的id youSex:'', wxNum: '', age: '', place:'', hopeSex:'', samOrDiffCity:'', sam: 0 , myCount: 0, myActWxNum: '', myActAge: '' }, handleInputWxNum: function (e) { wxNum=e.detail.value }, handleInputPlace: function (e) { place= e.detail.value }, inputAge: function(age){ age=age.detail.value }, radioGroupSex: function (sex) { hopeSex= sex.detail.value }, radioGroupCity: function (city) { samOrDiffCity= city.detail.value }, addData: function(){ db.collection('join').add({ data: { wxNum: this.data.wxNum, place: this.data.place, hopeSex: this.data.hopeSex, samOrDiffCity: this.data.samOrDiffCity, age: this.data.age, sam:0, myCount:0, } }).then((res) => { var myJoinId = res._id; this.setData({ myJoinId: myJoinId }) wx.showToast({ title: '报名成功!!' }) }) }, checkResult: function(){ myDate = new Date(); time = myDate.getDay();//获取今天星期几 if(time==5){ updateMyCount(); db.collection('join').doc(this.data.myJoinId).get().then(()=>{ var sam=res.data.sam; if (0==sam){ whereData(); removeMyJoin(); wx.redirectTo({ url: '../result/result' }) } } else{ wx.redirectTo({ url: '../waitResult/waitResult' }) } }, updateMyCount: function(){ var myJoinId = this.data.myJoinId; db.collection('join').doc(myJoinId).update({ data: { myCount: 1 }, }).then((res)=>{console.log('updateMyCount 调用成功')}) }, lookMyJoin: function () { db.collection('join').doc(this.data.myJoinId).get().then((res) => { console.log('i am sam=1,succsee to get myself join record', res); getApp().globalData2.resulted = res.data.myActWxNum; getApp().globalData2.resulted = res.data.myActAge; }) }, whereData: function () { db.collection('join').where({ sam: 0, myCount: 0, hopeSex:this.data.youSex }).get().then((res) => { console.log('succeed to where get data :', res.data); getApp().globalData.result = res.data[0]; var youId = res.data[0]._id; console.log('var youId=', youId); updateYourJoin(youId); }) }, updateYourJoin: function () { db.collection('join').doc(youId).update({ data: { sam: 1, myActWxNum: that.data.wxNum, myActAge: that.data.age }, }).then((res) => { console.log('succeed to 局更 your sam:1,myActWxNum...'); }) }, removeMyJoin: function () { db.collection('join').doc(this.data.myJoinId).remove({ }).then((res) => { console.log('succeed to remove my join record'); }) }, onShareAppMessage: function () { } }) [图片] 辛苦大佬们了
2020-03-20 - 为什么我小程序代码执行一半就不走了呀?
[图片]就执行到116行停了,117行的打印都没反应了,请问这是怎么回事呀? 打印结果:[图片]
2020-03-20 - 为什么我的多账号调试的选择账号界面一部分会被电脑下面的任务栏遮挡?
点击‘多账号调试’后弹出选择账号界面,这个界面的一部分会被电脑下面的任务栏遮挡,导致按不了确定键,每次都要隐藏工具栏才行
2020-03-16