var app = getApp() var that; var animation; Page({ data: { animationInfo:'', popupCx:'' }, onLoad() { that = this; }, onShow() { animation = dd.createAnimation({ duration: 200, timeFunction: "linear", }); }, onOpen(){ animation.translateY(0).step(); that.setData({ animationInfo: animation.export(), popupCx: 'container__mask' }); }, onClose() { animation.translateY(1200).step(); that.setData({ animationInfo: animation.export(), popupCx: '' }); }, });