chore(util): 格式化util.js

This commit is contained in:
2026-01-13 14:39:22 +08:00
parent b043601a77
commit ee8c24cdf8

View File

@@ -94,7 +94,7 @@ export const checkTabBarActive = (linkUrl, currentPageRoute) => {
const currentPageRouteParts = currentPageRoute.split('/'); const currentPageRouteParts = currentPageRoute.split('/');
// console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts}); // console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
try { try {
// 二级页面 // 二级页面
if (linkUrlParts[2] === currentPageRouteParts[2]) { if (linkUrlParts[2] === currentPageRouteParts[2]) {
@@ -628,7 +628,6 @@ export default {
} else if (link.appid) { } else if (link.appid) {
// 跳转其他小程序 // 跳转其他小程序
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: link.appid, appId: link.appid,
path: link.page path: link.page
@@ -636,7 +635,6 @@ export default {
} else if (link.name == 'MOBILE' && !link.wap_url) { } else if (link.name == 'MOBILE' && !link.wap_url) {
// 拨打电话 // 拨打电话
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: link.mobile, phoneNumber: link.mobile,
success: (res) => { success: (res) => {
@@ -1180,7 +1178,7 @@ export default {
// 但是会包含uniacid参数所以这里通过uniacid参数来判断是否为快应用环境 // 但是会包含uniacid参数所以这里通过uniacid参数来判断是否为快应用环境
_isQuickApp = ua.indexOf('uniacid=') !== -1; _isQuickApp = ua.indexOf('uniacid=') !== -1;
} }
} catch (e) {} } catch (e) { }
if (!_isQuickApp) { if (!_isQuickApp) {
const systemInfo = this.getDeviceInfo(); const systemInfo = this.getDeviceInfo();
@@ -1200,8 +1198,8 @@ export default {
// #ifndef QUICKAPP-WEBVIEW-HUAWEI // #ifndef QUICKAPP-WEBVIEW-HUAWEI
const systemInfo = this.getDeviceInfo(); const systemInfo = this.getDeviceInfo();
return systemInfo.brand === 'HUAWEI' || systemInfo.manufacturer === 'HUAWEI' || return systemInfo.brand === 'HUAWEI' || systemInfo.manufacturer === 'HUAWEI' ||
(typeof qh !== 'undefined' && qh.platform === 'huawei'); (typeof qh !== 'undefined' && qh.platform === 'huawei');
// #endif // #endif
return true; return true;
}, },