- 小程序支付报no permission,以下情况有影响吗?
1.小程序主体和商户号主体不一致; 2.服务起域名未配置; 3.小程序主体为企业; 4.开发环境;
星期一 10:10 - chooseMedia:fail error count
报错内容:upload error: Object{errMsg: "chooseMedia:fail error count"} wx.chooseMedia({ count: 9, // 默认9 sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: this.data.sourceType, // 可以指定来源是相册还是相机,默认二者都有 mediaType: this.data.mediaType, })
2023-10-31 - WXS中不支持使用new Map()吗?
[图片]
2023-10-20 - 小程序工具更新后打开项目提示崩溃?
版本:{ "latestNw": "0.54.1", "previousNw": "0.49.3" } 报错信息:错误代码:RESULT_CODE_KILLED
2022-07-02 - speciallist color 自定义日期样式没有效果
speciallist: [{ date: '2021-05-02', background: '#188be4', color: '#fff' }, { date: '2021-05-06', background: '#188be4', color: '#fff' }, { date: '2021-05-08', background: '#188be4', color: '#fff' } ]
2021-05-06 - 小程序实时音视频,推流摄像头预览api,在 ios真机调试报错
TypeError: this.ctx.startPreview is not a function
2019-06-26 - 使用背景音频api,如何在音频播放前拿到音频总时长?
希望在页面加载时拿到背景音频总时长
2019-03-22 - ios真机测背景音频播放,暂停再播发从头开始播什么原因?
- 复现路径:第1步,第一次点击播放正常播放;第二步,暂停;第三次,第二次点击播放,从头开始播放; [代码]/* 音频start */[代码][代码].audioBox{}[代码][代码].audioBox>.top{[代码][代码] [代码][代码]text-align: center;[代码][代码]}[代码][代码].audioBox>.top>image{[代码][代码] [代码][代码]width: 220rpx;[代码][代码] [代码][代码]height: 297rpx;[代码][代码] [代码][代码]border-radius: 8rpx;[代码][代码] [代码][代码]box-shadow: 2rpx 2rpx 4rpx 2rpx #D4D4D4;[代码][代码]}[代码][代码].audioBox>.top>.top_title{[代码][代码] [代码][代码]font-size: 32rpx;[代码][代码] [代码][代码]font-weight: bold;[代码][代码] [代码][代码]margin: 36rpx 0 12rpx;[代码][代码]}[代码][代码].audioBox>.top>.price{[代码][代码] [代码][代码]font-size: 26rpx;[代码][代码] [代码][代码]color: #a0a0a0;[代码][代码]}[代码][代码].progress{[代码][代码] [代码][代码]margin-top: 53rpx;[代码][代码]}[代码][代码].progress>.[代码][代码]time[代码] [代码]{[代码][代码] [代码][代码]display: flex;[代码][代码] [代码][代码]justify-content: space-between;[代码][代码] [代码][代码]margin: 0 20rpx;[代码][代码]}[代码][代码].progress>.[代码][代码]time[代码][代码]>text{[代码][代码] [代码][代码]font-size: 26rpx;[代码][代码] [代码][代码]color: #a0a0a0;[代码][代码]}[代码][代码].control{[代码][代码] [代码][代码]position: relative;[代码][代码] [代码][代码]display: flex;[代码][代码] [代码][代码]align-items: center;[代码][代码] [代码][代码]justify-content: center;[代码][代码] [代码][代码]margin: 20rpx 0 56rpx;[代码][代码]}[代码][代码].control>icon{[代码][代码] [代码][代码]font-size: 53rpx;[代码][代码] [代码][代码]color: #ff3f61;[代码][代码]}[代码][代码].control>.stateBtn {[代码][代码] [代码][代码]position: relative;[代码][代码] [代码][代码]width: 94rpx;[代码][代码] [代码][代码]height: 94rpx;[代码][代码] [代码][代码]border-radius: 50%;[代码][代码] [代码][代码]background-color: #ff3f61;[代码][代码] [代码][代码]text-align: center;[代码][代码] [代码][代码]margin: 0 60rpx;[代码][代码]}[代码][代码].control>.stateBtn>icon{[代码][代码] [代码][代码]line-height: 93rpx;[代码][代码] [代码][代码]font-size: 43rpx;[代码][代码] [代码][代码]color: white;[代码][代码]}[代码][代码].control>.speed {[代码][代码] [代码][代码]position: absolute;[代码][代码] [代码][代码]top: 26rpx;[代码][代码] [代码][代码]right: 62rpx;[代码][代码] [代码][代码]font-size: 28rpx;[代码][代码] [代码][代码]color: #a0a0a0;[代码][代码] [代码][代码]text-align: center;[代码][代码]}[代码][代码].control>.speed>view {[代码][代码] [代码][代码]display: block;[代码][代码] [代码][代码]font-size: 23rpx;[代码][代码] [代码][代码]color: #a0a0a0;[代码][代码] [代码][代码]margin-top: 10rpx;[代码][代码]}[代码][代码].audioBox>.bottom {[代码][代码] [代码] [代码]}[代码][代码].audioCover {[代码][代码] [代码][代码]position: absolute;[代码][代码] [代码][代码]width: 94rpx;[代码][代码] [代码][代码]height: 94rpx;[代码][代码] [代码][代码]top: 0;[代码][代码] [代码][代码]left: 0;[代码][代码] [代码][代码]background-color: transparent;[代码][代码] [代码][代码]z-index: 9998;[代码][代码]}[代码][代码]/* 音频end */[代码][代码]<!-- 音频start -->[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'audioBox'[代码] [代码]wx:elif[代码][代码]=[代码][代码]"{{courseInfo.course_carrier == 2}}"[代码][代码]>[代码][代码] [代码][代码]<!-- 音频图片和标题 -->[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'top'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]'{{courseInfo.course_pictures}}'[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'top_title'[代码][代码]>{{courseInfo.course_name}}</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'price'[代码][代码]>¥{{courseInfo.course_price}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'bottom'[代码][代码]>[代码][代码] [代码][代码]<!-- 进度条 -->[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'progress'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]slider[代码] [代码]class[代码][代码]=[代码][代码]'slider'[代码][代码] [代码][代码]bindchange[代码][代码]=[代码][代码]"sliderChange"[代码][代码] [代码][代码]activeColor[代码][代码]=[代码][代码]'red'[代码][代码] [代码][代码]block-size[代码][代码]=[代码][代码]"12"[代码][代码] [代码][代码]max[代码][代码]=[代码][代码]"{{max}}"[代码][代码] [代码][代码]value[代码][代码]=[代码][代码]'{{offset}}'[代码] [代码]/>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'time'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码][代码]>{{starttime}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码][代码]>{{courseInfo.duration}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<!-- 音频控制 -->[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'control'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]icon[代码] [代码]class[代码][代码]=[代码][代码]'leftBtn iconfont iconai10'[代码] [代码]bindtap[代码][代码]=[代码][代码]'prev'[代码][代码]></[代码][代码]icon[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'stateBtn'[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{!isOpen}}"[代码] [代码]bindtap[代码][代码]=[代码][代码]"listenerButtonPlay"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'audioCover'[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{audioCover}}"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]icon[代码] [代码]class[代码][代码]=[代码][代码]'startBtn iconfont iconbofang2'[代码][代码]></[代码][代码]icon[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'stateBtn'[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{isOpen}}"[代码] [代码]bindtap[代码][代码]=[代码][代码]"listenerButtonPause"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]icon[代码] [代码]class[代码][代码]=[代码][代码]'iconfont iconstop'[代码][代码]></[代码][代码]icon[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]icon[代码] [代码]class[代码][代码]=[代码][代码]'rightBtn iconfont iconai09'[代码] [代码]bindtap[代码][代码]=[代码][代码]'next'[代码][代码]></[代码][代码]icon[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'speed'[代码] [代码]bindtap[代码][代码]=[代码][代码]"audioPlaybackRateSpeedUp"[代码][代码]>[代码][代码] [代码][代码]1.5X[代码][代码] [代码][代码]<[代码][代码]view[代码][代码]>倍速播放</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<!-- 音频end -->[代码]小程序开发工具上测没问题,ios真机测试时暂停再播放是从头播。 [代码]//播放按钮[代码][代码] [代码][代码]listenerButtonPlay: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]//bug ios 播放时必须加title 不然会报错导致音乐不播放[代码][代码] [代码][代码]bgMusic.title = that.data.courseInfo.course_name;[代码][代码] [代码][代码]bgMusic.epname = that.data.courseInfo.course_name;[代码][代码] [代码][代码]bgMusic.src = that.data.src;[代码][代码] [代码] [代码] [代码][代码]//播放进度发生变化时[代码][代码] [代码][代码]bgMusic.onTimeUpdate(() => {[代码][代码] [代码][代码]//bgMusic.duration总时长 bgMusic.currentTime当前进度[代码][代码] [代码][代码]let duration = bgMusic.duration;[代码][代码] [代码][代码]let offset = bgMusic.currentTime;[代码][代码] [代码][代码]let currentTime = parseInt(bgMusic.currentTime);[代码][代码] [代码][代码]let min = [代码][代码]"0"[代码] [代码]+ parseInt(currentTime / 60);[代码][代码] [代码][代码]let max = parseInt(bgMusic.duration);[代码][代码] [代码][代码]let sec = currentTime % 60;[代码][代码] [代码][代码]if[代码] [代码](sec < 10) {[代码][代码] [代码][代码]sec = [代码][代码]"0"[代码] [代码]+ sec;[代码][代码] [代码][代码]};[代码][代码] [代码][代码]let starttime = min + [代码][代码]':'[代码] [代码]+ sec; [代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]offset: currentTime,[代码][代码] [代码][代码]starttime: starttime,[代码][代码] [代码][代码]max: max,[代码][代码] [代码][代码]});[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]//开始播放[代码][代码] [代码][代码]bgMusic.play();[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]isOpen: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]//播放结束[代码][代码] [代码][代码]bgMusic.onEnded(() => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]starttime: [代码][代码]'00:00'[代码][代码],[代码][代码] [代码][代码]isOpen: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]offset: 0[代码][代码] [代码][代码]})[代码][代码] [代码][代码]that.updateViewTime();[代码][代码] [代码][代码]console.log([代码][代码]"音乐播放结束"[代码][代码]);[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码]//暂停[代码][代码] [代码][代码]listenerButtonPause:[代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]bgMusic.pause();[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]isOpen: [代码][代码]false[代码][代码] [代码][代码]});[代码][代码] [代码][代码]that.updateViewTime();[代码][代码] [代码][代码]},[代码]
2019-03-15