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.

44 lines
1.0 KiB

  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. bindGetMsg(e){
  10. },
  11. onShareAppMessage: function (res) {
  12. let _this=this;
  13. return {
  14. title: '富茂小游戏',
  15. path: 'pages/index/index',
  16. success: function (res) {
  17. // 转发成功
  18. },
  19. fail: function (res) {
  20. // 转发失败
  21. }
  22. }
  23. },
  24. onShow: function () {
  25. app.globalData.havePlayEd=true
  26. let num = wx.getStorageSync('couponNum');
  27. if (num == 'couponNum') {
  28. wx.showTabBarRedDot({
  29. index: 2
  30. })
  31. };
  32. },
  33. onLoad(options) {
  34. console.log(options,999)
  35. if (options.share){
  36. // wx.onShareAppMessage();
  37. }else{
  38. this.setData({
  39. url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
  40. // url: 'http://10.100.10.74:8080/guaguale/' + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id
  41. });
  42. }
  43. }
  44. });