// components/guide/guide.ts
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    realName: {
      type: Boolean,
      value: false
    },
    title: {
      type: String,
      value: '我的主页'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    show: false,
    current: 1,
    steps: [{
      // url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/33fc395162ea4ee58483d056627b6217:附件_1660788247.png', height: '778rpx',
      url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/41a16263956d45fda44214e58543d586:附件_1665473077.png', height: '778rpx',
    },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/0fa3a164228247f4839e72a1b3b550d5:附件_1660788307.png', height: '903rpx', },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/7b237c62ba7f4981a0bf7f384334fc75:附件_1660788523.png', height: '950rpx', },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/b80807ac97fb48dda9c576ae73e1ed1d:附件_1660788465.png', height: '1050rpx', },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/cf95856c688642e1ad71d541ba29759f:附件_1660788570.png', height: '1076rpx', },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/addf3101aac14c2f877c80e1b3289339:附件_1660788609.png', height: '989rpx', },
    { url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/ca4c058b91674c9aafe21d5275646392:附件_1660788643.png', height: '909rpx', }
    ],
    tagShow: true
  },

  /**
   * 组件的方法列表
   */
  methods: {
    guideShow() {
      if (!this.data.realName) {
        wx.redirectTo({
          url: '/pages/login/login'
        })
      } else {
        wx.redirectTo({
          url: '/pages/my/my'
        })
      }
    },
    goSearch() {
      wx.reLaunch({
        url: '/pages/index/index'
      })
    },
    guideHide() {
      this.setData({
        show: false
      })
    },
    stepChange(e) {
      const { current } = e.detail
      this.setData({
        current: current + 1
      })
    },
    closeTag() {
      console.log('closeTag');

      this.setData({
        tagShow: false
      })
    }
  }
})
