This commit is contained in:
wtq
2026-07-28 14:04:34 +08:00
parent c98f292438
commit e716c15265
3 changed files with 41 additions and 10 deletions

View File

@@ -348,7 +348,8 @@ export default function orderRealTime() {
return '实际支付' return '实际支付'
} else { } else {
//报价 //报价
return '实际收入' // return '实际收入'
return '预计收益'
} }
} }
} else { } else {
@@ -357,7 +358,8 @@ export default function orderRealTime() {
return '平台结算' return '平台结算'
} else { } else {
//报价 //报价
return '实际收入' // return '实际收入'
return '预计收益'
} }
} }
}) })

View File

@@ -215,17 +215,46 @@ const goodCard = ref({ // 商品卡片
*/ */
const isVoice = ref<boolean>(false) const isVoice = ref<boolean>(false)
const voice = uni.createInnerAudioContext() const voice = uni.createInnerAudioContext()
// 全局音频实例,避免重复创建
let innerAudio:any = null
function playVoice(playUrl: string) { function playVoice(playUrl: string) {
if (uni.getSystemInfoSync().platform != 'android') // if (uni.getSystemInfoSync().platform != 'android')
return toast('ios系统不支持') // return toast('ios系统不支持')
// toast('正在播放音频')
// isVoice.value = true
// voice.src = playUrl
// voice.stop()
// voice.play()
// voice.onEnded(() => {
// isVoice.value = false
// })
toast('正在播放音频') toast('正在播放音频')
isVoice.value = true isVoice.value = true
voice.src = playUrl
voice.stop() // 销毁上一个播放器
voice.play() if (innerAudio) {
voice.onEnded(() => { innerAudio.stop()
innerAudio.destroy()
}
// 创建小程序原生音频上下文
innerAudio = uni.createInnerAudioContext()
innerAudio.src = playUrl
// 播放结束回调
innerAudio.onEnded(() => {
console.log('播放结束')
isVoice.value = false
innerAudio.destroy()
})
// 播放失败监听(关键,排查格式/地址错误)
innerAudio.onError((err:any) => {
console.error('音频播放失败', err)
toast('音频播放失败,格式不支持')
isVoice.value = false isVoice.value = false
}) })
innerAudio.play()
} }
/** /**

View File

@@ -153,7 +153,7 @@
<jx-price <jx-price
v-else v-else
color="#4fb433" color="#4fb433"
:price="sku.salePrice * sku.count * 0.7" :price="sku.salePrice * sku.count * 0.6"
/> />
</view> </view>
<view class="price" v-else> <view class="price" v-else>
@@ -162,7 +162,7 @@
color="#f84a82" color="#f84a82"
:price="sku.salePrice" :price="sku.salePrice"
/> />
<jx-price v-else color="#f84a82" :price="sku.salePrice * 0.7" /> <jx-price v-else color="#f84a82" :price="sku.salePrice * 0.6" />
</view> </view>
</view> </view>
</view> </view>