
作者:微信公开课+
作品:微信公开课
地区:全国小程序
标签:教育,工具,微信公开课,资讯
描述:微信公开课是微信官方与小程序行业合作伙伴沟通交流的微信小程序社区,为线下微信小程序公开课的免费授课提供线上的相关服务,包括查阅小程序活动议程、参与小程序活动互动以及回顾小程序课程内容等。
声明:作者对小程序服务信息内容及运营行为等真实性/合法性及有效性承担全部责任
订阅微信公开课小程序
-
小程序wxstartRecord无法录音
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstartRecord无法录音」
摘要:小程序wxstartRecord无法录音
展开:wx.startRecord有时候可以录音,有时候不能录,请问是不是在调用request接口或者getLocation接口的时候无法调用wx.startRecord -
小程序wxstartRecord的疑问
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstartRecord的疑问」
摘要:小程序wxstartRecord的疑问
展开:最新的更新之后,wx.startRecord会弹出一个需要用户同意调用录音接口的提示框,然后就会导致一个问题,无法获取到真正开始录音的那个时刻!因为目前wx.startRecord的两个回调sucesss,是在成功完成录音的时候才触发;fail,是失败的时候触发。总之如果想记录录音时长的话,有点难搞。 -
小程序wxstartRecord第一次调用授权弹窗时怎么获取点击确定时的事件
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstartRecord第一次调用授权弹窗时怎么获取点击确定时的事件」
摘要:小程序wxstartRecord第一次调用授权弹窗时怎么获取点击确定时的事件
展开:rt -
小程序wxstartRecord调用中IOS的兼容问题
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstartRecord调用中IOS的兼容问题」
摘要:小程序wxstartRecord调用中IOS的兼容问题
展开:我点击一个按钮跳转到一个新页面,在页面初始化的时候,调取wx.startRecord({})安卓是没有问题的,而苹果只有第一次进入的时候会进入success,之后进入都是fail:function(res){//录音失败如果我在页面添加一个按钮点击按钮录音的话,无论多少次都没有问题。点击话筒进入苹果第一次进的时候进入success之后进入都是失败代码:onLoad:function(){varthatthis;wx.getStorage({key:search,success:function(res){if(res.data){that.setData({history_text:res.data,history_empty:false})}},fail:function(){//没有缓存不显示that.setData({history_empty:true})}})wx.getStorage({key:userInfo,success:function(res){if(res.data.userId){that.setData({userId:res.data.userId})}},fail:function(){//没有缓存不显示that.setData({userId:})}})},onShow:function(){this.mytouchstart();},onHide:function(){//页面关闭wx.stopRecord()},onUnload:function(){//页面关闭wx.stopRecord()},mytouchstart:function(){console.log(1)varthatthis//开始录音。当主动调用wx.stopRecord,//或者录音超过1分钟时自动结束录音,返回录音文件的临时文件路径。//当用户离开小程序时,此接口无法调用。wx.stopRecord()wx.startRecord({success:function(res){console.log(录音成功+JSON.stringify(res));that.setData({voiceButtonName:语音识别,wavetoword:true,rewavetoword:true,recordingfailed:true,unrecognized:true,acousticwave:true,ensure:true,uploadfailed:true,wavewait:false,voicePlayButtonName:开始播放,tempFilePath:res.tempFilePath})//上传语音文件至服务器wx.uploadFile({url:http://test2,filePath:res.tempFilePath,name:file,//header:{},//设置请求的headerformData:{msg:voice},//HTTP请求中其他额外的formdatasuccess:function(res){//successconsole.log(begin);console.log(res.data);varjsonJSON.parse(res.data);console.log(json.result);varjsonResultjson.result;console.log(jsonResult);varitemjsonResultif(!item){that.setData({acousticwave:true,wavewait:true,wavetoword:true,recordingfailed:true,ensure:true,uploadfailed:true,rewavetoword:false,unrecognized:false})}elseif(item){that.setData({val:item,acousticwave:true,recordingfailed:true,unrecognized:true,ensure:false,wavewait:true,uploadfailed:true,rewavetoword:false,wavetoword:false})}},fail:function(err){that.setData({val:item,acousticwave:true,recordingfailed:true,ensure:true,unrecognized:true,wavewait:true,uploadfailed:false,rewavetoword:false,wavetoword:true})//failconsole.log(err);},onVoiceRecordEnd:function(res){console.log(21)},complete:function(){//complete}})},fail:function(res){//录音失败that.setData({voiceButtonName:语音识别,acousticwave:true,wavewait:true,wavetoword:true,rewavetoword:false,uploadfailed:true,ensure:true,recordingfailed:false,unrecognized:true})console.log(录音失败+JSON.stringify(res));}})setTimeout(function(){//结束录音wx.stopRecord()},5000)},mytouchend:function(){wx.stopRecord()} -
小程序wxstopAccelerometer(OBJECT)在真机上报错
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstopAccelerometer(OBJECT)在真机上报错」
摘要:小程序wxstopAccelerometer(OBJECT)在真机上报错
展开:在开发工具中调用wx.stopAccelerometer成功,在真机上报错:wx.stopAccelerometerisnotafunction -
小程序wxstopPullDownRefresh();手机上等2s才收起
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstopPullDownRefresh();手机上等2s才收起」
摘要:小程序wxstopPullDownRefresh();手机上等2s才收起
展开:onPullDownRefresh:function(){wx.stopPullDownRefresh();},手机上等2s才收起,感觉卡顿,怎么弄 -
小程序wxstopPullDownRefresh效果不是立即生效的
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxstopPullDownRefresh效果不是立即生效的」
摘要:小程序wxstopPullDownRefresh效果不是立即生效的
展开:wx.stopPullDownRefresh效果不是立即生效的wx.stopPullDownRefresh()执行后,动画需要过一段时间才消失,不能立即消失吗 -
小程序wxswitchTab
2019-04-03 15:13:30如何看待微信公开课小程序热门讨论「小程序wxswitchTab」
摘要:小程序wxswitchTab
展开:跳转到switchTab不触发onLoad?