zoukankan      html  css  js  c++  java
  • vue调用andriod方法

     methods: {
        isAndroid() {                    //判断机型是android
          const u = navigator.userAgent;
          const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //判断android
          return isAndroid;
        },
        totongxunlu() {    
          this.isAndroid();                  //调用判断是android的方法
          if (this.isAndroid()) {          
            android.intent2Im(  //如果是android,调用android方法,写法 android.方法名(需要传的参数)
              this.$cookies.get('imuserid').toString(),
              this.$cookies.get('imnickname').toString(),
              this.$cookies.get('imavatar').toString()
            ); //点击跳转通讯录
          }
        },
        tocamera(){
          android.intent2Scan()         点击事件调用android方法
        },
    }
     
  • 相关阅读:
    awk实例
    imagemagick imagick
    sort 命令
    cut 命令
    tr命令
    uniq
    多线程编程之Linux环境下的多线程(一)
    多线程编程之Windows同步方式
    多线程编程之数据访问互斥
    多线程编程之基础概念
  • 原文地址:https://www.cnblogs.com/ilylmy/p/13587083.html
Copyright © 2011-2022 走看看