C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1001 B

  1. const Http = require("../../utils/HttpBasics");
  2. const config = require("../../config/config");
  3. let app = getApp();
  4. Page({
  5. data: {
  6. token:'',
  7. url:''
  8. },
  9. onShareAppMessage: function (res) {
  10. app.globalData.previewFlag = true
  11. let _this=this;
  12. return {
  13. title: '小游戏',
  14. path: 'pages/index/index',
  15. success: function (res) {
  16. // 转发成功
  17. },
  18. fail: function (res) {
  19. // 转发失败
  20. }
  21. }
  22. },
  23. onShow: function () {
  24. app.globalData.havePlayEd=true;
  25. },
  26. onLoad(options) {
  27. if (options.share){
  28. }else{
  29. console.log(options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id)
  30. this.setData({
  31. url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
  32. // url: 'http://10.100.10.74:8080/guaguale/' + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
  33. });
  34. }
  35. }
  36. });