xcx/pages/td/td.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

var app = getApp()
Page( {
  data: {
    imgUrl: getApp().globalData.imgUrl,
    page: 1, //页码
    list: [],
    winHeight: "", //窗口高度
    scrollLeft: 0, //tab标题的滚动条位置
    isGet: true, //是否可以请求
    hidden: true, //加载弹框显示 
    // tab切换  
    currentTab: 1,
  },
  onLoad: function () {
    var that = this;
    //  高度自适应
    wx.getSystemInfo({
      success: function (res) {
        var clientHeight = res.windowHeight,
          clientWidth = res.windowWidth,
          rpxR = 750 / clientWidth;
        var calc = clientHeight * rpxR - 180;
        that.setData({
          winHeight: calc,
          scrollHeight: res.windowHeight,
        });
      }
    });
    getApp().isLogin(function (data) {
      if (data) {
        console.log("我的判断是否默认登录=" + data);
        getApp().getUserByOpenId(function (res) {
          if (res) {
            that.get_user_fx_list();//查询分销商
          }
        });
      }
    });
  },
  //查询
  get_user_fx_list: function () {
    var that = this;
    var page = that.data.page + 1;
    that.setData({
      hidden: false,
      isGet: false,
    });
    wx.request({
      url: getApp().globalData.apiUrl,
      data: {
        action: 'get_user_fx_list',
        page: that.data.page,
        pageSize: 10,
        region: that.data.currentTab,
        user_id: wx.getStorageSync('userId'),
      },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
后面还有 81 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。