facejiong / light-music-wechat-mini-programs Goto Github PK
View Code? Open in Web Editor NEWa wechat mini programs for light music
a wechat mini programs for light music
例如进度时间 00:00 ----------------------------------14:00 在移动端计算开始时间时候 会出现很多小数点 00:01.22255445555555555 类似这样 怎么解决呢?在开发者工具是没有这个问题的
[自动播放下一首]
主js文件中
setDuration(that) {
wx.getBackgroundAudioPlayerState({
success: function (res) {
// console.log(res)
let { status, duration, currentPosition } = res
if (status === 1 || status === 0) {
that.setData({
currentPosition: that.stotime(currentPosition),
duration: that.stotime(duration),
sliderValue: Math.floor(currentPosition * 100 / duration),
})
}
// 自动播放下一首
if (status === 2 && that.data.sliderValue == 100) {
that.bindTapNext()
}
}
})
},
[音乐列表标题文字过多变形问题]
wxss文件中list部分
.list{
position: absolute;
top: 0;
height: 100%;
width: 100%;
color: #fff;
}
.list-one{
height: 160rpx;
display: flex;
padding: 0 30rpx;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
}
.list-one-poster{
width: 100rpx;
height: 100rpx;
border-radius: 100rpx;
}
.list-one-right{
margin: 0 0 0 30rpx;
width:68%;
}
.name{
font-size:32rpx;
}
.author{
color:#CCCCCC;
font-size:24rpx;
}
.list-one-choose{
background-color: rgba(54, 43, 41, 0.6);
}
.list-index{
display: block;
width: 60rpx;
height: 60rpx;
background-color: mediumvioletred;
text-align: center;
border-radius: 60rpx;
line-height: 60rpx;
margin-right: 20rpx;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.