zoukankan      html  css  js  c++  java
  • 微信小程序---设备信息

    1.学习大纲:

    2.获取系统信息:

     wx.getSystemInfo({
         success: function(res) {
           // success
           console.log(res)
         }
       })
      }

    3.获取系统信息同步接口:

    wx.getSystemInfoSync()

     

    4.监听重力感应数据,频率:5次/秒:

    wx.onAccelerometerChange(CALLBACK)

     

    5.监听罗盘数据,频率:5次/秒:

    wx.onCompassChange(CALLBACK)

     

    6.拨打电话:

     //事件处理函数
      bindViewTap: function() {
        wx.makePhoneCall({
          phoneNumber: '15300086553',
          success: function(res) {
            // success
          }
        })
      },

     

     

     

  • 相关阅读:
    this.$route和this.$router的区别
    IE不支持 Promise 解决办法
    滚动定位的多种方法
    css设置禁止文字被选中
    input标签内容改变的触发事件
    webpack-dev-server配置指南webpack3.0
    Object.keys方法之详解
    mac安装webpack失败
    vue2使用animate css
    http
  • 原文地址:https://www.cnblogs.com/pengsi/p/6443569.html
Copyright © 2011-2022 走看看