|
@@ -298,10 +298,9 @@ export const callUp = (mobile) =>{
|
|
|
//没有库存时的语音播放 shish
|
|
//没有库存时的语音播放 shish
|
|
|
export const noStockRemind = () =>{
|
|
export const noStockRemind = () =>{
|
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
|
- innerAudioContext.autoplay = false
|
|
|
|
|
|
|
+ innerAudioContext.autoplay = true
|
|
|
innerAudioContext.volume = 1
|
|
innerAudioContext.volume = 1
|
|
|
innerAudioContext.src = "/static/noStock.mp3"
|
|
innerAudioContext.src = "/static/noStock.mp3"
|
|
|
- innerAudioContext.play()
|
|
|
|
|
innerAudioContext.onError(function() {
|
|
innerAudioContext.onError(function() {
|
|
|
innerAudioContext.destroy()
|
|
innerAudioContext.destroy()
|
|
|
})
|
|
})
|
|
@@ -318,9 +317,8 @@ export const noStockRemind = () =>{
|
|
|
|
|
|
|
|
export const hitVoice = () =>{
|
|
export const hitVoice = () =>{
|
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
|
- innerAudioContext.autoplay = false
|
|
|
|
|
|
|
+ innerAudioContext.autoplay = true
|
|
|
innerAudioContext.src = "/static/hit.mp3"
|
|
innerAudioContext.src = "/static/hit.mp3"
|
|
|
- innerAudioContext.play()
|
|
|
|
|
innerAudioContext.onError(function() {
|
|
innerAudioContext.onError(function() {
|
|
|
innerAudioContext.destroy()
|
|
innerAudioContext.destroy()
|
|
|
})
|
|
})
|