会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
RainstormDy
博客园
首页
新随笔
联系
订阅
管理
2021年1月8日
微信小程序-了解async、await、promise
摘要: 1、async是什么 async用于声明异步的,常常用于处理回调函数。 async返回一个promise的对象,可以直接用.then,.catch来处理结果。 onLoad: function (options) { // 声明该方法为异步方法,会返回一个Promise对象 async functi
阅读全文
posted @ 2021-01-08 23:22 RainstormDy
阅读(1482)
评论(0)
推荐(0)
2020年11月12日
微信小程序-生命周期函数
摘要: onLoad: /** * 生命周期函数--监听页面加载 */ // 打开当前页面就执行,并且只执行一次,从其他页面跳过来时不会执行 // 常用作列表页跳转详情页,options接受参数 onLoad: function (options) { wx.showToast({ title: '成功',
阅读全文
posted @ 2020-11-12 12:02 RainstormDy
阅读(349)
评论(0)
推荐(0)
2020年11月8日
微信小程序-页面跳转
摘要: 跳转页面方法1:wxml文件中跳转 <navigator url="/pages/index2/index2" hover-class="navigator-hover">跳转到新页面</navigator> 跳转页面方法2:js文件中跳转 // 跳转页面 nav:function(){ wx.na
阅读全文
posted @ 2020-11-08 20:30 RainstormDy
阅读(85)
评论(0)
推荐(0)
2020年10月23日
微信小程序-表单提交
摘要: 通过表单提交数据到云数据库 //wxml文件 <form bindsubmit="bindFromsubmit"> <view> <text>你的姓名</text> <input type="text" placeholder="请输入你的姓名" bindinput="nameinput"></in
阅读全文
posted @ 2020-10-23 16:57 RainstormDy
阅读(591)
评论(0)
推荐(0)
2020年10月21日
微信小程序-轮播图
摘要: 轮播图功能 //wxml文件 <swiper class="swiper" indicator-dots="true" autoplay="false" circular="false" interval="3000" duration="1000"> <block wx:for="{{banner
阅读全文
posted @ 2020-10-21 22:59 RainstormDy
阅读(89)
评论(0)
推荐(0)
公告