feat: 样式调整

This commit is contained in:
Blizzard
2026-04-28 10:32:19 +08:00
parent 7f51b2a0a8
commit ce91e2cbbe
33 changed files with 1553 additions and 619 deletions
+16 -1
View File
@@ -194,7 +194,7 @@ function getVipConfig() {
/** 发起 VIP 开通预支付 */
function initiateVipPayment() {
return post('/vip/vip',{})
return post('/vip/vip', {})
}
function getUserInfo() {
@@ -231,6 +231,19 @@ function unlockChannel(channelId, type) {
return post('/radio/subscription/unlock', { channelId, type })
}
/** 获取点赞列表 */
function getLikeList(params) {
return post('/like/list', {
current: (params && params.current) || 1,
pageSize: (params && params.pageSize) || 30
})
}
/** 清空全部点赞 */
function removeAllLikes() {
return get('/like/removeAll')
}
module.exports = {
miniLogin,
getLocation,
@@ -256,6 +269,8 @@ module.exports = {
removeAllFavorites,
getFavoriteList,
toggleLike,
getLikeList,
removeAllLikes,
addComment,
deleteComment,
getCommentList,
+7 -3
View File
@@ -11,6 +11,7 @@ let bgAudioManager = null
let appInstance = null
let _switching = false // 切换音频时的锁,防止 onStop 事件干扰
let _ended = false // 标记音频是否已自然播放完毕
let _stopped = false // 标记音频是否被系统停止(浮窗关闭等)
/**
* 初始化音频管理器
@@ -36,6 +37,7 @@ function init(app) {
// 如果正在切换音频,不处理 onStop(新的 src 设置会触发旧的 onStop
if (_switching) return
_stopped = true // 标记:音频被系统停止,下次播放需重新设置 src
reportHistory()
updatePlayState(false)
appInstance.globalData.currentTime = 0
@@ -142,7 +144,8 @@ function playContent(content) {
// 标记正在切换,防止旧音频的 onStop 干扰
_switching = true
_ended = false // 重置结束标记
_ended = false
_stopped = false // 重置停止标记
appInstance.globalData.activeContent = content
appInstance.globalData.currentTime = 0
@@ -170,12 +173,13 @@ function togglePlay() {
if (appInstance.globalData.isPlaying) {
bgAudioManager.pause()
} else {
// 音频已自然播放完毕,或 src 被系统回收 → 从头重新播放
// 音频已结束 / 被系统停止(浮窗关闭) / src 被回收 → 重新播放
var srcEmpty = false
try { srcEmpty = !bgAudioManager.src } catch (e) { srcEmpty = true }
if (_ended || srcEmpty) {
if (_ended || _stopped || srcEmpty) {
_ended = false
_stopped = false
playContent(appInstance.globalData.activeContent)
} else {
bgAudioManager.play()