Logo

GitLab

Sign in

tutorial / mini-app

  • Back to Group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • mini-app
  • official
  • page
  • API
  • pages
  • make-phone-call
  • make-phone-call.js
  • 自动登录,及配置文件修改
    15424199
    zhaoxing authored
    2017-08-14 14:07:50 +0800  
    Browse Code »
make-phone-call.js 478 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Page({
  data: {
    disabled: true
  },
  bindInput: function(e) {
    this.inputValue = e.detail.value

    if (this.inputValue.length > 0) {
      this.setData({
        disabled: false
      })
    } else {
      this.setData({
        disabled: true
      })
    }
  },
  makePhoneCall: function () {
    var that = this
    wx.makePhoneCall({
      phoneNumber: this.inputValue,
      success: function () {
        console.log("成功拨打电话")
      }
    })
  }
})