@@ -23,6 +23,20 @@ App({ | |||
this.globalData.userInfoData.avatarUrl = userInfoData.avatarUrl; | |||
this.globalData.userInfoData.nickName = userInfoData.nickName; | |||
} | |||
var userPhoneType = wx.getStorageSync('userPhoneType'); | |||
if (userPhoneType) { | |||
this.globalData.userPhoneType = userPhoneType; | |||
} else { | |||
this.getPhoneType(); | |||
} | |||
}, | |||
getPhoneType() {//获取手机类型 | |||
wx.getSystemInfo({ | |||
success: res => { | |||
wx.setStorageSync("userPhoneType", res.platform); | |||
this.globalData.userPhoneType = res.platform; | |||
} | |||
}) | |||
}, | |||
wxLogin() { | |||
wx.login({ | |||
@@ -52,6 +66,7 @@ App({ | |||
userInfoData:null, | |||
certificationState:0,//1车主,2合伙人,3同事 | |||
mobileData:null, | |||
userPhoneType:null, | |||
}, | |||
// 获取openId | |||
getOpenid: function (code) { |
@@ -17,6 +17,7 @@ Page({ | |||
}, | |||
isAddress: false,//是否有地址 | |||
phoneInputShow: false,//是否显示电话输入框 | |||
marginT:0, | |||
}, | |||
/** | |||
@@ -24,6 +25,11 @@ Page({ | |||
*/ | |||
onLoad: function (options) { | |||
app.globalData.nowPage = 4; | |||
if (app.globalData.userPhoneType=="ios"){ | |||
this.setData({ | |||
marginT:-20 | |||
}) | |||
} | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
} else { |
@@ -21,7 +21,7 @@ | |||
</view> | |||
<view class="msgGroup addressDetail"> | |||
<view class="msgTitle">详细地址:</view> | |||
<textarea class="msgInput addressTextarea" style="margin:-1rpx;padding:1rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | |||
<textarea class="msgInput addressTextarea" style="margin-top:{{marginT}}rpx;" bindinput="getAddressDetail" value="{{submitData.addressDetail}}"></textarea> | |||
</view> | |||
</view> | |||
<view class="saveAddress" bindtap="submitAddress">保存</view> |
@@ -111,7 +111,6 @@ Page({ | |||
}) | |||
}, | |||
openGameRule: function () {//打开游戏玩法 | |||
console.log(this.data.gameState); | |||
if(!this.data.gameState){ | |||
this.setData({ | |||
ruleShow: true | |||
@@ -290,7 +289,9 @@ Page({ | |||
app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.data.isAddress = true; | |||
this.setData({ | |||
isAddress:true | |||
}) | |||
} | |||
} | |||
}, this) |
@@ -51,11 +51,11 @@ | |||
<!-- <view class="prizeName">头等舱机票一张</view> --> | |||
<image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | |||
<view class="prizeName">{{endGameData.awardName}}</view> | |||
<view class="startRegister" wx:if="{{isAddress}}" bindtap="receive">立即领取</view> | |||
<view class="startRegister" wx:if="{{!isAddress}}" bindtap="userRegister">立即注册</view> | |||
<view class="startRegister" wx:if="{{(isAddress || endGameData.needAddress==0)}}" bindtap="receive">立即领取</view> | |||
<view class="startRegister" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister">立即注册</view> | |||
</view> | |||
<view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | |||
<image class="gameRuleClose" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
<image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
<image class="successIcon" src="{{imgUrl+'/images/failIcon.png'}}"></image> | |||
<view class="titleGroup"></view> | |||
<view class="failText" style="margin-top:113rpx;">运气就差一点点</view> |
@@ -222,8 +222,6 @@ Page({ | |||
wx.canvasToTempFilePath({ | |||
width:scale*444, | |||
height: scale * 817, | |||
// width: scale*this.data.windowW, | |||
// height: scale *this.data.windowH, | |||
canvasId: 'myCanvas', | |||
success: res => { | |||
this.data.posterUrl.push(res.tempFilePath); |
@@ -71,13 +71,12 @@ view{ | |||
z-index: 2; | |||
} | |||
.canvasDraw{ | |||
/* width:1776rpx; | |||
height:3268rpx; */ | |||
width:400%; | |||
height:400%; | |||
width:1776rpx; | |||
height:3268rpx; | |||
position: fixed; | |||
top: 0; | |||
left: -1776rpx; | |||
background-color: black; | |||
} | |||
.lookBigPic{ | |||
display: flex; |