- swiper 如何禁止用户手动滑动,只自动播放
swiper 仅用于幻灯片自动播放,但不允许用户手动滑动。有参数设定吗? 我在搜了一下网上用的: <swiper-item catchtouchmove="stopTouchMove"></swiper-item > 这个方法正常用起来感觉是可以的,但我发现一个小bug: 假设 A、B两页 用js代码滑动改变swiper的“current”,从A页滑动到B页的一瞬间(B页面出来十分之一前),手指反方向滑动回去,能将页面换会A页
2019-02-19 - getMenuButtonBoundingClientRect 真机测试闪退
一调用getMenuButtonBoundingClientRect 真机测试时,一调用getMenuButtonBoundingClientRect 就整个微信闪退
2019-02-12 - IOS搜索不到,android机可以正常搜索
小程序名称:美童读书
2019-02-12 - 录音api“anthorize no response”
弹框显示: operateRecorder:fail anthorize no response 而且弹框不断不间断闪现,导致除了关闭小程序按钮,其他任何页面功能都使用不了,只能退出; <----------------js代码-------> function setRecordManager(current, callBack = function() {}) { if (!wx.getRecorderManager) { wx.showModal({ title: '无法启动', content: '您的微信版本过低,请升级微信客户端', showCancel: false, }) return false; } if (!that.recorderManager) { that.recorderManager = wx.getRecorderManager(); } that.recorderManager.onStop(function(res) { that.globalMedaiPlaying = false; // 停止录音之后,把录取到的音频放在res.tempFilePath var userReadList = that.data.userReadList; userReadList[current]["Path"] = res.tempFilePath; that.setData({ aleardyRecordFlag: 0, recordAudioCurrent: "null", userReadList: userReadList, }); canSubmit(); score(current) setUserReadAudio(current, res.tempFilePath); }); that.recorderManager.onStart(() => { var userReadList = that.data.userReadList; userReadList[current] = {}; that.setData({ userReadList: userReadList, }); console.log(userReadList); }); //错误回调 that.recorderManager.onError((res) => { that.globalMedaiPlaying = false; that.recorderManager.stop(); that.setData({ recordingAudioCurrent: "", }); wx.showModal({ title: '录音失败', content: res.errMsg, showCancel: false, }) }) callBack(); } function startRecordAudio(current) { that.composeAudioData = {}; if (that.globalMedaiPlaying) { stopAllAudio(); } that.globalMedaiPlaying = true; setRecordManager(current, function() { const duration = 60000; const recordOptions = { duration: duration, //指定录音的时长,单位 ms sampleRate: 16000, //采样率 numberOfChannels: 1, //录音通道数 encodeBitRate: 96000, //编码码率 format: 'mp3', //音频格式,有效值 aac/mp3 frameSize: 50, //指定帧大小,单位 KB } that.recorderManager.start(recordOptions); that.recordStartTime = new Date().getTime() that.setData({ recordAudioCurrent: current, }); }); }
2019-01-30 - navigationStyle:custom后,求右上角胶囊按钮的尺寸
[图片] app.json 的 windows 设置了navigationStyle:custom后, 右上角的胶囊按钮宽高在不同设备下是怎么计算的?
2019-01-07