const app = getApp();
Component({
  data: {},
  properties: {
    // 抽屉高度
    recordList: {
      type: Array,
      value: [],
    },
    isLogin: {
      type: Boolean,
      value: true
    },
    storeJobListSearchForm: {
      type: Object,
      value: {},
    },
    agencyStatus: {
      type: Boolean,
      value: true
    },
    hasUserInfo: {
      type: Number,
      value: 0
    },
    selectJob: {
      type: Boolean,
      value: false
    }

  },
  methods: {

    goLogin () {
      wx.setStorageSync("comeFromPage", "firstBill");
      wx.navigateTo({
        url: "/pages/login/index",
      });
    },
    stoptap (e) {
      return false;
    },
    getPhoneNumber (e) {
      let that = this
      that.triggerEvent("getPhoneNumber", e.detail);
    },
    collectPaste (e) {
      let that = this
      console.log('collectPaste', e);
      that.triggerEvent("collectPaste", e.currentTarget);

    },
    getUserInfoBtn (e) {
      let that = this
      console.log('getUserInfoBtn', e);
      that.triggerEvent("getUserInfoBtn", e.currentTarget);

    },
    goDetail (e) {
      console.log(e);
      var that = this;
      if (that.data.selectJob) {
        that.triggerEvent("getDetail", e.currentTarget);

      } else {
        wx.navigateTo({
          url: `../detail/index?storeJobId=${e.currentTarget.dataset.id}&jobClassify=${e.currentTarget.dataset.info.jobClassify}` ,
        });
      }

    },
  }
})