Browse Source

订单详情页面游戏入口找回

tags/2.3.0
海洋之声 6 years ago
parent
commit
c6c8afee96
1 changed files with 37 additions and 2 deletions
  1. +37
    -2
      pages/order/detail/index.js

+ 37
- 2
pages/order/detail/index.js View File

@@ -13,7 +13,9 @@ Page({
orderId: null, orderId: null,
//存储计时器 //存储计时器
setInter: "", setInter: "",
mystatus: ''
mystatus: '',
staticGamedata: {},
showIf: false
}, },




@@ -46,6 +48,39 @@ Page({
}); });
} }
}, },
gotogame: function () {
let that = this;
wx.navigateTo({
url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId,
})
},
// 获取游戏
getStaticGame(token) {
let _this = this;
Http.get({
url: config.api.getGame,
data: {
triggleAction: 3
}
}).then(res => {
if (res.data.id) {
_this.setData({
showIf: true
})
}
_this.setData({
staticGamedata: res.data
})
})
.catch(err => {
wx.showToast({
title: err.errMsg,
icon: 'none',
duration: 2000,
mask: false
});
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@@ -69,7 +104,7 @@ Page({
that.setData({ that.setData({
order: res.data order: res.data
}); });
that.getStaticGame()
//createDate 创建时间 //createDate 创建时间
var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss"); var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss");
that.setData({ that.setData({


Loading…
Cancel
Save