sui 5 лет назад
Родитель
Сommit
6ca3c13d33
6 измененных файлов: 82 добавлений и 39 удалений
  1. +6
    -1
      496_dongfengqichen/app.js
  2. +4
    -0
      496_dongfengqichen/pages/everyday/everyday.js
  3. +42
    -18
      496_dongfengqichen/pages/luckyStar/luckyStar.js
  4. +7
    -16
      496_dongfengqichen/pages/luckyStar/luckyStar.wxml
  5. +15
    -0
      496_dongfengqichen/pages/luckyStar/luckyStar.wxss
  6. +8
    -4
      496_dongfengqichen/pages/star/star.js

+ 6
- 1
496_dongfengqichen/app.js Просмотреть файл

@@ -17,6 +17,10 @@ App({
if (friendOpenid) {
this.globalData.friendOpenid = friendOpenid;
}
var certificationInfo = wx.getStorageSync('certificationInfo');
if (certificationInfo) {
this.globalData.certificationInfo = certificationInfo;
}
var userInfoData = wx.getStorageSync("userInfoData");
if (userInfoData){
this.globalData.userInfoData = {};
@@ -73,7 +77,8 @@ App({
mobileData:null,
userPhoneType:null,
kvurl:null,
kvurlH:0
kvurlH:0,
certificationInfo:false
},
// 获取openId
getOpenid: function (code) {

+ 4
- 0
496_dongfengqichen/pages/everyday/everyday.js Просмотреть файл

@@ -83,6 +83,10 @@ Page({
goScout() {
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => {
if (res.code == 200) {
if (!app.globalData.certificationInfo) {
app.globalData.certificationInfo = true;
wx.setStorageSync("certificationInfo", true);
}
app.globalData.certificationState = res.data.certificationState;
wx.navigateTo({
url: '/pages/scout/scout'

+ 42
- 18
496_dongfengqichen/pages/luckyStar/luckyStar.js Просмотреть файл

@@ -1,6 +1,7 @@
// pages/luckyStar/luckyStar.js
const app = getApp();
var query = null;
var certificationInfoValue = 0;
Page({

/**
@@ -45,7 +46,8 @@ Page({
startDown:-1,//游戏开始倒计时
clawType:false,//是否正在抓取
gameEnd:true,
ani:null
ani:null,
certificationInfo:false,//是否车主认证了
},

/**
@@ -66,6 +68,13 @@ Page({
userData: app.globalData.userInfoData
})
}
if (!app.globalData.certificationInfo){
this.getCertificationInfo();
}else{
this.setData({
certificationInfo: true
})
}
this.getAddress();
this.getGameAwardList();
},
@@ -297,15 +306,9 @@ Page({
pizeTip: 1
})
} else {
if (this.data.isAddress) {
this.setData({
pizeTip: 2
})
} else {
this.setData({
pizeTip: 3
})
}
this.setData({
pizeTip: 2
})
}
},800)
},
@@ -378,14 +381,11 @@ Page({
url: '../myCenter/myCenter',
})
},
invitation: function () {//邀请好友一起来玩

},
userRegister: function () {//立即注册,探索更多星探好礼
wx.navigateTo({
url: '../address/address',
})
},
// userRegister: function () {//立即注册,探索更多星探好礼
// wx.navigateTo({
// url: '../address/address',
// })
// },
closeWindow:function(){//关闭中奖
this.setData({
pizeTip:0,
@@ -490,5 +490,29 @@ Page({
})
this.getClaw();
},200);
},
getCertificationInfo:function(){
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => {
if(res.code==200){
this.setData({
certificationInfo:true
})
app.globalData.certificationInfo = true;
wx.setStorageSync("certificationInfo", true);
}else{
certificationInfoValue = res.code;
}
}, this);
},
enterStar:function(){//
if (certificationInfoValue == -307) {
wx.navigateTo({
url: '/pages/mobileVerification/mobileVerification'
})
} else if (certificationInfoValue == -308) {
wx.navigateTo({
url: '/pages/scout/register/register'
})
}
}
})

+ 7
- 16
496_dongfengqichen/pages/luckyStar/luckyStar.wxml Просмотреть файл

@@ -59,27 +59,18 @@
<view class="successGroup" wx:if="{{pizeTip==1}}">
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType1.png'}}"></image>
<image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image>
<!-- <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image>
<view class="titleGroup"></view>
<view class="successTip">幸运满格,大奖到手</view> -->
<image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image>
<view class="prizeName">{{endGameData.awardName}}</view>
<!-- <image class="prizePic" src="https://dongfengqichen.jiyou-tech.com/storage/app/public/award/17_1.png" mode="aspectFit"></image>
<view class="prizeName">NITORI电动太空舱按摩椅</view> -->
<image class="startRegister" style="margin:0;" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister" src="{{imgUrl+'/images/luckyPizeTip1.png'}}"></image>
<!-- <view class="startRegister" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister">立即领取</view> -->
</view>
<view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}">
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType2.png'}}"></image>
<view class="successGroup" wx:if="{{pizeTip==2}}">
<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>
<!-- <image class="successIcon" src="{{imgUrl+'/images/failIcon.png'}}"></image>
<view class="titleGroup"></view>
<view class="failText" style="margin-top:113rpx;">运气就差一点点</view>
<view class="failText" style="margin-top:20rpx;margin-bottom:82rpx;">重整旗鼓再来抓</view> -->
<view class="startRegister" wx:if="{{pizeTip==2}}">
<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></view>
<image class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}" src="{{imgUrl+'/images/luckyPizeTip3.png'}}"></image>
<!-- <view class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}">立即注册,探索更多星探好礼</view> -->
<view class="btnsGroup">
<image class="luckyBtns" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image>
<view class="luckyBtnsGap"></view>
<image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image>
</view>
</view>
</view>
<view class="downTimeGroup" wx:if="{{startDown!=-1}}">

+ 15
- 0
496_dongfengqichen/pages/luckyStar/luckyStar.wxss Просмотреть файл

@@ -401,4 +401,19 @@ view{
height:100%;
overflow: auto;
position:relative;
}
.btnsGroup{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
z-index: 9;
margin-top: 301rpx;
}
.luckyBtns{
width: 296rpx;
height: 50rpx;
}
.luckyBtnsGap{
height: 13rpx;
}

+ 8
- 4
496_dongfengqichen/pages/star/star.js Просмотреть файл

@@ -59,10 +59,14 @@ Page({
phonebolb:function(_phone){
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => {
if (res.code == 200) {
app.globalData.certificationState = res.data.certificationState;
wx.navigateTo({
url: '/pages/scout/scout'
})
if (!app.globalData.certificationInfo) {
app.globalData.certificationInfo = true;
wx.setStorageSync("certificationInfo", true);
}
app.globalData.certificationState = res.data.certificationState;
wx.navigateTo({
url: '/pages/scout/scout'
})
} else if (res.code == -307){
wx.navigateTo({
url: '/pages/mobileVerification/mobileVerification'

Загрузка…
Отмена
Сохранить