@@ -65,8 +65,9 @@ App({ | |||
}, | |||
globalData: { | |||
urlRoot: "https://dongfengqichen.jiyou-tech.com/",//测试接口根目录 | |||
// urlRoot: "",//接口根目录 | |||
urlStatic:"https://www.jiyou-tech.com/2020/496_qichen/static",//静态资源根目录 | |||
// urlRoot: "https://xing.venucia.com/api/",//接口根目录 | |||
urlStatic: "https://www.jiyou-tech.com/2020/496_qichen/static",//测试静态资源根目录 | |||
// urlStatic: "https://xingb.venucia.com/resource",//静态资源根目录 | |||
openid: "",//OPENID | |||
friendOpenid:"",//推荐人的openid | |||
session_key: "",//session_key |
@@ -37,7 +37,8 @@ Page({ | |||
kvurlH:0, | |||
showAppointment:false, | |||
placing:false, | |||
buyState:false | |||
buyState:false, | |||
isStartAdvertisingFunState:false | |||
}, | |||
onLoad: function (options) { | |||
if (app.globalData.isFirstLogin){ | |||
@@ -362,28 +363,8 @@ Page({ | |||
app.globalData.kvurl = res.data.kvurl; | |||
app.globalData.isFirstLogin = false; | |||
setTimeout(() => { | |||
setTimeout(() => { | |||
const query = wx.createSelectorQuery() | |||
query.select('.kvurlImg').boundingClientRect() | |||
query.selectViewport().scrollOffset() | |||
query.exec((res)=>{ | |||
if (res.data && res.data[0]) { | |||
this.setData({ | |||
kvurlH: res.data[0].height | |||
}) | |||
app.globalData.kvurlH = res.data[0].height; | |||
} | |||
}) | |||
},200) | |||
this.setData({ | |||
isStartAdvertising: 0 | |||
}) | |||
setTimeout(()=>{ | |||
this.setData({ | |||
isStartAdvertisingShow:false, | |||
}) | |||
},1000); | |||
}, 3000); | |||
this.isStartAdvertisingFun(); | |||
}, 2000); | |||
} | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
@@ -392,6 +373,33 @@ Page({ | |||
} | |||
},this); | |||
}, | |||
isStartAdvertisingFun:function(){ | |||
if (this.data.isStartAdvertisingFunState){ | |||
return; | |||
} | |||
this.data.isStartAdvertisingFunState = true; | |||
setTimeout(() => { | |||
const query = wx.createSelectorQuery() | |||
query.select('.kvurlImg').boundingClientRect() | |||
query.selectViewport().scrollOffset() | |||
query.exec((res) => { | |||
if (res.data && res.data[0]) { | |||
this.setData({ | |||
kvurlH: res.data[0].height | |||
}) | |||
app.globalData.kvurlH = res.data[0].height; | |||
} | |||
}) | |||
}, 200) | |||
this.setData({ | |||
isStartAdvertising: 0 | |||
}) | |||
setTimeout(() => { | |||
this.setData({ | |||
isStartAdvertisingShow: false, | |||
}) | |||
}, 1000); | |||
}, | |||
getHomeBanner: function () {//获取banner | |||
app.wxRequest(app.globalData.urlRoot + "home/getHomeBanner", {}, res => { | |||
if (res.code == 200) { |
@@ -67,5 +67,5 @@ | |||
</view> | |||
<tabBar wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"></tabBar> | |||
<!-- <view wx:if="{{isStartAdvertisingShow}}" class='imgBg' catchtouchmove="ture"></view> --> | |||
<image wx:if="{{isStartAdvertisingShow}}" mode="widthFix" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||
<image wx:if="{{isStartAdvertisingShow}}" bindtap="isStartAdvertisingFun" mode="widthFix" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||
</view> |
@@ -128,7 +128,12 @@ Page({ | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
return app.sharePack(); | |||
return { | |||
title: '能抓到头等舱机票的神仙娃娃机,快来一起玩!', | |||
imageUrl: "", | |||
path: "/pages/luckyStar/luckyStar" | |||
} | |||
// return app.sharePack(); | |||
}, | |||
closeRule:function(){//关闭游戏玩法 | |||
this.setData({ | |||
@@ -526,6 +531,11 @@ Page({ | |||
}) | |||
} | |||
}, | |||
enterIndex:function(){ | |||
wx.reLaunch({ | |||
url: '/pages/index/index' | |||
}) | |||
}, | |||
getBuyState: function () {//查询是否已下订 | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/getBuyState", {}, res => { | |||
if (res.code == 200) { |
@@ -80,7 +80,7 @@ | |||
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType2.png?v=002'}}"></image> | |||
<image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<view class="btnsGroup" style="justify-content:{{buyState && certificationInfo?'center':'space-between'}}"> | |||
<image class="luckyBtns" wx:if="{{!buyState}}" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image> | |||
<image class="luckyBtns" bindtap="enterIndex" wx:if="{{!buyState}}" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image> | |||
<view class="startRegister" wx:if="{{buyState || certificationInfo}}"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/luckyPizeTip2.png'}}"></image> | |||
<button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> |