mo 3 anni fa
parent
commit
525c07206d
2 ha cambiato i file con 13 aggiunte e 11 eliminazioni
  1. 1 2
      src/views/rules/components/androidGuide.vue
  2. 12 9
      src/views/rules/guide.vue

+ 1 - 2
src/views/rules/components/androidGuide.vue

@@ -153,13 +153,12 @@ export default {
   },
   mounted() {
     var ua = navigator.userAgent.split("(")[1].split(")")[0];
-    console.log(ua);
     this.brand = "";
     var phone = [/MZ/gi, /mi/gi];
     if (phone[0].test(ua)) {
       this.brand = "meizu";
     } else if (phone[1].test(ua)) {
-      brand = "xiaomi";
+      this.brand = "xiaomi";
     } else {
       this.brand = "huawei";
     }

+ 12 - 9
src/views/rules/guide.vue

@@ -1,10 +1,13 @@
 <template>
     <div>
-        <androidGuide v-if="client == 'android'"/>
-         <iosGuide v-if="client == 'ios'"/>
+        <iosGuide v-if="client == 'ios'"/>
+        <androidGuide v-else/>
+         
+
     </div>
 </template>
 <script>
+ 
 import { browser }  from '@/common/common'
 import androidGuide from './components/androidGuide.vue'
 import iosGuide from './components/iosGuide.vue'
@@ -19,13 +22,13 @@ export default {
     },
     mounted(){
         document.title = '投屏引导'
-        // if(browser().android){
-        //     this.client = 'android'
-        // }else if(browser().iPhone){
-        //      this.client = 'ios'
-        // }else{
-        //     this.client = 'web'
-        // }
+        if(browser().android){
+            this.client = 'android'
+        }else if(browser().iPhone){
+             this.client = 'ios'
+        }else{
+            this.client = 'web'
+        }
 
         // browser().android || browser().iPhone
     }