C端小程序
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

63 linhas
1.5 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. console.log(e,1234565432)
  11. },
  12. onShareAppMessage: function (res) {
  13. let _this=this;
  14. return {
  15. title: '富茂小游戏',
  16. path: 'pages/index/index',
  17. success: function (res) {
  18. // 转发成功
  19. },
  20. fail: function (res) {
  21. // 转发失败
  22. console.log(666)
  23. }
  24. }
  25. },
  26. onShow: function () {
  27. // console.log(app.globalData.havePlayEd)
  28. app.globalData.havePlayEd=true
  29. let num = wx.getStorageSync('couponNum');
  30. if (num == 'couponNum') {
  31. wx.showTabBarRedDot({
  32. index: 2
  33. })
  34. };
  35. },
  36. onLoad(options) {
  37. console.log(options,999999999)
  38. if(options.url){
  39. this.setData({
  40. url: options.url
  41. })
  42. }
  43. if (options.share){
  44. // wx.onShareAppMessage();
  45. }else{
  46. // Http.get({
  47. // url: config.api.getGame,
  48. // data: {
  49. // token: app.globalData.token,
  50. // }
  51. // })
  52. // .then(res => {
  53. // console.log(res.data, 333);
  54. // })
  55. this.setData({
  56. url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  57. // url: "http://10.11.195.31:8080/luckCard/" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  58. });
  59. }
  60. }
  61. });