![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
小程序
一天一天来一趟
这个作者很懒,什么都没留下…
展开
-
微信小程序版本自动更新的方法
// 在app.js里写下以下代码 onLaunch () { if (wx.canIUse('getUpdateManager')) { const updateManager = wx.getUpdateManager() updateManager.onCheckForUpdate(function (res) { console.log('onCheckForUpdate====', res) // 请求完新版本信息的回调 if (res.ha...原创 2020-06-09 16:58:58 · 953 阅读 · 0 评论 -
微信小程序 自定义顶部导航
一、在app.json的window对象中定义导航的样式: 小程序开发文档中说明 "window":{ "navigationStyle": "custom" }, 这样你会发现所有页面的导航栏都不见了。如果还有其他页面需要导航栏的,那就模仿小程序的导航栏按照以下步骤。 二、首先要在app.json的onLaunch方法里面获取手机状态栏高度,全局定义导航高度navHeight: // 获取手机系统信息 wx.getSystemInfo({ succes..原创 2020-06-03 14:22:28 · 518 阅读 · 0 评论 -
微信授权操作
<button open-type="getUserInfo" lang="zh_CN" @getuserinfo="onGotUserInfo" >授权</button> onGotUserInfo(e){ if(e.detail.userInfo){ uni.setStorageSync('detail', e.detail); uni.showLoading(...原创 2020-06-01 14:49:36 · 347 阅读 · 0 评论