//index.js
//获取应用实例
const app = getApp()

Page({
  onShow() {
    wx.setNavigationBarTitle({
      title: '购房工具'
    })
  },
  data: {
    UserInfo: app.globalData.UserInfo, // 用户信息
    List: [{
      value: '购房资格测试',
      icon: '/assets/images/icon36.png',
    }, {
      value: '积分入学解读',
      icon: '/assets/images/icon37.png',
    }, {
      value: '房贷计算器',
      icon: '/assets/images/icon38.png',
    }, {
      value: '购房百科',
      icon: '/assets/images/icon39.png',
    }, {
      value: '关于银城地产',
      icon: '/assets/images/icon40.png',
    }]
  },
  TapItem(e) { // list点击事件
    if (e.currentTarget.dataset.index === 0) { // 购房资格测试
      wx.navigateTo({
        url: '/pages/SelfServiceTool/QualifyingTest/index',
      })
    } else if (e.currentTarget.dataset.index === 1) { // 积分入学解读

    } else if (e.currentTarget.dataset.index === 2) { // 房贷计算器
      wx.navigateTo({
        url: '/pages/SelfServiceTool/MortgageCalculator/index',
      })
    } else if (e.currentTarget.dataset.index === 3) { // 购房百科
      wx.navigateTo({
        url: '/pages/SelfServiceTool/Cyclopedia/index',
      })
    } else if (e.currentTarget.dataset.index === 4) { // 关于银城地产

    }
  }
})