|
- const Http = require("../../utils/HttpBasics");
- const config = require("../../config/config");
- let app = getApp();
- Page({
- data: {
- token:'',
- url:''
- },
- bindGetMsg(e){
- console.log(e,1234565432)
- },
- onShareAppMessage: function (res) {
- let _this=this;
- return {
- title: '自定义转发标题',
- path: 'pages/game/index',
- success: function (res) {
- // 转发成功
- _this.setData({
- url: "https://game.youlane.cn/luckCard/index.html?token=" + app.globalData.token +'&forwardIf=true',
- // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + '&forwardIf=true'
- });
- },
- fail: function (res) {
- // 转发失败
- console.log(666)
- _this.setData({
- url: "https://game.youlane.cn/luckCard/index.html?token=" + app.globalData.token +'&forwardIf=true',
- // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + '&forwardIf=true'
- });
- }
- }
- },
- onLoad(options) {
- console.log(options,999999999)
- if (options.share){
- // wx.onShareAppMessage();
- }else{
- // Http.get({
- // url: config.api.getGame,
- // data: {
- // token: app.globalData.token,
- // }
- // })
- // .then(res => {
- // console.log(res.data, 333);
- // })
- this.setData({
- // url: options.url + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
- url: "http://10.11.195.31:8080/luckCard/" + "?token=" + app.globalData.token + "&gameId=" + options.gameId + "&id=" + options.id,
- });
- }
- }
- });
|