| position: relative; | position: relative; | ||||
| width:697rpx; | width:697rpx; | ||||
| min-height:62rpx; | min-height:62rpx; | ||||
| border: 1rpx solid #B1B1B1; | |||||
| border: 2rpx solid #B1B1B1; | |||||
| border-radius: 15rpx; | border-radius: 15rpx; | ||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; |
| imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
| friendOpenid:null,//朋友的openid | friendOpenid:null,//朋友的openid | ||||
| countNum:0, | countNum:0, | ||||
| pageShow:false,//是否显示页面 | |||||
| }, | }, | ||||
| /** | /** | ||||
| app.globalData.nowPage = 2; | app.globalData.nowPage = 2; | ||||
| if (options.friendOpenid) { | if (options.friendOpenid) { | ||||
| this.data.friendOpenid = options.friendOpenid; | this.data.friendOpenid = options.friendOpenid; | ||||
| wx.setStorageSync("friendOpenid", options.friendOpenid); | |||||
| app.globalData.friendOpenid = options.friendOpenid; | |||||
| } | } | ||||
| if (app.globalData.openid) { | if (app.globalData.openid) { | ||||
| this.getOrderInfo(); | this.getOrderInfo(); | ||||
| url: '/pages/index/index', | url: '/pages/index/index', | ||||
| }) | }) | ||||
| }else{ | }else{ | ||||
| this.setData({ | |||||
| pageShow:true | |||||
| }) | |||||
| this.getTotalOrder(); | this.getTotalOrder(); | ||||
| wx.setStorageSync("friendOpenid", this.data.friendOpenid); | |||||
| app.globalData.friendOpenid = this.data.friendOpenid; | |||||
| } | } | ||||
| } | } | ||||
| },this) | },this) |
| <!--pages/coupon/coupon.wxml--> | <!--pages/coupon/coupon.wxml--> | ||||
| <view class="all"> | |||||
| <view class="all" wx:if="{{pageShow}}"> | |||||
| <view class="main"> | <view class="main"> | ||||
| <image class="couponBg" src="{{imgUrl+'/images/couponBg.png'}}"></image> | <image class="couponBg" src="{{imgUrl+'/images/couponBg.png'}}"></image> | ||||
| <view class="prizeFrame"> | <view class="prizeFrame"> |
| isAddress:false,//是否有地址 | isAddress:false,//是否有地址 | ||||
| getReward:null, | getReward:null, | ||||
| tipWindow:0, | tipWindow:0, | ||||
| hiddenFriendFrame:false, | |||||
| hiddenFriendFrame: false, | |||||
| userData: null, | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 关闭任务窗 | * 关闭任务窗 | ||||
| signIn() { | signIn() { | ||||
| app.wxRequest(app.globalData.urlRoot +"task/signToday",{},res=>{ | app.wxRequest(app.globalData.urlRoot +"task/signToday",{},res=>{ | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.getTaskProgress(); | |||||
| this.getShareId(); | this.getShareId(); | ||||
| this.setData({ | this.setData({ | ||||
| maskShow: false, | maskShow: false, | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| app.globalData.nowPage = 2; | app.globalData.nowPage = 2; | ||||
| if (app.globalData.userInfoData) { | |||||
| this.setData({ | |||||
| userData: app.globalData.userInfoData | |||||
| }) | |||||
| } | |||||
| if (options.shareId) { | if (options.shareId) { | ||||
| this.data.isFriendShare = options.shareId; | this.data.isFriendShare = options.shareId; | ||||
| } | } | ||||
| }, this); | }, this); | ||||
| }, | }, | ||||
| getTaskAward:function(){//领取购车券 | getTaskAward:function(){//领取购车券 | ||||
| wx.wxRequest(app.globalData.urlRoot + "task/getTaskAward", { awardGiveId: this.data.picturlList[this.data.picturlCurrent]['awardGiveId']},res=>{ | |||||
| app.wxRequest(app.globalData.urlRoot + "award/getTaskAward", { awardGiveId: this.data.picturlList[this.data.picturlCurrent]['awardGiveId']},res=>{ | |||||
| if(res.code==200){ | if(res.code==200){ | ||||
| this.data.picturlList[this.data.picturlCurrent]['awardState'] = -1; | |||||
| this.setData({ | this.setData({ | ||||
| getReward:res.data | getReward:res.data | ||||
| }) | }) | ||||
| if (res.data.needAddress && this.data.isAddress) { | |||||
| this.setData({ | |||||
| tipWindow:2 | |||||
| }) | |||||
| } else if (res.data.needAddress==0){ | |||||
| if (res.data.needAddress != 0 && !this.data.isAddress){ | |||||
| this.setData({ | this.setData({ | ||||
| tipWindow: 2 | tipWindow: 2 | ||||
| }) | }) | ||||
| } else if (res.data.needAddress && !this.data.isAddress){ | |||||
| this.setData({ | |||||
| tipWindow: 1 | |||||
| }) | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| wx.showToast({ | wx.showToast({ | ||||
| } | } | ||||
| },this); | },this); | ||||
| }, | }, | ||||
| receive:function(){ | |||||
| wx.redirectTo({ | |||||
| url: '/pages/myCenter/myCenter' | |||||
| }) | |||||
| }, | |||||
| userRegister: function () { | userRegister: function () { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/address/address', | url: '/pages/address/address', | ||||
| this.setData({ | this.setData({ | ||||
| hiddenFriendFrame:false | hiddenFriendFrame:false | ||||
| }) | }) | ||||
| }, | |||||
| getUserWxMsg: function (e) { | |||||
| if (e.detail.errMsg == "getUserInfo:ok") { | |||||
| this.setData({ | |||||
| userData: e.detail.userInfo | |||||
| }) | |||||
| app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||||
| } | |||||
| } | } | ||||
| }) | }) |
| <view class="name" wx:if="{{!isSign}}">{{taskName}}</view> | <view class="name" wx:if="{{!isSign}}">{{taskName}}</view> | ||||
| <image class="taskImg" src="{{taskImgUrl}}" wx:if="{{!isSign}}"></image> | <image class="taskImg" src="{{taskImgUrl}}" wx:if="{{!isSign}}"></image> | ||||
| <view class="signBtnGroup"> | <view class="signBtnGroup"> | ||||
| <view class="btn" wx:if="{{isSign}}" bindtap="signIn">签到解锁</view> | |||||
| <view class="btn" wx:if="{{isSign}}" bindtap="signIn">签到解锁 | |||||
| <button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;"></button> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view class="btn" wx:if="{{!isSign}}">分享再获取一张碎片 | <view class="btn" wx:if="{{!isSign}}">分享再获取一张碎片 | ||||
| <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | ||||
| </view> | </view> | ||||
| <view class="successPop" wx:if="{{tipWindow}}"> | <view class="successPop" wx:if="{{tipWindow}}"> | ||||
| <view class="successGroup"> | <view class="successGroup"> | ||||
| <image class="gameRuleClose2" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||||
| <image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||||
| <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | ||||
| <view class="titleGroup"></view> | <view class="titleGroup"></view> | ||||
| <view class="successTip">幸运满格,大奖到手</view> | <view class="successTip">幸运满格,大奖到手</view> | ||||
| <image class="prizePic" src="{{getReward.awardPicUrl}}" mode="aspectFit"></image> | <image class="prizePic" src="{{getReward.awardPicUrl}}" mode="aspectFit"></image> | ||||
| <view class="prizeName">{{getReward.awardName}}</view> | <view class="prizeName">{{getReward.awardName}}</view> | ||||
| <view class="startRegister" wx:if="{{tipWindow==1}}" bindtap="receive">立即领取</view> | |||||
| <view class="startRegister" wx:if="{{tipWindow==2}}" bindtap="userRegister">立即注册</view> | |||||
| <!-- <view class="startRegister" wx:if="{{tipWindow==1}}" bindtap="receive">立即领取</view> --> | |||||
| <view class="startRegister" wx:if="{{tipWindow==2}}" bindtap="userRegister">立即领取</view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="successPop" wx:if="{{hiddenFriendFrame}}"> | <view class="successPop" wx:if="{{hiddenFriendFrame}}"> | ||||
| <view class="friendTip"> | <view class="friendTip"> | ||||
| <text class="closeBtn" style="right:-40rpx;top:-40rpx;" bindtap="hiddenFriendTip"></text> | <text class="closeBtn" style="right:-40rpx;top:-40rpx;" bindtap="hiddenFriendTip"></text> | ||||
| <view class="friendTipTitle">恭喜您</view> | <view class="friendTipTitle">恭喜您</view> | ||||
| <view class="tipText">您已经成功为 {{useShareData.nickName}} 获得了</view> | |||||
| <view class="tipText">您已经成功为 {{useShareData.nickName?useShareData.nickName:""}} 获得了</view> | |||||
| <view class="tipText">一片{{useShareData.taskName}}碎片</view> | <view class="tipText">一片{{useShareData.taskName}}碎片</view> | ||||
| <view class="tipText">集齐4片即可获得一份</view> | <view class="tipText">集齐4片即可获得一份</view> | ||||
| <view class="tipText">启辰星购车红包</view> | <view class="tipText">启辰星购车红包</view> |
| height: 100%; | height: 100%; | ||||
| line-height: 49rpx; | line-height: 49rpx; | ||||
| text-align: center; | text-align: center; | ||||
| border: 1rpx solid #345489; | |||||
| border: 2rpx solid #345489; | |||||
| box-sizing: border-box; | box-sizing: border-box; | ||||
| font-size: 21rpx; | font-size: 21rpx; | ||||
| color: #333333; | color: #333333; | ||||
| color:rgba(255,255,255,1); | color:rgba(255,255,255,1); | ||||
| line-height: 63rpx; | line-height: 63rpx; | ||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| } | |||||
| .getUserMsgBtn{ | |||||
| position: absolute; | |||||
| top: 0; | |||||
| left: 0; | |||||
| padding: 0; | |||||
| margin: 0; | |||||
| opacity: 0; | |||||
| } | } |
| <view class="gameRuleDesc" wx:if="{{ruleShow}}"> | <view class="gameRuleDesc" wx:if="{{ruleShow}}"> | ||||
| <view class="ruleGroup"> | <view class="ruleGroup"> | ||||
| <image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | <image class="gameRuleIcon" src="{{imgUrl+'/images/gameRuleDesc.png'}}"></image> | ||||
| <image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||||
| <image class="gameRuleClose" wx:if="{{ruleCloseShow}}" bindtap="closeRule" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||||
| <view class="gameStrat" bindtap="gameStart">开始游戏<button wx:if="{{!userData}}" style="min-height:0;width: 277rpx;height: 50rpx;" bindgetuserinfo="getUserWxMsg" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | <view class="gameStrat" bindtap="gameStart">开始游戏<button wx:if="{{!userData}}" style="min-height:0;width: 277rpx;height: 50rpx;" bindgetuserinfo="getUserWxMsg" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN"></button></view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="successPop" wx:if="{{pizeTip}}"> | <view class="successPop" wx:if="{{pizeTip}}"> | ||||
| <view class="successGroup" wx:if="{{pizeTip==1}}"> | <view class="successGroup" wx:if="{{pizeTip==1}}"> | ||||
| <image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||||
| <image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||||
| <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | ||||
| <view class="titleGroup"></view> | <view class="titleGroup"></view> | ||||
| <view class="successTip">幸运满格,大奖到手</view> | <view class="successTip">幸运满格,大奖到手</view> | ||||
| <view class="startRegister" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister">立即领取</view> | <view class="startRegister" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister">立即领取</view> | ||||
| </view> | </view> | ||||
| <view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | <view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | ||||
| <image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||||
| <image class="gameRuleClose" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||||
| <image class="successIcon" src="{{imgUrl+'/images/failIcon.png'}}"></image> | <image class="successIcon" src="{{imgUrl+'/images/failIcon.png'}}"></image> | ||||
| <view class="titleGroup"></view> | <view class="titleGroup"></view> | ||||
| <view class="failText" style="margin-top:113rpx;">运气就差一点点</view> | <view class="failText" style="margin-top:113rpx;">运气就差一点点</view> |
| } | } | ||||
| .gameRuleClose{ | .gameRuleClose{ | ||||
| position: absolute; | position: absolute; | ||||
| top: 0rpx; | |||||
| top: -10rpx; | |||||
| right: -10rpx; | right: -10rpx; | ||||
| width: 31rpx; | |||||
| height: 29rpx; | |||||
| height: 40rpx; | |||||
| width: 40rpx; | |||||
| } | } | ||||
| .gameStrat{ | .gameStrat{ | ||||
| width:277rpx; | width:277rpx; |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| .taskLine{ | .taskLine{ | ||||
| height:15rpx; | |||||
| height:13rpx; | |||||
| width:0; | width:0; | ||||
| background-color: #345486; | background-color: #345486; | ||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; | ||||
| justify-content: space-between; | justify-content: space-between; | ||||
| border: 1rpx solid #B4B4B4; | |||||
| border: 2rpx solid #B4B4B4; | |||||
| position: relative; | position: relative; | ||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } |
| imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
| canvasContron:null,//canvas | canvasContron:null,//canvas | ||||
| posterBg:[],//海报背景 | posterBg:[],//海报背景 | ||||
| qrCodeUrl:"https://www.jiyou-tech.com/2020/496_qichen/static/images/testQrCode.png",//二维码图片 | |||||
| qrCodeUrl:"",//二维码图片 | |||||
| userHead: app.globalData.userInfoData ? app.globalData.userInfoData.avatarUrl : null,//用户头像 | userHead: app.globalData.userInfoData ? app.globalData.userInfoData.avatarUrl : null,//用户头像 | ||||
| rankNum: '0000',//缓存数字 | rankNum: '0000',//缓存数字 | ||||
| windowScale:0,//屏幕缩放比 | windowScale:0,//屏幕缩放比 |
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onReady: function() { | onReady: function() { | ||||
| this.mcaptcha = new Mcaptcha({ | |||||
| el: 'canvas', | |||||
| width: 80, | |||||
| height: 35, | |||||
| createCodeImg: "" | |||||
| }); | |||||
| wx.getSystemInfo({ | |||||
| success: option => { | |||||
| var windowScale = option.windowWidth / 750; | |||||
| this.mcaptcha = new Mcaptcha({ | |||||
| el: 'canvas', | |||||
| width: windowScale*205, | |||||
| height: windowScale*51, | |||||
| createCodeImg: "" | |||||
| }); | |||||
| } | |||||
| }) | |||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getJobList", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getJobList", {}, res => { | ||||
| console.log(res) | console.log(res) | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| */ | */ | ||||
| onShow: function() { | onShow: function() { | ||||
| this.setData({isbtn: true}) | this.setData({isbtn: true}) | ||||
| this.getshow(); | |||||
| // this.getshow(); | |||||
| }, | }, | ||||
| getshow(){ | getshow(){ | ||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationNoCarInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationNoCarInfo", {}, res => { |
| <input name="VIN" placeholder="请输入车牌号/VIN号" placeholder-style="font-size:23rpx;" /> | <input name="VIN" placeholder="请输入车牌号/VIN号" placeholder-style="font-size:23rpx;" /> | ||||
| <input name="code" placeholder="请输入验证码" placeholder-style="font-size:23rpx;" style="padding-right:300rpx;" /> | <input name="code" placeholder="请输入验证码" placeholder-style="font-size:23rpx;" style="padding-right:300rpx;" /> | ||||
| <view class="VcodeBox"> | <view class="VcodeBox"> | ||||
| <canvas style="width:205rpx;height:51rpx;position:absolute;left:20rpx;bottom:0rpx;text-align: center;z-index:9999;" canvas-id="canvas" bindtap="vCodeRefresh"></canvas> | |||||
| <view class="VcodeGroup"> | |||||
| <canvas class="canvasSty" canvas-id="canvas" bindtap="vCodeRefresh"></canvas> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view class="tipTxt">VIN示意图</view> | <view class="tipTxt">VIN示意图</view> | ||||
| <image class="license" src="{{imgUrl+'/star/scout/register/card.png'}}"></image> | <image class="license" src="{{imgUrl+'/star/scout/register/card.png'}}"></image> | ||||
| <button class="submitBtn" formType="submit">提交</button> | |||||
| <button class="submitBtn" style="padding:0;" formType="submit">提交</button> | |||||
| <view class="reminder">温馨提示:您填写的信息将同步至东风启辰服务号,以便改善我们的产品,更好的为您提供优质的服务。</view> | <view class="reminder">温馨提示:您填写的信息将同步至东风启辰服务号,以便改善我们的产品,更好的为您提供优质的服务。</view> | ||||
| </view> | </view> | ||||
| </form> | </form> |
| /* pages/scout/register/register.wxss */ | /* pages/scout/register/register.wxss */ | ||||
| .registerContainer{ | .registerContainer{ | ||||
| width: 100%; | width: 100%; | ||||
| height: calc(100% - 168rpx); | |||||
| margin-top: 168rpx; | |||||
| /* height: calc(100% - 168rpx); */ | |||||
| overflow-y: scroll; | overflow-y: scroll; | ||||
| } | } | ||||
| .tabsBox{ | .tabsBox{ | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| border-radius: 10rpx; | border-radius: 10rpx; | ||||
| box-sizing: border-box; | box-sizing: border-box; | ||||
| margin-top: 168rpx; | |||||
| } | } | ||||
| .tabsBox>.item{ | .tabsBox>.item{ | ||||
| width: 50%; | width: 50%; | ||||
| /* .closeBtn::before { | /* .closeBtn::before { | ||||
| content: "\2716"; | content: "\2716"; | ||||
| } */ | |||||
| } */ | |||||
| .VcodeGroup{ | |||||
| position: relative; | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .canvasSty{ | |||||
| width:205rpx; | |||||
| height:51rpx; | |||||
| position:absolute; | |||||
| left:0;top:0; | |||||
| text-align: center; | |||||
| z-index:9999; | |||||
| } |
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| app.globalData.nowPage = 2; | |||||
| }, | }, | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function () { | onShow: function () { | ||||
| console.log(app.globalData.userMobile) | |||||
| if(app.globalData.userMobile==null){ | if(app.globalData.userMobile==null){ | ||||
| this.setData({phonebol: true}) | this.setData({phonebol: true}) | ||||
| }else{ | }else{ | ||||
| this.setData({phonebol: false}) | this.setData({phonebol: false}) | ||||
| } | } | ||||
| this.setData({isbtn: true}) | this.setData({isbtn: true}) | ||||
| // wx.navigateTo({ | |||||
| // url: '../scout/register/register' | |||||
| // }) | |||||
| }, | }, | ||||
| /** | /** |