|
@@ -296,42 +296,19 @@ export const callUp = (mobile) =>{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//没有库存时的语音播放 shish
|
|
//没有库存时的语音播放 shish
|
|
|
|
|
+const innerAudioNoStock = uni.createInnerAudioContext()
|
|
|
|
|
+innerAudioNoStock.autoplay = false
|
|
|
|
|
+innerAudioNoStock.volume = 1
|
|
|
|
|
+innerAudioNoStock.src = "/static/noStock.mp3"
|
|
|
export const noStockRemind = () =>{
|
|
export const noStockRemind = () =>{
|
|
|
- const innerAudioContext = uni.createInnerAudioContext()
|
|
|
|
|
- innerAudioContext.autoplay = true
|
|
|
|
|
- innerAudioContext.volume = 1
|
|
|
|
|
- innerAudioContext.src = "/static/noStock.mp3"
|
|
|
|
|
- innerAudioContext.onError(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onPause(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onStop(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onEnded(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ innerAudioNoStock.play()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const innerAudioContext = uni.createInnerAudioContext()
|
|
|
|
|
+innerAudioContext.autoplay = false
|
|
|
|
|
+innerAudioContext.src = "/static/hit.mp3"
|
|
|
export const hitVoice = () =>{
|
|
export const hitVoice = () =>{
|
|
|
- return true
|
|
|
|
|
- const innerAudioContext = uni.createInnerAudioContext()
|
|
|
|
|
- innerAudioContext.autoplay = true
|
|
|
|
|
- innerAudioContext.src = "/static/hit.mp3"
|
|
|
|
|
- innerAudioContext.onError(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onPause(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onStop(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
- innerAudioContext.onEnded(function() {
|
|
|
|
|
- innerAudioContext.destroy()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ innerAudioContext.play()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//去重 姜枫 2021.05.05
|
|
//去重 姜枫 2021.05.05
|