index.js 749 Bytes
Newer Older
程智春 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
// static/nativeComponents/FloatButton/index.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    datas: {
      type: Object
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    imgIcon : ''
  },
  ready(){
    this.setData({
      imgIcon: app.DFSImg(this.data.datas.componentData.backgroundImage, this.data.datas.componentData['sizeInfo']['width'] * 6, this.data.datas.componentData['sizeInfo']['width'] * 6,1)
    })
  },

  /**
   * 组件的方法列表
   */
  methods: {
侯体倬 committed
29
    clickHandler(e){
程智春 committed
30
      console.log('浮窗点击', this.data.datas.componentData.link)
侯体倬 committed
31
      app.trackCpn(e, this.data.datas.componentName)
程智春 committed
32 33 34 35
      app.$themeToLink(this.data.datas.componentData.link)
    }
  }
})