| @@ -28,7 +28,7 @@ App({ | |||
| openid: "",//OPENID | |||
| session_key: "",//session_key | |||
| openidSuccessFuc: null,//方法回调 | |||
| nowPage:'1',//当前tabBar | |||
| nowPage:'3',//当前tabBar | |||
| isRegister:false,//是否已注册 | |||
| userMobile:null,//用户手机号 | |||
| isFirstLogin:true,//是否为第一次登录 | |||
| @@ -6,6 +6,7 @@ | |||
| "pages/everyday/everyday", | |||
| "pages/logs/logs", | |||
| "pages/myCenter/myCenter", | |||
| "pages/luckyStar/luckyStar", | |||
| "pages/scout/register/register", | |||
| "pages/scout/share/share" | |||
| ], | |||
| @@ -34,6 +34,12 @@ Page({ | |||
| onLoad: function () { | |||
| if (app.globalData.isFirstLogin) { | |||
| this.getStartAdvertising(); | |||
| }else{ | |||
| if (app.globalData.openid) { | |||
| this.loadFun(); | |||
| } else { | |||
| app.globalData.openidSuccessFuc = this.loadFun; | |||
| } | |||
| } | |||
| }, | |||
| loadFun: function () { | |||
| @@ -267,14 +273,13 @@ Page({ | |||
| }, | |||
| getStartAdvertising: function () {//获取开屏广告 | |||
| app.wxRequest(app.globalData.urlRoot +"home/getStartAdvertising",{},res=>{ | |||
| if (app.globalData.openid) { | |||
| this.loadFun(); | |||
| } else { | |||
| app.globalData.openidSuccessFuc = this.loadFun; | |||
| } | |||
| if(res.code==200){ | |||
| if (app.globalData.openid) { | |||
| this.loadFun(); | |||
| } else { | |||
| app.globalData.openidSuccessFuc = this.loadFun; | |||
| } | |||
| this.setData({ | |||
| startAdvertisingUrl: res.data.picurl, | |||
| mainShow:true | |||
| @@ -0,0 +1,85 @@ | |||
| // pages/luckyStar/luckyStar.js | |||
| const app = getApp() | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| imgUrl: app.globalData.urlStatic,//图片路径 | |||
| ruleShow: false,//是否显示游戏玩法 | |||
| ruleCloseShow: true,//是否显示游戏玩法关闭按钮 | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| }, | |||
| closeRule:function(){//关闭游戏玩法 | |||
| this.setData({ | |||
| ruleShow:false | |||
| }) | |||
| }, | |||
| openGameRule: function () {//打开游戏玩法 | |||
| this.setData({ | |||
| ruleShow: true | |||
| }) | |||
| }, | |||
| strolClaw:function(){//开始控制爪子方向 | |||
| }, | |||
| endClaw:function(){//结束爪子动作 | |||
| } | |||
| }) | |||
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "navigationBarTitleText": "幸运星抓手", | |||
| "usingComponents": { | |||
| "tabBar": "../component/tabBar/index" | |||
| } | |||
| } | |||
| @@ -0,0 +1,39 @@ | |||
| <!--pages/luckyStar/luckyStar.wxml--> | |||
| <view class="all"> | |||
| <view class="main"> | |||
| <view class="gameMain"> | |||
| <image class="gameStarBg" src="{{imgUrl+'/images/gameStarBg.png'}}"></image> | |||
| <view class="gameTitle">幸运星抓手</view> | |||
| <view class="downTime">00:29</view> | |||
| <image class="gameClaw" src="{{imgUrl+'/images/gameClaw.png'}}"></image> | |||
| <image class="prizeIcon2" src="{{imgUrl+'/images/prizeIcon2.png'}}"></image> | |||
| <image class="prizeIcon1" src="{{imgUrl+'/images/prizeIcon1.png'}}"></image> | |||
| <view class="scrollText"> | |||
| <view class="scrollFrame"> | |||
| <view class="scrollView">恭喜XXX获得头等舱机票一张,恭喜XX获得20元美团代金券一张</view> | |||
| <view class="scrollView">恭喜XXX获得头等舱机票一张,恭喜XX获得20元美团代金券一张</view> | |||
| </view> | |||
| </view> | |||
| <view class="gameControlFrame"> | |||
| <view class="gameControlGroup"> | |||
| <view class="btnControlL" bindtouchstart="strolClaw" bindtouchend="endClaw" data-direction="L"></view> | |||
| <view class="btnControlR" bindtouchstart="strolClaw" bindtouchend="endClaw" data-direction="R"></view> | |||
| <view class="btnControlT" bindtouchstart="strolClaw" bindtouchend="endClaw" data-direction="T"></view> | |||
| <view class="btnControlB" bindtouchstart="strolClaw" bindtouchend="endClaw" data-direction="B"></view> | |||
| </view> | |||
| </view> | |||
| <view class="gameGetBtn"></view> | |||
| <view class="prizeLook">活动奖品</view> | |||
| </view> | |||
| <view bindtap="openGameRule" class="gameRuleBtn {{ruleShow?'gameRuleBtn2':''}}">游戏玩法</view> | |||
| <view class="gameTip">500元待领取</view> | |||
| <view class="gameRuleDesc" wx:if="{{ruleShow}}"> | |||
| <view class="ruleGroup"> | |||
| <image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | |||
| <image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
| <view class="gameStrat">开始游戏</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <tabBar></tabBar> | |||
| </view> | |||
| @@ -0,0 +1,234 @@ | |||
| /* pages/luckyStar/luckyStar.wxss */ | |||
| image{ | |||
| display: block; | |||
| } | |||
| .main{ | |||
| height: calc(100vh - 150rpx); | |||
| overflow: auto; | |||
| } | |||
| .gameRuleBtn{ | |||
| width:200rpx; | |||
| height:50rpx; | |||
| background-color:rgba(000,000,000,0.63); | |||
| position: fixed; | |||
| right: 0; | |||
| top: 164rpx; | |||
| border-top-left-radius: 30rpx; | |||
| border-bottom-left-radius: 30rpx; | |||
| font-size:26rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| text-align: center; | |||
| line-height: 50rpx; | |||
| } | |||
| .gameRuleBtn2{ | |||
| background-color: #28568B; | |||
| } | |||
| .gameTip{ | |||
| width:200rpx; | |||
| height:50rpx; | |||
| background-color:rgba(000,000,000,0.63); | |||
| position: fixed; | |||
| right: 0; | |||
| top: 240rpx; | |||
| border-top-left-radius: 30rpx; | |||
| border-bottom-left-radius: 30rpx; | |||
| font-size:26rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| text-align: center; | |||
| line-height: 50rpx; | |||
| } | |||
| .gameRuleDesc{ | |||
| position: fixed; | |||
| left: 0; | |||
| top: 0; | |||
| width: 100%; | |||
| height: calc(100vh - 150rpx); | |||
| background-color: rgba( 000, 000, 000, 0.3); | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| } | |||
| .ruleGroup{ | |||
| position: relative; | |||
| width: 487rpx; | |||
| height: 459rpx; | |||
| } | |||
| .gameRuleIcon{ | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .gameRuleClose{ | |||
| position: absolute; | |||
| top: 0rpx; | |||
| right: -10rpx; | |||
| width: 31rpx; | |||
| height: 29rpx; | |||
| } | |||
| .gameStrat{ | |||
| width:277rpx; | |||
| height:50rpx; | |||
| background-color: #355483; | |||
| font-size:21rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| line-height:50rpx; | |||
| text-align: center; | |||
| border-radius: 10rpx; | |||
| position: absolute; | |||
| bottom: 50rpx; | |||
| left: 50%; | |||
| transform: translateX(-50%); | |||
| } | |||
| .gameMain{ | |||
| position: relative; | |||
| width: 750rpx; | |||
| height: 1471rpx; | |||
| } | |||
| .gameStarBg{ | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .gameTitle{ | |||
| position: absolute; | |||
| left: 50%; | |||
| top: 10rpx; | |||
| transform: translateX(-50%); | |||
| width: 342rpx; | |||
| height: 124rpx; | |||
| line-height: 124rpx; | |||
| font-size:40rpx; | |||
| font-family:PingFangSC; | |||
| color:rgba(35,33,34,1); | |||
| text-align: center; | |||
| font-weight: bold; | |||
| } | |||
| .downTime{ | |||
| position: absolute; | |||
| top: 58rpx; | |||
| right: 80rpx; | |||
| font-size:34rpx; | |||
| line-height: 34rpx; | |||
| font-family:NissanBrand; | |||
| color:rgba(35,33,34,1); | |||
| font-weight: 500; | |||
| } | |||
| .gameClaw{ | |||
| position: absolute; | |||
| left: 50%; | |||
| transform: translateX(-50%); | |||
| top: 130rpx; | |||
| width: 164rpx; | |||
| height: 259rpx; | |||
| } | |||
| .scrollText{ | |||
| position: absolute; | |||
| left: 50%; | |||
| transform: translateX(-50%); | |||
| bottom: 428rpx; | |||
| width: 700rpx; | |||
| height: 30rpx; | |||
| overflow: hidden; | |||
| } | |||
| .scrollFrame{ | |||
| width: 100%; | |||
| height: 100%; | |||
| position: relative; | |||
| overflow: hidden; | |||
| } | |||
| .scrollView{ | |||
| position: absolute; | |||
| width: auto; | |||
| height: 30rpx; | |||
| line-height: 30rpx; | |||
| font-size:20rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:600; | |||
| color:rgba(255,255,255,1); | |||
| left: 60%; | |||
| } | |||
| .prizeLook{ | |||
| position: absolute; | |||
| left: 50%; | |||
| transform: translateX(-50%); | |||
| bottom: 161rpx; | |||
| width:710rpx; | |||
| height:70rpx; | |||
| background-color: #355483; | |||
| line-height: 70rpx; | |||
| text-align: center; | |||
| font-size:30rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| border-radius: 20rpx; | |||
| } | |||
| .prizeIcon2{ | |||
| position: absolute; | |||
| left: 115rpx; | |||
| top: 610rpx; | |||
| width: 523rpx; | |||
| height: 171rpx; | |||
| } | |||
| .prizeIcon1{ | |||
| position: absolute; | |||
| left: 72rpx; | |||
| top: 640rpx; | |||
| width: 624rpx; | |||
| height: 265rpx; | |||
| } | |||
| .gameGetBtn{ | |||
| position: absolute; | |||
| right: 70rpx; | |||
| top: 1086rpx; | |||
| width: 304rpx; | |||
| height: 80rpx; | |||
| } | |||
| .gameControlFrame{ | |||
| position: absolute; | |||
| left: 130rpx; | |||
| top: 1078rpx; | |||
| width: 174rpx; | |||
| height: 106rpx; | |||
| } | |||
| .gameControlGroup{ | |||
| widows: 100%; | |||
| height: 100%; | |||
| position: relative; | |||
| } | |||
| .btnControlL{ | |||
| position: absolute; | |||
| left: 0; | |||
| top: 38rpx; | |||
| width: 60rpx; | |||
| height: 30rpx; | |||
| /* background-color: rgba( 000, 000, 000, 0.3); */ | |||
| } | |||
| .btnControlR{ | |||
| position: absolute; | |||
| right: 0; | |||
| top: 38rpx; | |||
| width: 64rpx; | |||
| height: 30rpx; | |||
| /* background-color: rgba(228, 15, 15, 0.849); */ | |||
| } | |||
| .btnControlT{ | |||
| position: absolute; | |||
| left: 65rpx; | |||
| top: 0; | |||
| width: 48rpx; | |||
| height: 44rpx; | |||
| /* background-color: rgba(209, 135, 45, 0.5); */ | |||
| } | |||
| .btnControlB{ | |||
| position: absolute; | |||
| left: 60rpx; | |||
| bottom: 0; | |||
| width: 50rpx; | |||
| height: 47rpx; | |||
| /* background-color: rgba(233, 222, 111, 0.5); */ | |||
| } | |||
| @@ -13,6 +13,7 @@ Page({ | |||
| recordNow: 1,//现在的记录类型 | |||
| taskList: [],//任务列表 | |||
| shareFriendList:[],//星探小分队列表 | |||
| recordList:[],//获奖记录列表 | |||
| provinceArr: [],//省 | |||
| provinceValue: 0,//选中的省下标 | |||
| storeArr: [],//店铺 | |||
| @@ -61,12 +62,13 @@ Page({ | |||
| this.getUserInfo(); | |||
| this.getTaskProgress(); | |||
| this.getShareList(); | |||
| this.getMyAwardList(); | |||
| if (app.globalData.myCenterData) { | |||
| this.setData({ | |||
| provinceArr: app.globalData.indexData.provinceArr, | |||
| storeArr: app.globalData.indexData.storeArr, | |||
| provinceValue: app.globalData.indexData.provinceValue, | |||
| storeValue: app.globalData.indexData.storeValue, | |||
| provinceArr: app.globalData.myCenterData.provinceArr, | |||
| storeArr: app.globalData.myCenterData.storeArr, | |||
| provinceValue: app.globalData.myCenterData.provinceValue, | |||
| storeValue: app.globalData.myCenterData.storeValue, | |||
| isRegister: app.globalData.isRegister | |||
| }) | |||
| this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province; | |||
| @@ -151,9 +153,14 @@ Page({ | |||
| }) | |||
| }, | |||
| selectRecord: function (e) { | |||
| if (this.data.recordNow == e.currentTarget.dataset.type) { | |||
| return; | |||
| } | |||
| this.setData({ | |||
| recordList:[], | |||
| recordNow: e.currentTarget.dataset.type | |||
| }) | |||
| this.getMyAwardList(); | |||
| }, | |||
| getUserLocation: function (e) { | |||
| wx.getLocation({ | |||
| @@ -225,8 +232,7 @@ Page({ | |||
| if (!this.data.sendCode) { | |||
| return; | |||
| } | |||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: '18831849567' }, res => { | |||
| console.log(res); | |||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile}, res => { | |||
| if (res.code == 200) { | |||
| this.countDown(); | |||
| wx.showToast({ | |||
| @@ -358,7 +364,6 @@ Page({ | |||
| }, | |||
| getShareList: function () {//星探小分队 | |||
| app.wxRequest(app.globalData.urlRoot + "share/getFriendRegisterList", this.data.parames,res=>{ | |||
| console.log(res); | |||
| if(res.code==200){ | |||
| for(let i=0;i<res.data.length;i++){ | |||
| this.data.shareFriendList.push(res.data[i]); | |||
| @@ -371,7 +376,6 @@ Page({ | |||
| noData: true | |||
| }) | |||
| } | |||
| console.log(this.data.shareFriendList); | |||
| } | |||
| },this); | |||
| }, | |||
| @@ -395,5 +399,15 @@ Page({ | |||
| this.data.parames.page+=1; | |||
| this.getShareList(); | |||
| } | |||
| }, | |||
| getMyAwardList: function () {//获取获奖记录 | |||
| app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardType: this.data.recordNow},res=>{ | |||
| console.log(res); | |||
| if(res.code == 200){ | |||
| this.setData({ | |||
| recordList:res.data | |||
| }) | |||
| } | |||
| },this) | |||
| } | |||
| }) | |||
| @@ -93,14 +93,14 @@ | |||
| <view bindtap="selectRecord" data-type='3' class="taskText recordText {{recordNow==3?'taskText2':''}}">幸运星抓手奖品</view> | |||
| </view> | |||
| <view class="recordFrame"> | |||
| <view class="recordGroup"> | |||
| <view class="recordGroup" wx:for="{{recordList}}" wx:key="index"> | |||
| <view class="recordGroupLeft"> | |||
| <view class="recordHeadGroup"> | |||
| <image class="recordUserImg" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | |||
| </view> | |||
| <view class="recordMainGroup"> | |||
| <view class="rewardName">头等舱机票一张</view> | |||
| <view class="rewardTerm">2020.04.05</view> | |||
| <view class="rewardName">{{item.awardName}}</view> | |||
| <view class="rewardTerm">{{item.cdate}}</view> | |||
| </view> | |||
| </view> | |||
| <view class="recordPic"> | |||
| @@ -136,10 +136,10 @@ | |||
| </view> | |||
| <view class="subscribeGroup" wx:if="{{selectNow==4 && !isRegister}}"> | |||
| <view class="inputGroup"> | |||
| <input class="inputCode" bindinput="getCaptcha" placeholder="请输入您的姓名"></input> | |||
| <input class="inputCode" bindinput="getRealname" placeholder="请输入您的姓名"></input> | |||
| </view> | |||
| <view class="inputGroup"> | |||
| <input class="inputCode" bindinput="getCaptcha" placeholder="请输入您的联系电话"></input> | |||
| <input class="inputCode" bindinput="getMobile" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||
| </view> | |||
| <view class="inputGroup"> | |||
| <input class="inputCode" style="width:500rpx;" bindinput="getCaptcha" placeholder="请输入验证码"></input> | |||
| @@ -59,7 +59,13 @@ | |||
| "name": "个人中心", | |||
| "pathName": "pages/myCenter/myCenter", | |||
| "query": "" | |||
| } | |||
| }, | |||
| { | |||
| "id": -1, | |||
| "name": "幸运星抓手", | |||
| "pathName": "pages/luckyStar/luckyStar", | |||
| "query": "" | |||
| } | |||
| ] | |||
| } | |||
| } | |||