当前位置:网站首页>Smart business card applet business card details page function implementation key code
Smart business card applet business card details page function implementation key code
2022-04-23 08:08:00 【mon_ star°】
Smart card applet
Key codes for realizing the function of business card details page
One click Copy information function
Copy to clipboard
wx.getClipboardData({
success (res){
console.log(res.data)
}
})
One touch dialing function
Make a phone call
wx.makePhoneCall({
phoneNumber: '1340000' // Just for the sample , Not a real phone number
})
Positioning and navigation function
Use wechat built-in map to view the location
wx.getLocation({
type: 'gcj02', // Return can be used for wx.openLocation Longitude and latitude of
success (res) {
const latitude = res.latitude
const longitude = res.longitude
wx.openLocation({
latitude,
longitude,
scale: 18
})
}
})
Save to phone book
Add contacts to phone book . The user can choose to use the form as 「 New contacts 」 or 「 Add to existing contacts 」 The way , Write in the phone system address book .
wx.addPhoneContact({
firstName: ifirstName,
mobilePhoneNumber: mobilePhoneNumber,
weChatNumber: weChatNumber,
organization: organization,
title: title,
addressStreet: addressStreet,
email: email
});
Forward sharing function
Initiate forwarding within the page . By giving button Component set properties open-type="share", It can be triggered after the user clicks the button Page.onShareAppMessage event , Related components :button.
onShareAppMessage: function () {
// return custom share data when user share.
},
版权声明
本文为[mon_ star°]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230642308519.html
边栏推荐
- Chapter IV intangible assets
- BUUCTF [ACTF2020 新生赛]Include1
- Hierarchical output binary tree
- 1+x云计算中级--脚本搭建读写分离
- SAP tr manual import system operation manual
- KCD_ EXCEL_ OLE_ TO_ INT_ Convert reports an error sy subrc = 2
- Construction of middleman environment mitmproxy
- Buuctf misc brush questions
- Intranet penetration series: icmpsh of Intranet tunnel
- Three minutes to teach you to use Houdini fluid > > to solve particle fluid droplets
猜你喜欢
MySQL -- the secret of lock -- how to lock data
Buctf MISC brossage
Sto with billing cross company inventory dump return
SAP self created table log function is enabled
Principle of sentinel integrating Nacos to update data dynamically
MySQL--锁的奥秘--数据怎么锁
内网渗透系列:内网隧道之pingtunnel
vivo,硬件安全的爱与雷霆
Go语学习笔记 - 异常处理 | 从零开始Go语言
Go语学习笔记 - 结构体 | 从零开始Go语言
随机推荐
Implementation principle of instanceof
Move layout (Flex layout, viewport label)
Intranet penetration series: icmptunnel of Intranet tunnel (by master dhavalkapil)
LeetCoed18. 四数之和
Intranet penetration series: pingtunnel of Intranet tunnel
BUFFCTF文件中的秘密1
内网渗透系列:内网隧道之dnscat2
数据库之MySQL——基本常用查询命令
strcat()、strcpy()、strcmp()、strlen()
Face to face summary 2
Redis transaction implements optimistic locking principle
C 输出一种二维数组,特点如下。
Talking about distributed storage from ES, mongodb, redis and rocketmq
The displayed amount of ABAP ALV is inconsistent with the exported amount
thinkphp6+jwt 实现登录验证
【编程实践/嵌入式比赛】嵌入式比赛学习记录(二):基于TCP的图片流传输
在线YAML转XML工具
Buuctf misc brush questions
[Effective Go 中文翻译]函数篇
Internal network security attack and defense: a practical guide to penetration testing (VII): cross domain attack analysis and defense