微信小程序杂记

1.动态获取input输入框的值
在这里插入图片描述
2.给每个点击的标签设置ID
在这里插入图片描述
3.取反
在这里插入图片描述
4.动态设置类发生改变(参考链接)https://jingyan.baidu.com/article/86112f13b8d6e827379787e9.html
5.css引入第三方字体(参考链接)https://jingyan.baidu.com/article/eae078276667611fed548562.html 微信引入外部的字体(参考链接)https://blog.csdn.net/qq_24985715/article/details/80857733
6.微信小程序接口数据

wx.request({
url:'后台接收参数的文件路径',
method:'传递方式,是GET还是POST',
data{//参数设置,例如要传参https://www.xxx.com/url.php?u=a
u:a
},
header{
'Content-Type': 'application/json' //GET方式是这个
},
header: { 
"Content-Type": "application/x-www-form-urlencoded" //POST方式是这个
},
success:function(res){//请求成功之后要做什么
console('请求成功')
},
fail:function(err){//请求失败之后要做什么
console('请求失败')
}
})

微信小程序——向后台接口传数据,前后台数据交互参考链接(https://blog.csdn.net/qq_39109182/article/details/102934428?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.edu_weight&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.edu_weight
7.登录 (参考资料)
https://www.cnblogs.com/zhangxuetao/p/12978820.html
8.获取手机授权

<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"> </button>
Page({ 
    getPhoneNumber: function(e) { 
        console.log(e.detail.errMsg) 
        console.log(e.detail.iv) 
        console.log(e.detail.encryptedData) 
    } 
})

9.手机号码解密 参考链接(https://blog.csdn.net/weixin_41818665/article/details/79509792)
(https://www.kejipro.cn/newsview/20190422_663.html)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值