import common from '../../utils/util';
import main from '../../utils/main';

const app = getApp();

Page({
  data: {
    ImagePath: app.globalData.uploadImageUrl,
  },
  onLoad: function (options) {
    if (options && options.UserID){
      app.globalData.userInfo={};
      app.globalData.userInfo.UserID=options.UserID;
    }

    this.setData({
      Containnerheight: main.getWindowHeight(),
    });
  },
  goto:function(e){
    var url=e.currentTarget.dataset.url;
    wx.navigateTo({
      url: url,
    });
  },
  onShareAppMessage: function () {
    return {
      title: app.globalData.ShareTitle,
      path: app.globalData.SharePath + '?type=marketing&UserID=' + app.globalData.userInfo.UserID,
      imageUrl: app.globalData.uploadImageUrl+"web/program_screenshot_promotion.png",
    }
  },
});