* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
console.log(options); | |||||
if (options.scene) { | if (options.scene) { | ||||
this.data.parentOpenid = options.scene; | this.data.parentOpenid = options.scene; | ||||
wx.setStorageSync("parentOpenid", options.scene); | wx.setStorageSync("parentOpenid", options.scene); |
showType: e.currentTarget.dataset.type | showType: e.currentTarget.dataset.type | ||||
}) | }) | ||||
}, | }, | ||||
copyExchangeCode: function () { | |||||
var text = this.data.lookIndex.couponCode || this.data.lookIndex.productCode || ""; | |||||
this.contentCopy(text); | |||||
}, | |||||
contentCopy: function (text) {//内容复制 | |||||
wx.setClipboardData({ | |||||
data: text | |||||
}) | |||||
}, | |||||
} | } | ||||
}) | }) |
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.png'}}" style="width:750rpx;" mode="widthFix"></image> | <image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.png'}}" style="width:750rpx;" mode="widthFix"></image> | ||||
<image class="confirm" bindtap="closeXieyi" src="{{imgUrl+'/newImages3/35.png'}}"></image> | <image class="confirm" bindtap="closeXieyi" src="{{imgUrl+'/newImages3/35.png'}}"></image> | ||||
</view> | </view> | ||||
<view> | |||||
<view wx:if="{{lookIndex.awardId == 6 || lookIndex.awardId == 7 || lookIndex.awardId == 8}}"> | |||||
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_1.png'}}" style="width:750rpx;" mode="widthFix"></image> | <image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_1.png'}}" style="width:750rpx;" mode="widthFix"></image> | ||||
<view style="position: relative;"> | <view style="position: relative;"> | ||||
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_2_'+showType+'.png'}}" style="width:750rpx;" mode="widthFix"></image> | <image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_2_'+showType+'.png'}}" style="width:750rpx;" mode="widthFix"></image> | ||||
</view> | </view> | ||||
<view style="position: relative;"> | <view style="position: relative;"> | ||||
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_3.png'}}" style="width:750rpx;" mode="widthFix"></image> | <image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'_3.png'}}" style="width:750rpx;" mode="widthFix"></image> | ||||
<view class="exchangeCode">{{recordList[lookDescId].couponCode || recordList[lookDescId].productCode || ''}} | |||||
<view class="exchangeCode">{{lookIndex.couponCode || lookIndex.productCode || ''}} | |||||
<image class="copyBtn" bindtap="copyExchangeCode" src="{{imgUrl+'/images/copyBtn.png'}}"></image> | <image class="copyBtn" bindtap="copyExchangeCode" src="{{imgUrl+'/images/copyBtn.png'}}"></image> | ||||
</view> | </view> | ||||
<image class="newImages3-37" src="{{imgUrl+'/newImages3/37.png'}}"></image> | |||||
</view> | |||||
</view> | |||||
<view wx:if="{{lookIndex.awardId == 13 || lookIndex.awardId == 14}}"> | |||||
<view style="position: relative;"> | |||||
<image src="{{imgUrl+'/newImages3/prizeDetail2/'+lookIndex.awardId+'.png?v=001'}}" style="width:750rpx;" mode="widthFix"></image> | |||||
<view class="exchangeCode" style="top:1180rpx;">{{lookIndex.couponCode || lookIndex.productCode || ''}} | |||||
<image class="copyBtn" bindtap="copyExchangeCode" src="{{imgUrl+'/images/copyBtn.png'}}"></image> | |||||
</view> | |||||
<image class="newImages3-37" src="{{imgUrl+'/newImages3/37.png'}}"></image> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
} | } | ||||
.image6Btn1,.image6Btn2{ | |||||
.image6Btn1,.image6Btn2,.image6Btn3,.image6Btn4,.image6Btn5{ | |||||
position: absolute; | position: absolute; | ||||
top:35rpx; | top:35rpx; | ||||
left: 70rpx; | left: 70rpx; | ||||
width: 310rpx; | width: 310rpx; | ||||
height: 80rpx; | height: 80rpx; | ||||
background-color: green; | background-color: green; | ||||
} | |||||
.image6Btn3,.image6Btn4,.image6Btn5{ | |||||
top: 40rpx; | |||||
left: 20rpx; | |||||
width: 240rpx; | |||||
height: 80rpx; | |||||
} | |||||
.image6Btn4{ | |||||
left: 260rpx; | |||||
} | |||||
.image6Btn5{ | |||||
left: auto; | |||||
right: 20rpx; | |||||
} | |||||
.copyBtn{ | |||||
width: 108rpx; | |||||
height: 30rpx; | |||||
margin-left: 20rpx; | |||||
} | |||||
.exchangeCode{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: 550rpx; | |||||
width: 660rpx; | |||||
font-size:20rpx; | |||||
font-family:NissanBrand; | |||||
font-weight:bold; | |||||
color:rgba(0,0,0,1); | |||||
line-height:48rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.newImages3-37{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
bottom: 145rpx; | |||||
width: 276rpx; | |||||
height: 50rpx; | |||||
} | } |
}) | }) | ||||
} | } | ||||
if (!app.globalData.certificationInfo){ | if (!app.globalData.certificationInfo){ | ||||
this.getCertificationInfo(); | |||||
// this.getCertificationInfo(); | |||||
}else{ | }else{ | ||||
this.setData({ | this.setData({ | ||||
certificationInfo: true | certificationInfo: true |
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/luckyPizeTip2.png'}}"></image> | <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> | <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | ||||
</view> | </view> | ||||
<image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image> | |||||
<!-- <image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="downTimeGroup" wx:if="{{!isChanceShow}}"> | <view class="downTimeGroup" wx:if="{{!isChanceShow}}"> | ||||
<view class="chanceGroup"> | <view class="chanceGroup"> | ||||
<image class="newImages44" src="{{imgUrl+'/newImages2/9.png'}}"></image> | |||||
<image class="newImages44" src="{{imgUrl+'/newImages3/36.png'}}"></image> | |||||
<image class="newImages45" bindtap="chanceShowControl" src="{{imgUrl+'/newImages/45.png'}}"></image> | <image class="newImages45" bindtap="chanceShowControl" src="{{imgUrl+'/newImages/45.png'}}"></image> | ||||
<image class="gameRuleClose" bindtap="chanceShowControl" src="{{imgUrl+'/star/closebtn.png'}}"></image> | <image class="gameRuleClose" bindtap="chanceShowControl" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
</view> | </view> |
verificationCode: '获取验证码',//验证码文案 | verificationCode: '获取验证码',//验证码文案 | ||||
sendCode: true, | sendCode: true, | ||||
appointment: true, | appointment: true, | ||||
getFriendListState:false, | |||||
subscribeData: { | subscribeData: { | ||||
realname: "",//姓名 | realname: "",//姓名 | ||||
mobile: "",//手机号 | mobile: "",//手机号 | ||||
// cdate: "2020-03-23", | // cdate: "2020-03-23", | ||||
// awardId: 5 | // awardId: 5 | ||||
// }, | // }, | ||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "100元京东E卡", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 6 | |||||
// }, | |||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "50元京东E卡", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 7 | |||||
// }, | |||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "网易云音乐vip月卡", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 8 | |||||
// }, | |||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "爱奇艺vip月卡", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 9 | |||||
// }, | |||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "腾讯会员vip月卡", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 11 | |||||
// }, | |||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "50元购车红包", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 12 | |||||
// }, | |||||
{ | { | ||||
awardDetailPicContentHeight: 0, | awardDetailPicContentHeight: 0, | ||||
awardName: "100元京东E卡", //奖品名称 | |||||
awardName: "100元购车红包", //奖品名称 | |||||
awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | ||||
productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | ||||
awardState: 0, | awardState: 0, | ||||
cdate: "2020-03-23", | cdate: "2020-03-23", | ||||
awardId: 6 | |||||
awardId: 13 | |||||
}, | }, | ||||
{ | { | ||||
awardDetailPicContentHeight: 0, | awardDetailPicContentHeight: 0, | ||||
awardName: "50元京东E卡", //奖品名称 | |||||
awardName: "100元机油升级券", //奖品名称 | |||||
awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | ||||
productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | ||||
awardState: 0, | awardState: 0, | ||||
cdate: "2020-03-23", | cdate: "2020-03-23", | ||||
awardId: 7 | |||||
awardId: 14 | |||||
}, | }, | ||||
// { | |||||
// awardDetailPicContentHeight: 0, | |||||
// awardName: "旅行箱", //奖品名称 | |||||
// awardPicurl: "https://xingb.venucia.com/award/10_1.png",//奖品小图 | |||||
// productCode: "3cce61eac692e0dd37f0330dd2bb4df7",//奖品兑换码 | |||||
// awardState: 0, | |||||
// cdate: "2020-03-23", | |||||
// awardId: 15 | |||||
// }, | |||||
] | ] | ||||
}, | }, | ||||
selectNow: e.currentTarget.dataset.value | selectNow: e.currentTarget.dataset.value | ||||
}) | }) | ||||
if (e.currentTarget.dataset.value == 1) { | if (e.currentTarget.dataset.value == 1) { | ||||
this.getTaskProgress(); | |||||
// this.getTaskProgress(); | |||||
} else if (e.currentTarget.dataset.value == 2) { | } else if (e.currentTarget.dataset.value == 2) { | ||||
this.getMyAwardList(); | this.getMyAwardList(); | ||||
} else if (e.currentTarget.dataset.value == 3){ | } else if (e.currentTarget.dataset.value == 3){ | ||||
}) | }) | ||||
}, | }, | ||||
getShareList: function () {//星探小分队 | getShareList: function () {//星探小分队 | ||||
this.setData({ | |||||
getFriendListState: true | |||||
}) | |||||
wx.showLoading({ | |||||
title: '获取数据中' | |||||
}) | |||||
app.wxRequest(app.globalData.urlRoot + "share/getFriendRegisterList", this.data.parames,res=>{ | app.wxRequest(app.globalData.urlRoot + "share/getFriendRegisterList", this.data.parames,res=>{ | ||||
wx.hideLoading(); | |||||
this.setData({ | |||||
getFriendListState: false | |||||
}) | |||||
if(res.code==200){ | if(res.code==200){ | ||||
for(let i=0;i<res.data.length;i++){ | for(let i=0;i<res.data.length;i++){ | ||||
this.data.shareFriendList.push(res.data[i]); | this.data.shareFriendList.push(res.data[i]); |
</view> | </view> | ||||
</view> | </view> | ||||
<view class="ranksGroup" wx:if="{{selectNow==3}}"> | <view class="ranksGroup" wx:if="{{selectNow==3}}"> | ||||
<image class="newImages3" wx:if="{{!shareFriendList.length}}" src="{{imgUrl+'/newImages3/18.png'}}"></image> | |||||
<image class="newImages4" bindtap="starGo" wx:if="{{!shareFriendList.length}}" src="{{imgUrl+'/newImages3/17.png'}}"></image> | |||||
<image class="newImages3" wx:if="{{!shareFriendList.length && !getFriendListState}}" src="{{imgUrl+'/newImages3/18.png'}}"></image> | |||||
<image class="newImages4" bindtap="starGo" wx:if="{{!shareFriendList.length && !getFriendListState}}" src="{{imgUrl+'/newImages3/17.png'}}"></image> | |||||
<image class="newImages7" wx:if="{{shareFriendList.length}}" src="{{imgUrl+'/newImages2/71.png'}}"></image> | <image class="newImages7" wx:if="{{shareFriendList.length}}" src="{{imgUrl+'/newImages2/71.png'}}"></image> | ||||
<scroll-view class="ranksList" wx:if="{{shareFriendList.length}}" scroll-y bindscrolltolower="scrolltolower"> | <scroll-view class="ranksList" wx:if="{{shareFriendList.length}}" scroll-y bindscrolltolower="scrolltolower"> | ||||
<view class="detachmentGroup" wx:for="{{shareFriendList}}" wx:key="index"> | <view class="detachmentGroup" wx:for="{{shareFriendList}}" wx:key="index"> |
if (this.data.mobileType == 2) { | if (this.data.mobileType == 2) { | ||||
this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | ||||
} | } | ||||
this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||||
app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | ||||
this.data.subscribeData.mobile = sourceMobile; | this.data.subscribeData.mobile = sourceMobile; | ||||
if (res.code == 200) { | if (res.code == 200) { |
if(this.data.mobileType==2){ | if(this.data.mobileType==2){ | ||||
this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | ||||
} | } | ||||
this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||||
app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { | ||||
this.data.subscribeData.mobile = sourceMobile; | this.data.subscribeData.mobile = sourceMobile; | ||||
this.data.appointment = true; | this.data.appointment = true; |