Files
xl-mobile/src/utils/uils.js

26 lines
512 B
JavaScript
Raw Normal View History

2025-03-25 16:35:39 +08:00
export const showToast = (options) => {
if (typeof options === 'string') {
uni.showToast({
title: options,
icon: 'none',
}).then();
} else {
uni.showToast(options).then();
}
}
export const isWXWeb = () => {
const userAgent = navigator.userAgent;
return userAgent.includes('MicroMessenger');
}
2025-03-26 19:10:41 +08:00
export const toPage = (url) => {
uni.reLaunch({
url: url,
}).then();
}
2025-03-27 15:38:21 +08:00
export const backPage = () => {
window.history.back();
}