uniapp中启动本机打电话的功能,电话的失败回掉可以在启动失败的情况下再一次调用,直到成功 ,主要就是uni.makePhoneCall

511 阅读1分钟

uniapp中启动本机打电话的功能,电话的失败回掉可以在启动失败的情况下再一次调用,直到成功 ,主要就是uni.makePhoneCall

          phoneNumber: e, //仅为示例
          // phoneNumber: '18520407023', //仅为示例
          success: (res) => {
            this.$refs.popup.hide() // 隐藏
            // console.log(res)


          },
          // 失败回调
          fail: (res) => {
            console.log(res)
            this.call_phone(); //重复调用一次
          }
        });