![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
Hao-Z-Y
come on
展开
-
小程序生命周期
通俗的讲,生命周期就是指一个对象的生老病死。 从软件的角度来看,生命周期指程序从创建、到开始、暂停、唤起、停止、卸载的过程。下面从一下三个方面介绍微信小程序的生命周期:应用生命周期、页面生命周期、应用生命周期影响页面生命周期应用生命周期 用户首次打开小程序,触发 onLaunch(全局只触发一次)。 小程序初始化完成后,触发onShow方法,监听小程序显示。 ...原创 2019-02-21 18:14:28 · 232 阅读 · 0 评论 -
清除小程序swiper组件的滚动条
结构如图:css样式:.section-area ::-webkit-scrollbar { width: 0; height: 0; color: transparent;}原创 2019-04-30 11:13:33 · 599 阅读 · 0 评论 -
小程序Tab切换
懒得去接口重新写了,如果有需要的自己去一下接口wxml:<!-- order.wxml --><view class="swiper-tab"> <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav"> 待支...原创 2019-05-22 16:54:11 · 733 阅读 · 0 评论 -
小程序自定弹窗
wxml<view bindtap="showRule">点击出现弹窗</view><!-- 弹窗 --><view class="cover {{isRuleTrue?'isRuleShow':'isRuleHide'}}"> <view class="window"> <image class="PopupWi...原创 2019-05-22 17:17:59 · 153 阅读 · 0 评论 -
小程序手动获取用户信息
wxml:<view class="Box"> <image class="avatar" src="{{userInfo.avatarUrl}}"></image> <text>{{userInfo.nickName}}</text> <button size="mini" type="primary" plain="...原创 2019-05-23 09:47:36 · 447 阅读 · 0 评论 -
小程序事件传参
button绑定事件:<button size="default" type="primary" plain="true" bindtap="send" data-id="{{id}}" data-read-id="{{readId}}">事假传参</button>传递参数:send(e) { console.log(e); console....原创 2019-05-27 16:16:23 · 1137 阅读 · 0 评论 -
小程序已授权之后,自动获取用户信息
index.wxml:<view class="Box"><button wx:if="{{canIUser && !hasUserInfo}}" size="mini" type="primary" plain="true" loading="true" open-type="getUserInfo" bindgetuserinfo="getUserIn...原创 2019-05-23 11:55:06 · 5452 阅读 · 0 评论