const Http = require("../../utils/HttpBasics");
const config = require("../../config/config");
let app = getApp();
Page({
  data: {
    token:'',
    url:''
  },
  onShareAppMessage: function (res) {
    app.globalData.previewFlag = true
    let _this=this;
    return {
      title: '小游戏',
      path: 'pages/index/index',
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
  onShow: function () {
    app.globalData.havePlayEd=true;
  },
  onLoad(options) {
    if (options.share){
    }else{
      console.log(options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id)
      this.setData({
        url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
        // url: 'http://10.100.10.74:8080/guaguale/' + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
      });
    }
  }
});