...
|
...
|
@@ -19,7 +19,8 @@ Page({ |
|
|
endsec:'00:00',
|
|
|
palyrate:'',//播放的百分比
|
|
|
poster_id:'',//海报ID
|
|
|
musicsrc:''
|
|
|
musicsrc:'',
|
|
|
duration:0
|
|
|
},
|
|
|
//生成静态地图
|
|
|
getStaticmap(markers) {
|
...
|
...
|
@@ -69,20 +70,23 @@ Page({ |
|
|
bgM.onTimeUpdate(() => {
|
|
|
let palyrate = (parseInt(bgM.currentTime) / parseInt(bgM.duration)) * 100;//播放的百分比
|
|
|
that.setData({
|
|
|
startsec: (bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0))+ ':00s',
|
|
|
endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s',
|
|
|
startsec: '00:' +(bgM.currentTime.toFixed(0) < 10 ? '0' + bgM.currentTime.toFixed(0) : bgM.currentTime.toFixed(0)),
|
|
|
endsec: '00:' +(bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) ,
|
|
|
palyrate: palyrate
|
|
|
})
|
|
|
})
|
|
|
bgM.onEnded(() => {
|
|
|
that.setData({
|
|
|
startsec: 0 + ':00s',
|
|
|
endsec: (bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) + ':00s',
|
|
|
startsec: '00' + ':00',
|
|
|
endsec: '00:' +( bgM.duration.toFixed(0) < 10 ? '0' + bgM.duration.toFixed(0) : bgM.duration.toFixed(0)) ,
|
|
|
palyrate: 0,
|
|
|
play: true
|
|
|
})
|
|
|
})
|
|
|
}, 500)
|
|
|
that.setData({
|
|
|
duration: bgM.duration
|
|
|
})
|
|
|
}, 1000)
|
|
|
},
|
|
|
audioPause: function () {//暂停
|
|
|
let that = this;
|
...
|
...
|
@@ -148,7 +152,7 @@ Page({ |
|
|
app.post(url, params,{}).then((res)=>{
|
|
|
if(res.code==20000){
|
|
|
that.setData({
|
|
|
musicsrc: res.url
|
|
|
musicsrc: res.url
|
|
|
})
|
|
|
bgM.src = that.data.musicsrc;
|
|
|
for (let i in res.coordinate){
|
...
|
...
|
|