service.js 776 Bytes
// components/tips/service.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },
  lifetimes: {

  },
  /**
   * 组件的初始数据
   */
  data: {
    disp:false,
    animation:'',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    show(){
      this.setData({
        disp:true,
        animation:'discountShow',
      })
      this.triggerEvent('event',{act:'show'})
    },
    hide(){
      this.setData({
        animation:'discountHide',
      })
      this.triggerEvent('event',{act:'hide'})
      setTimeout(()=>{
        this.setData({
          disp:false,
        })
      },300)
    },
    call(){
      this.triggerEvent('event',{act:'call'})
      wx.makePhoneCall({
        phoneNumber: '400-000-9690'
      })
    },
  }
})