diff --git a/pages/index/index.js b/pages/index/index.js
index 2a93585..8861287 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -16,6 +16,7 @@ Page({
played:false,//从游戏页面跳回首页返回true
havePlayEd: app.globalData.havePlayEd,
staticGamedata:{},
+ showIf:false,
page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载
},
swiperChange: function(e) {
@@ -249,6 +250,11 @@ Page({
}
}).then(res => {
console.log(res.data,77777)
+ if (res.data.id){
+ _this.setData({
+ showIf:true
+ })
+ }
_this.setData({
gamedata:res.data
})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 0a8e6b7..85edb56 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -3,7 +3,7 @@
-
+
新用户专享神秘礼物
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index f09ac8b..6517277 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -13,7 +13,9 @@ Page({
orderId: null,
//存储计时器
setInter: null,
- mystatus: null
+ mystatus: null,
+ staticGamedata:{},
+ showIf:false
},
@@ -74,7 +76,7 @@ Page({
that.setData({
order: res.data
});
-
+ that.getStaticGame()
//createDate 创建时间
var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss");
console.log(createDate);
@@ -83,7 +85,32 @@ 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,
+ token: token
+ }
+ }).then(res => {
+ if (res.data.id){
+ _this.setData({
+ showIf:true
+ })
+ }
+ _this.setData({
+ staticGamedata: res.data
+ })
+ })
+ },
/**
* 发起支付
*/
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 512859d..adefea4 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -69,4 +69,11 @@
+
+
+
+ 新用户专享神秘礼物
+ 独家福利,抢完即止
+
+
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index a4e85f1..b179df9 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -378,4 +378,48 @@ radio {
}
.active{
opacity: .6;
+}
+
+/* 游戏入口样式修改 */
+.game-entry{
+ width: 690rpx;
+ height: 140rpx;
+ margin: 0 auto;
+ border-radius: 14rpx;
+ box-shadow: 1px 4px 20px #C4C4C4;
+}
+.game {
+ position: relative;
+ width: 750rpx;
+ height: 200rpx;
+ margin: 0 auto;
+ padding-top: 30rpx;
+ margin-top: 50rpx;
+ box-sizing: border-box;
+}
+.gameimg{
+ position: absolute;
+ right: 25rpx;
+ top: -14rpx;
+ width: 250rpx;
+}
+.game text {
+ display: block;
+ position: relative;
+}
+
+.game text:nth-of-type(1) {
+ display: inline-block;
+ padding-top: 39rpx;
+ padding-left: 70rpx;
+ font-size: 32rpx;
+ color: #333;
+ line-height: 36rpx;
+}
+
+.game text:nth-of-type(2) {
+ font-size: 24rpx;
+ color: #999;
+ line-height: 24rpx;
+ padding-left: 70rpx;
}
\ No newline at end of file