From 68ed022c95a06c3df233d992760bed46f21b3bb9 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 25 May 2026 14:43:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor(util):=20=E6=9B=BF=E6=8D=A2isWeiXin?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=B8=BAPlatform=E6=A8=A1=E5=9D=97=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将原isWeiXin函数的实现替换为调用Platform.isWeiXin(),并标记为废弃 --- common/js/util.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/common/js/util.js b/common/js/util.js index c04466f..cc2678a 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -489,17 +489,10 @@ export default { }, /** * 是否是微信浏览器 + * @deprecated 请使用 Platform.isWeiXin() */ isWeiXin() { - // #ifndef H5 - return false; - // #endif - var ua = navigator.userAgent.toLowerCase(); - if (ua.match(/MicroMessenger/i) == "micromessenger") { - return true; - } else { - return false; - } + return Platform.isWeiXin(); }, /** * 判断是否在微信小程序的web-view中打开H5