index.js 1.46 KB
// packageIndex/pages/integral/index/noOpen/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    scoreSummary:{
      type:Object,
      value: {},
      observer(n){

      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    navStyle : "background-color: transparent;",
    listNav:[
      {
        icon:'wallet',
        text:'积分钱包'
      },
      {
        icon:'account',
        text:'收款账户'
      }
    ],
    havoNOData:[
      {
        text:'累计收益积分',
        key:'totalRewardScore',
      },
      {
        text:'累计提现积分',
        key:'totalWithdrawalScore',
      },
      {
        text:'累计兑换积分',
        key:'totalGoodExchangeScore',
      }
    ],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    go(e){
      let {index} =e.currentTarget.dataset;
      const thisPage = wx.p.router.getPageInstance()
      let arr=[
        ()=>{
          // 积分钱包
          thisPage.open()
        },
        ()=>{
          thisPage.toBank()
        }
      ]
      arr[index]()
    },
    //提现记录
    goRecord(){
      const thisPage = wx.p.router.getPageInstance()
      thisPage.jump()
    },
    toCash(){
      const thisPage = wx.p.router.getPageInstance()
      thisPage.toCash()
    },
    navbarReady(e) {
      let {
        height
      } = e.detail
      this.setData({
        navHeight: height
      })
    },
    back() {
      wx.p.router.back()
    },
  }
})