How does Baidu applet dial with one touch?

2831 readings

The one touch dialing function of Baidu applet needs to be coded in swan and js. The industrial monitoring station is taken as an example to illustrate how to use one touch dialing.

First bind the dialing function in swan, and then write the dialing function in the corresponding js. Note that the first contact number in the background set contact method is called in js. You need to fill in the phone number first, or you cannot dial.

Swan section:

 0.png

Js section:

calling: function (e) {

      let mobile = e.currentTarget.dataset.id;

      if (!mobile) {

            mobil = app.globaldata.settings.cfg_kefu_tel;

      }

      swan.makePhoneCall({

            phoneNumber: mobile,

            success: function () {

Console. log ("Call succeeded!")

            },

            fail: function () {

Console. log ("Call failed!")

            }

      })

}

 0 (1).png

 0.png

This article is written by Fuwei SEO Special Training Camp Edit and organize.

Search outside and focus SEO training And Saas service solutions around SEO. Over the past 10 years, more than 50000 students have gained technical improvement and contacts here.

SEO courses include mobile search, zero foundation station building, group station SEO thinking, Sowai 6 system, introduction to SEM, etc.

The registration time for Class B 190 is from May 15 to May 31. Please add enrollment customer service Xiaomo WeChat: seowy2021. WeChat code scanning to add customer service personnel

Our goal is to make it easy for non-technical personnel to learn Internet technology.

  • SEO exchange group of search members (free)

    WeChat code scanning to add customer service personnel
  • Applet operation communication group (free)

    WeChat code scanning to add customer service personnel
  • SEM bidding exchange group of search members (free)

    WeChat code scanning to add customer service personnel
  • Fuwei Student SEO Exchange Group (VIP)

    WeChat code scanning to add customer service personnel

Scan code to obtain resources

WeChat code scanning to add customer service personnel
  • SEO technology practice WeChat group

    WeChat code scanning to add customer service personnel
  • Major station traffic director group (review identity)

    WeChat code scanning to add customer service personnel
  • Google independent station English SEO group

    WeChat code scanning to add customer service personnel
  • SEO Team KPI Management Form

    WeChat code scanning to add customer service personnel
  • Friendly link group of industrial products website

    WeChat code scanning to add customer service personnel
  • Local life service industry friend chain group

    WeChat code scanning to add customer service personnel

Follow Mr. Fu Wei System learning group station SEO
become Internet operation and promotion masters

Master SEO skills, build the front end of the site, dominate the screen by groups of sites, get started with SEM, promote news sources
Processed in 0.143581 Second ,  52 querys.