refactor(util): 替换isWeiXin实现为Platform模块方法

将原isWeiXin函数的实现替换为调用Platform.isWeiXin(),并标记为废弃
This commit is contained in:
2026-05-25 14:43:34 +08:00
parent 22a89013d0
commit 68ed022c95

View File

@@ -489,17 +489,10 @@ export default {
}, },
/** /**
* 是否是微信浏览器 * 是否是微信浏览器
* @deprecated 请使用 Platform.isWeiXin()
*/ */
isWeiXin() { isWeiXin() {
// #ifndef H5 return Platform.isWeiXin();
return false;
// #endif
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}, },
/** /**
* 判断是否在微信小程序的web-view中打开H5 * 判断是否在微信小程序的web-view中打开H5