微信小程序二维码窗口:

<view class="btn" bindtap="powerDrawer" data-statu="open">button</view>
<!--mask-->
<view class="drawer_screen" bindtap="powerDrawer" data-statu="close" wx:if="{{showModalStatus}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}"> <!--drawer content-->
<view class="drawer_content">
<view class="contant-poup">
<view class="poup-box clearfix">
<view class="img-poup"><image src="../../images/user.jpg"></image></view>
<view class="text-box">
<view class="text-poup">Cindy</view>
<view class="position-poup">广东 深圳</view>
</view>
</view>
<view class="erweima-box"><view class="erweima-in"><image src="../../images/erweima.jpg"></image></view></view>
<view class="bot-text">扫一扫上面的二维码图案,关注我的益新闻中心</view>
</view>
</view>
</view>
Page({
data: {
showModalStatus: false
},
powerDrawer: function (e) {
var currentStatu = e.currentTarget.dataset.statu;
this.util(currentStatu)
},
util: function (currentStatu) {
/* 动画部分 */
// 第1步:创建动画实例
var animation = wx.createAnimation({
duration: , //动画时长
timingFunction: "linear", //线性
delay: //0则不延迟
}); // 第2步:这个动画实例赋给当前的动画实例
this.animation = animation; // 第3步:执行第一组动画
animation.opacity().rotateX(-).step(); // 第4步:导出动画对象赋给数据对象储存
this.setData({
animationData: animation.export()
}) // 第5步:设置定时器到指定时候后,执行第二组动画
setTimeout(function () {
// 执行第二组动画
animation.opacity().rotateX().step();
// 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
this.setData({
animationData: animation
}) //关闭
if (currentStatu == "close") {
this.setData(
{
showModalStatus: false
}
);
}
}.bind(this), ) // 显示
if (currentStatu == "open") {
this.setData(
{
showModalStatus: true
}
);
}
} })

最新文章

  1. [LintCode] Longest Common Prefix 最长共同前缀
  2. Oracle管理磁盘空间和资源
  3. Jquery 在页面加载后执行的几种方式
  4. JS向光标指定位置插入内容
  5. linux下.run文件的安装与卸载
  6. windows下python 编码问题
  7. 实现zbar扫描二维码的时候就把照片存储出来的办法
  8. android 项目中使用到的网络请求框架以及怎样配置好接口URL
  9. Lucene.Net 2.3.1开发介绍 —— 二、分词(一)
  10. [原创] linux deepin 2014.1下编译putty
  11. SQL Server--导入和导出向导
  12. 解决mysql 1864 主从错误
  13. 法国总统放大招,用“分身术”竞选总统 全息3d 网
  14. web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true
  15. 转载:使用Tornado+Redis维护ADSL拨号服务器代理池
  16. g++ 学习笔记
  17. SAP MM MM17里不能修改物料主数据&#39;Purchasing Value Key&#39;字段值?
  18. spring 测试类test测试方法
  19. 【Hadoop 分布式部署 九:分布式协作框架Zookeeper架构 分布式安装部署 】
  20. django csrf使用教程,解决Forbidden (403)CSRF verification failed. Request aborted.

热门文章

  1. 030:spaceless和autoescape 标签
  2. 【leetcode】885. Boats to Save People
  3. Prometheus + Grafana 监控SpringBoot应用
  4. SpringBoot整合MyBatis-Plus实现快速业务功能开发
  5. java.nio.channels.IllegalBlockingModeException
  6. 4412 移植x264并且YUV422转x264
  7. (转)Python3 zip() 函数
  8. 《图解设计模式》读书笔记5-1 composite模式
  9. 使用Xmanager远程CentOS 7服务器(XDMCP)
  10. Python 操作 mongodb 亿级数据量使用 Bloomfilter 高效率判断唯一性 例子