Просмотр исходного кода

微信PC端会报错,不要使用

shish 4 лет назад
Родитель
Сommit
955fdc9ced
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      ghsApp/src/utils/util.js

+ 3 - 0
ghsApp/src/utils/util.js

@@ -301,6 +301,8 @@ export const noStockRemind = () =>{
 
 //点击声效 shish
 export const hitRemind = () =>{
+	//微信PC端会报错,不要使用
+	//#ifdef APP-PLUS
 	const innerAudioContext = uni.createInnerAudioContext()
 	innerAudioContext.autoplay = false
 	innerAudioContext.src = "/static/hit.mp3"
@@ -310,6 +312,7 @@ export const hitRemind = () =>{
 		innerAudioContext.destroy()
 	})
 	innerAudioContext.play()
+	//#endif
 }
 
 //去重 姜枫 2021.05.05