diff --git a/app.json b/app.json index 5a23a61..8ea3446 100644 --- a/app.json +++ b/app.json @@ -30,7 +30,11 @@ "pages/managelicenseplate/managelicenseplate", "pages/payrule/payrule", "pages/game/index", +<<<<<<< Updated upstream "pages/grade/grade" +======= + "pages/index/gameentry/gentry" +>>>>>>> Stashed changes ], "tabBar": { "color": "#9F9F9F", diff --git a/assets/img/gameentry.png b/assets/img/gameentry.png new file mode 100644 index 0000000..e26f5a7 Binary files /dev/null and b/assets/img/gameentry.png differ diff --git a/components/banner/index.wxss b/components/banner/index.wxss index 6bf9449..a16fa9a 100644 --- a/components/banner/index.wxss +++ b/components/banner/index.wxss @@ -4,8 +4,7 @@ height: 260rpx; overflow: hidden; margin:-126rpx auto 0; - border-radius:16rpx; - z-index: 10000; + border-radius:16rpx; box-shadow: 0 6px 20px 0 rgba(0,0,0,0.15); } .index-slide, @@ -18,7 +17,6 @@ border-radius:16rpx; overflow: hidden; position: relative; - z-index: 100; } .index-slide-view .dots{ @@ -28,7 +26,6 @@ bottom: 20rpx; display: flex; justify-content: center; - z-index: 10000; } .index-slide-view .dots .dot{ margin: 0 8rpx; diff --git a/config/config.js b/config/config.js index d41fcf9..d0cf556 100755 --- a/config/config.js +++ b/config/config.js @@ -141,9 +141,17 @@ var config = { * title * 描述 */ +<<<<<<< Updated upstream getWeapNote: '/mall/getWeapNote', scoreLevelInfo: '/mall/scoreLevelInfo', getWeRunData: '/user/getWeRunData' +======= + getWeapNote:'/mall/getWeapNote', + /** + * 小程序获取游戏路径 + */ + getGame:'/game/getOne' +>>>>>>> Stashed changes }, weapp: { diff --git a/pages/game/index.js b/pages/game/index.js index ba0e231..c72605e 100644 --- a/pages/game/index.js +++ b/pages/game/index.js @@ -1,14 +1,54 @@ +const Http = require("../../utils/HttpBasics"); +const config = require("../../config/config"); let app = getApp(); Page({ data: { token:'', url:'https://game.youlane.cn/luckCard/index.html' }, - onLoad() { - console.log("http://10.11.195.31:8080/luckCard/?token="+app.globalData.token) - this.setData({ - // url:"https://game.youlane.cn/luckCard/index.html?token="+app.globalData.token, - url:"http://10.11.195.31:8080/luckCard/?token="+app.globalData.token - }); + 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:"https://game.youlane.cn/luckCard/index.html?token="+app.globalData.token, + // url: "http://10.11.195.31:8080/luckCard/?token=" + app.globalData.token + }); + } } }); \ No newline at end of file diff --git a/pages/game/index.wxml b/pages/game/index.wxml index 77a6354..9f2ecf2 100644 --- a/pages/game/index.wxml +++ b/pages/game/index.wxml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/pages/index/gameentry/gentry.js b/pages/index/gameentry/gentry.js new file mode 100644 index 0000000..567a2f2 --- /dev/null +++ b/pages/index/gameentry/gentry.js @@ -0,0 +1,18 @@ + +var app = getApp() +Page({ + data: { + flag: false + }, + gotogame: function () { + wx.navigateTo({ + url: '../game/index', + }) + }, + a: function () { + this.setData({ flag: false }) + }, + closeGame: function () { + this.setData({ flag: true }) + } +}) \ No newline at end of file diff --git a/pages/index/gameentry/gentry.json b/pages/index/gameentry/gentry.json new file mode 100644 index 0000000..2176e13 --- /dev/null +++ b/pages/index/gameentry/gentry.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + + } +} \ No newline at end of file diff --git a/pages/index/gameentry/gentry.wxml b/pages/index/gameentry/gentry.wxml new file mode 100644 index 0000000..3622f69 --- /dev/null +++ b/pages/index/gameentry/gentry.wxml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/pages/index/gameentry/gentry.wxss b/pages/index/gameentry/gentry.wxss new file mode 100644 index 0000000..7e04d61 --- /dev/null +++ b/pages/index/gameentry/gentry.wxss @@ -0,0 +1,27 @@ +.b1{ + position:fixed; + width:100%; + height:100%; + top:0px; + background:rgba(0,0,0,0.8); + overflow: hidden; +} +.t_w{ + position:relative; +} +.b2{ + width: 90%; + margin:35% auto; + overflow: hidden; + border-radius: 10rpx; +} +.t_image{ + width: 100%; + display: block; + margin: 0 auto; +} +.cancel_icon{ + position: absolute; + right: 30rpx; + top: -30rpx; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index b78bc2d..529c16a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -9,6 +9,7 @@ Page({ title:'', desc:'', scrollTop: 0, + showGame:false, page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 }, swiperChange: function(e) { @@ -126,6 +127,11 @@ Page({ }) .then(res => { app.globalData.token = res.data.token; + if (res.data.token){ + that.setData({ + showGame: true + }) + } Http.setToken(res.data.token); that.checkUserCarStatus(); that.getUserInfo(); diff --git a/pages/index/index.json b/pages/index/index.json index adcf946..2151e63 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -2,7 +2,8 @@ "usingComponents": { "c-banner": "../../components/banner/index", "c-rushToBuy": "./rushToBuy/index", - "c-coupons": "./coupons/index" + "c-coupons": "./coupons/index", + "g-entry": "./gameentry/gentry" }, "navigationBarTitleText": "首页", "enablePullDownRefresh": true diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 9de6e1a..cb27007 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,10 +1,11 @@ - + 新用户专享神秘礼物 独家福利,抢完即止 + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index f6b3a0e..8a6b9a9 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -29,13 +29,11 @@ page { position: relative; width: 750rpx; height: 200rpx; - z-index: 10000000; } .game text { display: block; position: relative; - z-index: 100; } .game text:nth-of-type(1) { @@ -61,5 +59,4 @@ page { right: 0; top: 0; bottom: 0; - z-index: 10; }