12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import { loginByUserInfo } from './../../utils/login'
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- visible: Boolean
- },
- /**
- * 组件的初始数据
- */
- data: {
- show: false
- },
- ready () {
- this.showPannel()
- },
- /**
- * 组件的方法列表
- */
- methods: {
- bindgetuserinfo () {
- loginByUserInfo().then(res => {
- this.triggerEvent('loginSuccess')
- })
- },
- showPannel () {
- this.animation = wx.createAnimation({
- duration: 200,
- timingFunction: 'ease'
- })
- this.animation.translateY(8).step()
- this.setData({
- animationData: this.animation.export(),
- show: true
- })
- },
- hide () {
- this.triggerEvent('hide')
- }
- }
- })
|