C端小程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

54 строки
1.6 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/game/index',
  17. success: function (res) {
  18. // 转发成功
  19. _this.setData({
  20. url: "https://game.youlane.cn/luckCard/index.html?token=" + app.globalData.token +'&forwardIf=true',
  21. // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + '&forwardIf=true'
  22. });
  23. },
  24. fail: function (res) {
  25. // 转发失败
  26. console.log(666)
  27. _this.setData({
  28. url: "https://game.youlane.cn/luckCard/index.html?token=" + app.globalData.token +'&forwardIf=true',
  29. // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + '&forwardIf=true'
  30. });
  31. }
  32. }
  33. },
  34. onLoad(options) {
  35. console.log(options,999999999)
  36. if (options.share){
  37. // wx.onShareAppMessage();
  38. }else{
  39. // Http.get({
  40. // url: config.api.getGame,
  41. // data: {
  42. // token: app.globalData.token,
  43. // }
  44. // })
  45. // .then(res => {
  46. // console.log(res.data, 333);
  47. // })
  48. this.setData({
  49. // url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  50. url: "http://10.11.195.31:8080/luckCard/" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
  51. });
  52. }
  53. }
  54. });