瀏覽代碼

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

tags/2.3.0
海洋之声 6 年之前
父節點
當前提交
c6c8afee96
共有 1 個檔案被更改,包括 37 行新增2 行删除
  1. +37
    -2
      pages/order/detail/index.js

+ 37
- 2
pages/order/detail/index.js 查看文件

@@ -13,7 +13,9 @@ Page({
orderId: null,
//存储计时器
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({
order: res.data
});
that.getStaticGame()
//createDate 创建时间
var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss");
that.setData({


Loading…
取消
儲存