C端小程序
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

43 Zeilen
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. if (options.share){
  35. // wx.onShareAppMessage();
  36. }else{
  37. this.setData({
  38. url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  39. // url: "https://game.youlane.cn/guaguale/index.html" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  40. });
  41. }
  42. }
  43. });