Explorar el Código

游戏入口修改

tags/2.2.4
海洋之声 hace 6 años
padre
commit
e360eb1f2c
Se han modificado 14 ficheros con 130 adiciones y 16 borrados
  1. +4
    -0
      app.json
  2. BIN
      assets/img/gameentry.png
  3. +1
    -4
      components/banner/index.wxss
  4. +8
    -0
      config/config.js
  5. +46
    -6
      pages/game/index.js
  6. +1
    -1
      pages/game/index.wxml
  7. +18
    -0
      pages/index/gameentry/gentry.js
  8. +6
    -0
      pages/index/gameentry/gentry.json
  9. +9
    -0
      pages/index/gameentry/gentry.wxml
  10. +27
    -0
      pages/index/gameentry/gentry.wxss
  11. +6
    -0
      pages/index/index.js
  12. +2
    -1
      pages/index/index.json
  13. +2
    -1
      pages/index/index.wxml
  14. +0
    -3
      pages/index/index.wxss

+ 4
- 0
app.json Ver fichero

@@ -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",


BIN
assets/img/gameentry.png Ver fichero

Antes Después
Anchura: 750  |  Altura: 666  |  Tamaño: 60 KiB

+ 1
- 4
components/banner/index.wxss Ver fichero

@@ -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;


+ 8
- 0
config/config.js Ver fichero

@@ -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: {


+ 46
- 6
pages/game/index.js Ver fichero

@@ -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
});
}
}
});

+ 1
- 1
pages/game/index.wxml Ver fichero

@@ -1 +1 @@
<web-view src="{{url}}"></web-view>
<web-view src="{{url}}" bindmessage="bindGetMsg"></web-view>

+ 18
- 0
pages/index/gameentry/gentry.js Ver fichero

@@ -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 })
}
})

+ 6
- 0
pages/index/gameentry/gentry.json Ver fichero

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
}
}

+ 9
- 0
pages/index/gameentry/gentry.wxml Ver fichero

@@ -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>

+ 27
- 0
pages/index/gameentry/gentry.wxss Ver fichero

@@ -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;
}

+ 6
- 0
pages/index/index.js Ver fichero

@@ -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();


+ 2
- 1
pages/index/index.json Ver fichero

@@ -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


+ 2
- 1
pages/index/index.wxml Ver fichero

@@ -1,10 +1,11 @@
<view class="container">
<c-banner wx:key="unique" list="{{list}}" />
<c-rushToBuy />
<view class='game' bindtap="gotogame">
<view class='game' bindtap="gotogame" wx:if="{{showGame}}">
<image src='./../../assets/img/game.png' mode='widthFix'></image>
<text>新用户专享神秘礼物</text>
<text>独家福利,抢完即止</text>
</view>
<c-coupons id="lists" bind:myevent="onGetCode" />
<g-entry id="lists" wx:if="{{showGame}}" bind:myevent="" />
</view>

+ 0
- 3
pages/index/index.wxss Ver fichero

@@ -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;
}

Cargando…
Cancelar
Guardar