欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 微信开发 > ECSHOP 小程序底部滑出效果,淡入效果,底部菜单导航,加入购物车 ...

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

ECSHOP 小程序底部滑出效果,淡入效果,底部菜单导航,加入购物车 ...

发布时间:2021-01-05  

ECSHOP 小程序底部滑出效果,淡入效果,底部菜单导航,加入购物车 ...

ECSHOP 小程序底部滑出效果,淡入效果,底部菜单导航,加入购物车 ...

ECSHOP 小程序底部滑出效果,淡入效果,底部菜单导航,加入购物车 演示扫描二维码

收藏一个商品之后 -> 个人中心 -> 我的收藏 查看演示效果。

QQ:4292423

上先效果图。

JS(这里的JS我是直接用别人的,CSDN有下,自己处理了下样式)

[javascript] view plain copy

 

let animationShowHeight = 300;  

  

Page({  

  data: {  

    showModalStatus: false,  

    imageHeight: 0,  

    imageWidth: 0  

  },  

  

  showModal: function () {  

    // 显示遮罩层  

    var animation = wx.createAnimation({  

      duration: 200,  

      timingFunction: "linear",  

      delay: 0  

    })  

    this.animation = animation  

    animation.translateY(animationShowHeight).step()  

    this.setData({  

      animationData: animation.export(),  

      showModalStatus: true  

    })  

    setTimeout(function () {  

      animation.translateY(0).step()  

      this.setData({  

        animationData: animation.export()  

      })  

    }.bind(this), 0)  

  },  

  hideModal: function () {  

    // 隐藏遮罩层  

    var animation = wx.createAnimation({  

      duration: 200,  

      timingFunction: "linear",  

      delay: 0  

    })  

    this.animation = animation;  

    animation.translateY(animationShowHeight).step()  

    this.setData({  

      animationData: animation.export(),  

    })  

    setTimeout(function () {  

      animation.translateY(0).step()  

      this.setData({  

        animationData: animation.export(),  

        showModalStatus: false  

      })  

    }.bind(this), 200)  

  },  

  onShow: function () {  

    let that = this;  

    wx.getSystemInfo({  

      success: function (res) {  

        animationShowHeight = res.windowHeight;  

      }  

    })  

  },  

})  



CSS

[css] view plain copy

 

.add {  

  background#f60;  

  color#fff;  

  floatright;  

  padding14rpx 35rpx;  

  margin-right20rpx;  

}  

  

.can {  

  background#eee;  

  floatright;  

  padding14rpx 35rpx;  

  margin-right0rpx;  

}  

  

.container-column {  

  display: flex;  

  flex-direction: column;  

  width100%;  

  background-colorwhite;  

}  

  

.buydes-container {  

  display: flex;  

  height100%;  

  justify-content: space-between;  

}  

  

.buydes-dialog-container {  

  width100%;  

  height100%;  

  justify-content: space-between;