微信小程序—小知识点

121 阅读1分钟

云函数定时推送消息

zhuanlan.zhihu.com/p/541427647

实现消息订阅

小程序订阅消息

wx.requestSubscribeMessage

wx.requestSubscribeMessage 体验用户不能收到吗?

全局变量(globalData)和缓存(StorageSync)的区别和用法

blog.csdn.net/qq_29644709…

跳转到TabBar页面用 wx.switchTab(url)

获取头像昵称

developers.weixin.qq.com/miniprogram…

高度自适应屏幕

www.ay1.cc/article/167…

阻止事件冒泡

blog.csdn.net/weixin_4426…

通过点击事件传参

blog.csdn.net/Shids_/arti…

微信小程序获取时间new Date()详细介绍

微信小程序获取时间new Date()详细介绍

时间戳转换成年月日、时分秒

blog.csdn.net/weixin_4580…

data赋值总结

blog.csdn.net/tfnmdmx/art…

获取dom元素

  1. 通过wx.createSelectorQuery()获取dom元素
  2. 给想要使用的对象绑定事件,输出e对象,就能拿到该对象的一些信息
var query = wx.createSelectorQuery();
query.select('.v1').boundingClientRect();
query.exec(function (res) {
  //res就是 所有标签为v1的元素的信息 的数组
  console.log(res);  
  //取高度
  console.log(res[0].height);
  })