How does vue tell if a user opens a page in app?

how does vue judge whether the user opens the page in app? I am a novice. If you have any information, please tell me more. Thank you

Mar.19,2021

Let app send you a parameter via url? from=app


navigator.userAgent


is it possible to consider the problem differently, judging whether it comes from mobile or PC


js can only judge whether it is pc or mobile. The shell of app usually adds a field of * app to the navigator.userAgent for front-end judgment. The specific field should be asked about the development of the shell. There is nothing you can do about the front end.

Menu