
微信小程序
smileNano
这个作者很懒,什么都没留下…
展开
-
微信小程序跳转
wx.redirectTo:关闭当前页,跳转到指定页;wx.navigateTo:保留当前页,跳转到指定页;wx.switchTap:只能用于跳转到tabbar页面,并关闭其他非tabbar页面。原创 2021-10-22 17:35:56 · 130 阅读 · 0 评论 -
微信小程序将数据存入本地并获取
//存入本地代码wx.setStorageSync('uid', res.data.userid) wx.setStorageSync("namePhoto", { "name": ..., "photo": ... })//获取本地存储的数据wx.getStorageSync('uid')原创 2021-10-19 16:20:41 · 1143 阅读 · 0 评论 -
微信小程序---获取当前手机高度
// wxml<view style="height:{{windowHeight}}px;width:100%;"> </view>//jsdata: { windowHeight: 0,},onLoad: function (options) { const sysInfo = wx.getSystemInfoSync() this.setData({ windowHeight: sysInfo.windowHeight, .原创 2021-10-18 15:13:30 · 820 阅读 · 0 评论 -
微信小程序向后端传递参数
传递格式:wx.request({ url:'后台接收参数的文件路径', method:'传递方式,是GET还是POST',data{ //参数设置},header{ 'Content-Type': 'application/json' //GET方式},header: { "Content-Type": "application/x-www-form-urlencoded" //POST方式},success:function(res){//请求成功之后要做什...原创 2021-07-05 11:52:30 · 3281 阅读 · 0 评论