| @@ -30,7 +30,11 @@ | |||||
| "pages/managelicenseplate/managelicenseplate", | "pages/managelicenseplate/managelicenseplate", | ||||
| "pages/payrule/payrule", | "pages/payrule/payrule", | ||||
| "pages/game/index", | "pages/game/index", | ||||
| <<<<<<< Updated upstream | |||||
| "pages/grade/grade" | "pages/grade/grade" | ||||
| ======= | |||||
| "pages/index/gameentry/gentry" | |||||
| >>>>>>> Stashed changes | |||||
| ], | ], | ||||
| "tabBar": { | "tabBar": { | ||||
| "color": "#9F9F9F", | "color": "#9F9F9F", | ||||
| @@ -4,8 +4,7 @@ | |||||
| height: 260rpx; | height: 260rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| margin:-126rpx auto 0; | 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); | box-shadow: 0 6px 20px 0 rgba(0,0,0,0.15); | ||||
| } | } | ||||
| .index-slide, | .index-slide, | ||||
| @@ -18,7 +17,6 @@ | |||||
| border-radius:16rpx; | border-radius:16rpx; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| position: relative; | position: relative; | ||||
| z-index: 100; | |||||
| } | } | ||||
| .index-slide-view .dots{ | .index-slide-view .dots{ | ||||
| @@ -28,7 +26,6 @@ | |||||
| bottom: 20rpx; | bottom: 20rpx; | ||||
| display: flex; | display: flex; | ||||
| justify-content: center; | justify-content: center; | ||||
| z-index: 10000; | |||||
| } | } | ||||
| .index-slide-view .dots .dot{ | .index-slide-view .dots .dot{ | ||||
| margin: 0 8rpx; | margin: 0 8rpx; | ||||
| @@ -141,9 +141,17 @@ var config = { | |||||
| * title | * title | ||||
| * 描述 | * 描述 | ||||
| */ | */ | ||||
| <<<<<<< Updated upstream | |||||
| getWeapNote: '/mall/getWeapNote', | getWeapNote: '/mall/getWeapNote', | ||||
| scoreLevelInfo: '/mall/scoreLevelInfo', | scoreLevelInfo: '/mall/scoreLevelInfo', | ||||
| getWeRunData: '/user/getWeRunData' | getWeRunData: '/user/getWeRunData' | ||||
| ======= | |||||
| getWeapNote:'/mall/getWeapNote', | |||||
| /** | |||||
| * 小程序获取游戏路径 | |||||
| */ | |||||
| getGame:'/game/getOne' | |||||
| >>>>>>> Stashed changes | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| @@ -1,14 +1,54 @@ | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| const config = require("../../config/config"); | |||||
| let app = getApp(); | let app = getApp(); | ||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| token:'', | token:'', | ||||
| url:'https://game.youlane.cn/luckCard/index.html' | 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 | |||||
| }); | |||||
| } | |||||
| } | } | ||||
| }); | }); | ||||
| @@ -1 +1 @@ | |||||
| <web-view src="{{url}}"></web-view> | |||||
| <web-view src="{{url}}" bindmessage="bindGetMsg"></web-view> | |||||
| @@ -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 }) | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,6 @@ | |||||
| { | |||||
| "component": true, | |||||
| "usingComponents": { | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,9 @@ | |||||
| <view class="b1" hidden="{{flag}}"> | |||||
| <view class="t_w"> | |||||
| <view class="b2"> | |||||
| <icon type="cancel" size="40" color="rgb(0,255,255)" class='cancel_icon' bindtap="closeGame"/> | |||||
| <image class="t_image" mode='widthFix' src="../../../assets/img/gameentry.png" bindtap="gotogame"></image> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -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; | |||||
| } | |||||
| @@ -9,6 +9,7 @@ Page({ | |||||
| title:'', | title:'', | ||||
| desc:'', | desc:'', | ||||
| scrollTop: 0, | scrollTop: 0, | ||||
| showGame:false, | |||||
| page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | ||||
| }, | }, | ||||
| swiperChange: function(e) { | swiperChange: function(e) { | ||||
| @@ -126,6 +127,11 @@ Page({ | |||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| app.globalData.token = res.data.token; | app.globalData.token = res.data.token; | ||||
| if (res.data.token){ | |||||
| that.setData({ | |||||
| showGame: true | |||||
| }) | |||||
| } | |||||
| Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
| that.checkUserCarStatus(); | that.checkUserCarStatus(); | ||||
| that.getUserInfo(); | that.getUserInfo(); | ||||
| @@ -2,7 +2,8 @@ | |||||
| "usingComponents": { | "usingComponents": { | ||||
| "c-banner": "../../components/banner/index", | "c-banner": "../../components/banner/index", | ||||
| "c-rushToBuy": "./rushToBuy/index", | "c-rushToBuy": "./rushToBuy/index", | ||||
| "c-coupons": "./coupons/index" | |||||
| "c-coupons": "./coupons/index", | |||||
| "g-entry": "./gameentry/gentry" | |||||
| }, | }, | ||||
| "navigationBarTitleText": "首页", | "navigationBarTitleText": "首页", | ||||
| "enablePullDownRefresh": true | "enablePullDownRefresh": true | ||||
| @@ -1,10 +1,11 @@ | |||||
| <view class="container"> | <view class="container"> | ||||
| <c-banner wx:key="unique" list="{{list}}" /> | <c-banner wx:key="unique" list="{{list}}" /> | ||||
| <c-rushToBuy /> | <c-rushToBuy /> | ||||
| <view class='game' bindtap="gotogame"> | |||||
| <view class='game' bindtap="gotogame" wx:if="{{showGame}}"> | |||||
| <image src='./../../assets/img/game.png' mode='widthFix'></image> | <image src='./../../assets/img/game.png' mode='widthFix'></image> | ||||
| <text>新用户专享神秘礼物</text> | <text>新用户专享神秘礼物</text> | ||||
| <text>独家福利,抢完即止</text> | <text>独家福利,抢完即止</text> | ||||
| </view> | </view> | ||||
| <c-coupons id="lists" bind:myevent="onGetCode" /> | <c-coupons id="lists" bind:myevent="onGetCode" /> | ||||
| <g-entry id="lists" wx:if="{{showGame}}" bind:myevent="" /> | |||||
| </view> | </view> | ||||
| @@ -29,13 +29,11 @@ page { | |||||
| position: relative; | position: relative; | ||||
| width: 750rpx; | width: 750rpx; | ||||
| height: 200rpx; | height: 200rpx; | ||||
| z-index: 10000000; | |||||
| } | } | ||||
| .game text { | .game text { | ||||
| display: block; | display: block; | ||||
| position: relative; | position: relative; | ||||
| z-index: 100; | |||||
| } | } | ||||
| .game text:nth-of-type(1) { | .game text:nth-of-type(1) { | ||||
| @@ -61,5 +59,4 @@ page { | |||||
| right: 0; | right: 0; | ||||
| top: 0; | top: 0; | ||||
| bottom: 0; | bottom: 0; | ||||
| z-index: 10; | |||||
| } | } | ||||