import { Subscribe } from "@/utils/subscribe";
import { setStorage } from "@/utils/util";

Page({
  data: {
    columns: [
      { title: "我的收藏", width: "100px", dataIndex: "name" },
      { title: "我的点赞", width: "200px", dataIndex: "count" },
      { title: "我的评论", width: "300px", dataIndex: "desc" },
    ],
    data: [
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
      // { name: "张三", count: 1, desc: "11111" },
    ],
  },
  change() {
    setStorage("isLogin", 1);
    Subscribe.set("isLogin", "zzzuz");
    // wx.navigateTo({ url: "/pages/my/my" });
  },
  searchChange(e: any) {
    console.log(e);
  },
  ok() {
    console.log("ok");
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad() {},

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {},

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    wx.hideHomeButton();
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {},

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {},

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {},

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
});
