作者 liaolinfeng

音频修改

... ... @@ -407,6 +407,12 @@ Page({
}
}
}
if(chooseitem.length>0){
for(let obj of chooseitem){
let tempLocation = obj.longitude +','+ obj.latitude
locationurl += '|'+tempLocation
}
}
that.getStaticmap(staticmarkers)//调用静态图生成方法,生成图片
if (locationurl.length==0){
wx.showToast({
... ... @@ -438,7 +444,7 @@ Page({
wx.showModal({
title: '提示',
content: errMsg.msg,
showCancel: falses
showCancel: false
})
console.log(errMsg)
})
... ...
... ... @@ -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){
... ...
... ... @@ -112,6 +112,9 @@ height:500rpx;
color:#007CC2;
font-size:24rpx;
}
.play_num.notime{
opacity: 0
}
.map_container{
width:100%;
height: 100%;
... ...