// miniprogram/pages/suishoupai/suishoupai.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    url:'',
    projectId:'',
    loginName:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    /**
     * 获取缓存数据
     */
    wx.getStorage({
      key: 'userinfo',
      success: res => {
        // this.setData({
        //   url:"http://127.0.0.1:8091/weixin/sspManage/goListPage?projectId="+ app.globalData.projectId +"&loginName="+ res.data.loginName +"&projectName=" + app.globalData.projectName
        // })
        this.setData({
          url:"https://cf.makalu.cc/weixin/sspManage/goListPage?projectId="+ app.globalData.projectId +"&loginName="+ res.data.loginName +"&projectName=" + app.globalData.projectName
        })
      },
      fail: res =>{
        wx.redirectTo({
          url: '../login/login'
        })  
      }
    })
  },
})