|
|
@@ -311,32 +311,31 @@ export const callUp = (mobile) =>{
|
|
|
|
|
|
//没有库存时的语音播放 shish
|
|
|
export const noStockRemind = () =>{
|
|
|
- const innerAudioContext = uni.createInnerAudioContext()
|
|
|
- innerAudioContext.autoplay = false
|
|
|
- innerAudioContext.src = "/static/noStock.mp3"
|
|
|
- innerAudioContext.volume = 1
|
|
|
- innerAudioContext.onPlay()
|
|
|
- innerAudioContext.onError()
|
|
|
- innerAudioContext.onPause(function() {
|
|
|
- innerAudioContext.destroy()
|
|
|
- })
|
|
|
- innerAudioContext.play()
|
|
|
+ if(uni.getSystemInfoSync().platform != 'windows'){
|
|
|
+ const innerAudioContext = uni.createInnerAudioContext()
|
|
|
+ innerAudioContext.autoplay = true
|
|
|
+ innerAudioContext.src = "/static/noStock.mp3"
|
|
|
+ innerAudioContext.volume = 1
|
|
|
+ innerAudioContext.onPlay()
|
|
|
+ innerAudioContext.onError()
|
|
|
+ innerAudioContext.onPause(function() {
|
|
|
+ innerAudioContext.destroy()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//点击声效 shish
|
|
|
export const hitRemind = () =>{
|
|
|
- //微信PC端会报错,不要使用
|
|
|
- //#ifdef APP-PLUS
|
|
|
- const innerAudioContext = uni.createInnerAudioContext()
|
|
|
- innerAudioContext.autoplay = false
|
|
|
- innerAudioContext.src = "/static/hit.mp3"
|
|
|
- innerAudioContext.onPlay()
|
|
|
- innerAudioContext.onError()
|
|
|
- innerAudioContext.onPause(function() {
|
|
|
- innerAudioContext.destroy()
|
|
|
- })
|
|
|
- innerAudioContext.play()
|
|
|
- //#endif
|
|
|
+ if(uni.getSystemInfoSync().platform != 'windows'){
|
|
|
+ const innerAudioContext = uni.createInnerAudioContext()
|
|
|
+ innerAudioContext.autoplay = true
|
|
|
+ innerAudioContext.src = '/static/hit.mp3'
|
|
|
+ innerAudioContext.onPlay()
|
|
|
+ innerAudioContext.onError()
|
|
|
+ innerAudioContext.onPause(function() {
|
|
|
+ innerAudioContext.destroy()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//去重 姜枫 2021.05.05
|