16 lines
362 B
JavaScript
16 lines
362 B
JavaScript
|
|
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');
|
||
|
|
}
|