微信
之前,项目中需要用到微信小程序获取用户openid的功能,特将代码及配置信息整理一下。本文介绍的方式是利用云平台开发的方式,因此需要先在微信后台开通云平台功能,这个功能是免费的。 1、创建function目录文件夹 在项目根目录创建function文件夹,然后右键创建nodejs云函数openid, ...
git clone git@github.com:xuedingmiaojun/wxappUnpacker.git npm install esprima npm install css-tree npm install cssbeautify npm install vm2 npm install ...
uni 编写微信小程序,uni中写定时器在小程序端会出现,页面更新不及时的情况 今天在项目中遇到了这个问题,苦苦找了2个小时, 下面以我在倒计时定时器中遇到的问题为例,如何去解决 for (let index in t.goodsList) { let timeLeave = new Date(t. ...
官方地址:https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html 选择图片以后,实际上图片的本地地址: http://tmp/rac1Gf3dvoNb27bf6bd54e09ef16 ...
Page({ /** * 页面的初始数据 */ data: { user:{id:0,name:'2'}, userArr:[{id:0,name:'2'}] } ... }); 赋值user.name = 'test' 赋值userArr[0].name = 'test' let that = t ...
创建getperiod.js class GetPeriod{ constructor() { this.now = new Date(); this.nowYear = this.now.getYear(); //当前年 this.nowMonth = this.now.getMonth(); / ...
在pages.json中: { "path":"pages/index/index", "style":{ "navigationBarTitleText":"首页", "H5":{ "titleNView":false } } } ...
新版的微信获取用户信息 HTML 部分<button @click="dianpushow()">新版本</button> <button open-type="getUserInfo" @getuserinfo="onGotUserInfo">旧版本</button> //javascript 部 ...
wxml: <!--导航条--><view class="navbar"> <text wx:for="{{navbar}}" data-idx="{{index}}" class="item {{currentTab==index ? 'active' : ''}}" wx:key="unique ...
先看效果实现 需求分析 这个是使用 PopupRoute这个路由类进行实现 大概原理就是利用PopupRpute这个类进行改造,然后自定义一个页面,页面内镶嵌一个动画类,用来实现缩放动画 大概分为三部分,PopupRoute改造,弹出页面设置,动画类设置。 为什么选择PopupRoute? 可以镶嵌 ...