任一存 2 years ago
parent
commit
b96c54ccf7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main.js

+ 2 - 1
src/main.js

@@ -23,10 +23,11 @@ document.body.appendChild(audioNode)
 
 const uaParser = new UAParser()
 const uaInfo = uaParser.getResult()
-console.log(uaInfo)
+console.log('user agent: ', uaInfo)
 Vue.prototype.$uaInfo = uaInfo
 if (uaInfo.device.type === 'mobile') {
   Vue.prototype.$isMobile = true
+  document.getElementById('app').classList.add('mobile')
 } else {
   Vue.prototype.$isMobile = false
 }