utils/common.js
@@ -277,7 +277,7 @@ } }, complete() { complete: () => { setTimeout(() => { uni.hideLoading() if (errorTip != null) { @@ -303,6 +303,13 @@ } innerAudioContext.play(); // 播放音频 } replaceWithFunction(str, handler) { return str.replace(/\{(.+?)\}/g, (match, key) => { // 调用处理函数,传入匹配到的键 return handler(key, match); }); } } export const CommonUtils = new commonUtils()