소스 검색

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

shish 4 년 전
부모
커밋
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