util.js 238 B

12345678910
  1. export const isWeiXin = () => {
  2. const ua = navigator.userAgent.toLowerCase();
  3. if (ua.match(/MicroMessenger/i) == "micromessenger") {
  4. //在微信中打开
  5. console.log('微信');
  6. return true
  7. } else {
  8. return false
  9. }
  10. }