Commit 8061a70b authored by 任建锋's avatar 任建锋

--

parent 10efe42a
export let DataCenter={
}
\ No newline at end of file
...@@ -98,7 +98,16 @@ const apiList = { ...@@ -98,7 +98,16 @@ const apiList = {
method: 'get', method: 'get',
isShowLoading: false isShowLoading: false
}, },
getMyCardsInfo: {
handle: 'getMyCardsInfo',
method: 'get',
isShowLoading: false
},
getTaskList: {
handle: 'getTaskList',
method: 'get',
isShowLoading: false
},
/**获取用户信息 */ /**获取用户信息 */
getUserInfo: { getUserInfo: {
handle: 'getUserInfo', handle: 'getUserInfo',
......
/* 程序样式 */
@import './your.acss';
.getcardpanel { .getcardpanel {
width: 750rpx; width: 750rpx;
height: 944rpx; height: 944rpx;
......
<view class="getcardpanel "> <view class="getcardpanel ">
<image class="getcardcontinuebtn " src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} /> <image class="getcardcontinuebtn " a:if={{doJoinData.drawLotteryStatus==1}} onTap="hiddenPanelEvent" data-value="getcardpanel" src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} />
<image class="getcardopenboxbtn " src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} /> <image class="getcardopenboxbtn " a:if={{doJoinData.drawLotteryStatus==2}} src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} />
<image class="dim51 " src={{resList['8c31274b-1016-4b8c-b413-9fc98174e118'].url}} /> <image class="dim51 " src={{resList['8c31274b-1016-4b8c-b413-9fc98174e118'].url}} />
<image class="xi_you_qia_dim50 " src={{resList['a47a9645-1d0d-482b-af10-154def15e9f9'].url}} /> <image class="xi_you_qia_dim50 " src={{resList['a47a9645-1d0d-482b-af10-154def15e9f9'].url}} />
<image class="getcardimg " src={{resList['71612c2a-b0dc-463b-82dd-24a427e58ca1'].url}} /> <image class="getcardimg " src={{doJoinData.image}} />
<text class="getcardtitle "> 运气爆棚!\n解锁一张新卡牌</text> <text class="getcardtitle " a:if={{doJoinData.isNewCard&&doJoinData.drawLotteryStatus==1}}> 运气爆棚!\n解锁一张新卡牌</text>
<text class="getcardtitle " a:if={{doJoinData.isNewCard&&doJoinData.drawLotteryStatus==2}}> 恭喜你解锁{{doJoinData.cardTypeCollectedCount}}张卡牌</text>
<text class="getcardtitle " a:if={{!doJoinData.isNewCard}}> 恭喜你获得以下卡牌</text>
<image class="getcardclosebtn "onTap="hiddenPanelEvent" data-value="{{'getcardpanel'}}" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} /> <image class="getcardclosebtn "onTap="hiddenPanelEvent" data-value="{{'getcardpanel'}}" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
<view class="fu_biao_ti45 "> <view class="fu_biao_ti45 ">
<image class="yuan_jiao_ju368847 " src={{resList['d7329665-f4f6-42bc-ab46-0af63a0837eb'].url}} /> <image class="yuan_jiao_ju368847 " src={{resList['d7329665-f4f6-42bc-ab46-0af63a0837eb'].url}} />
<text class="getcardcontenttext ">再抽取n张不同卡牌即可领取奖励</text> <text class="getcardcontenttext ">再抽取{{doJoinData.restCardTypeCount}}张不同卡牌即可领取奖励</text>
</view> </view>
</view> </view>
\ No newline at end of file
'use strict'; 'use strict';
import { DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {},
methods: { methods: {
hiddenPanelEvent(e){ hiddenPanelEvent(e){
console.log(this)
this.props.onTapHiddenPanelEvent(e); this.props.onTapHiddenPanelEvent(e);
} }
}, },
didMount(props) { didMount(props) {
console.log(DataCenter.doJoinData)
this.setData({ this.setData({
resList: resList resList: resList,
doJoinData:DataCenter.doJoinData.data
}); });
} }
}); });
\ No newline at end of file
.mycardpanel .mycardbody .mycardcontent .mycarditem{
display: inline-block !important;
position:relative !important;
margin-left:40rpx;
}
.mycardpanel .mycardbody .mycardcontent{
overflow-y:scroll;
}
\ No newline at end of file
<view class="joinmemberpanel "> <view class="joinmemberpanel ">
<image class="dim106 " src={{resList['11de08fa-6456-4123-8aba-ef9b3d980eb5'].url}} /> <image class="dim106 " src={{resList['11de08fa-6456-4123-8aba-ef9b3d980eb5'].url}} />
<image class="joinmemberbtn " src={{resList['3b7870b4-578d-4781-9a56-58916f02c376'].url}} /> <image class="joinmemberbtn " src={{resList['3b7870b4-578d-4781-9a56-58916f02c376'].url}} />
<span class="joinmembertext ">加入会员 才能参与活动赢大奖哦~</span> <text class="joinmembertext ">加入会员\n才能参与活动赢大奖哦~</text>
<image class="joinmemberclosebtn " src={{resList['17952009-08e1-4439-b51f-3e4e1e66333f'].url}} /> <image class="joinmemberclosebtn " onTap="hiddenPanelEvent" data-value="joinmemberpanel" src={{resList['17952009-08e1-4439-b51f-3e4e1e66333f'].url}} />
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,13 @@ import resList from '../../resconfig/resList'; ...@@ -4,9 +4,13 @@ import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {},
methods: {}, methods: {
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
}
},
onInit(props) { didMount(props) {
this.setData({ this.setData({
resList: resList resList: resList
}); });
......
...@@ -2,20 +2,20 @@ ...@@ -2,20 +2,20 @@
<view class="mycardbody "> <view class="mycardbody ">
<image class="bei_jing15 " src={{resList['6dd68f2c-4a65-4107-92f2-29464c469803'].url}} /> <image class="bei_jing15 " src={{resList['6dd68f2c-4a65-4107-92f2-29464c469803'].url}} />
<view class="mycardcontent "> <view class="mycardcontent ">
<view class="mycarditem "> <view class="mycarditem " a:for={{MyCardsInfo}}>
<view class="mycarditembody "> <view class="mycarditembody ">
<image class="mcbgdisable " src={{resList['baba4718-16a8-4a77-a052-53af708bbb21'].url}} /> <image class="mcbgdisable " src={{resList['baba4718-16a8-4a77-a052-53af708bbb21'].url}} />
<image class="mcbg " src={{resList['8b2f6c1d-1fbd-4c64-b9a9-43549adbb472'].url}} /> <image class="mcbg " src={{resList['8b2f6c1d-1fbd-4c64-b9a9-43549adbb472'].url}} />
<image class="mcgivingbtndisable " src={{resList['776b0825-6538-4ea4-8814-50149644f3bc'].url}} /> <image class="mcgivingbtndisable " src={{resList['776b0825-6538-4ea4-8814-50149644f3bc'].url}} />
<image class="mcgivingbtn " src={{resList['9d853465-431f-407e-963c-97a0e2ce74da'].url}} /> <image class="mcgivingbtn " src={{resList['9d853465-431f-407e-963c-97a0e2ce74da'].url}} />
<image class="mccardimg " src={{resList['e30a641f-f2ee-463c-b3da-55b888b9068a'].url}} /> <image class="mccardimg " src={{item.image}} />
<view class="mccardcount "> <view class="mccardcount ">
<image class="wo_de_qia_pai_shu_liang_bei_jing_huang9 " src={{resList['f75d533c-113b-4717-8411-ea37d224a9c0'].url}} /> <image class="wo_de_qia_pai_shu_liang_bei_jing_huang9 " src={{resList['f75d533c-113b-4717-8411-ea37d224a9c0'].url}} />
<span class="mccardcounttext ">1</span> <text class="mccardcounttext fontVerticalCenter">{{item.count}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<image class="mycardclosebtn " src={{resList['4d74c7bc-4af0-494d-809a-73090d99ff25'].url}} /> <image class="mycardclosebtn " onTap="hiddenPanelEvent" data-value="mycardpanel" src={{resList['4d74c7bc-4af0-494d-809a-73090d99ff25'].url}} />
</view> </view>
</view> </view>
\ No newline at end of file
'use strict'; 'use strict';
import { DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {},
methods: {}, methods: {
hiddenPanelEvent(e){
onInit(props) { this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
this.setData({ this.setData({
resList: resList resList: resList,
MyCardsInfo:DataCenter.MyCardsInfo
}); });
} }
......
<view class="nonumberpanel "> <view class="nonumberpanel ">
<image class="dim109 " src={{resList['32da4042-3a54-409d-90ef-cb8320f41622'].url}} /> <image class="dim109 " src={{resList['32da4042-3a54-409d-90ef-cb8320f41622'].url}} />
<image class="nonumbertaskbtn " src={{resList['fd0c8bee-3d1d-4042-a326-84483c175dad'].url}} /> <image class="nonumbertaskbtn " src={{resList['fd0c8bee-3d1d-4042-a326-84483c175dad'].url}} />
<span class="nin_de_fan_pai_ci_shu_yi_yong_wan ">您的翻牌次数已用完</span> <text class="nin_de_fan_pai_ci_shu_yi_yong_wan ">您的翻牌次数已用完</text>
<image class="nonumberclosebtn " src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} /> <image class="nonumberclosebtn " onTap="hiddenPanelEvent" data-value="nonumberpanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,12 @@ import resList from '../../resconfig/resList'; ...@@ -4,9 +4,12 @@ import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {},
methods: {}, methods: {
hiddenPanelEvent(e){
onInit(props) { this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
this.setData({ this.setData({
resList: resList resList: resList
}); });
......
<view class="prizetipspanel "> <view class="prizetipspanel " >
<span class="zheng_zai_jin_xing_zhong ">正在进行中...</span> <text class="zheng_zai_jin_xing_zhong ">正在进行中...</text>
<span class="prizetipsnumberremainingtext ">(剩余n张解锁奖励)</span> <text class="prizetipsnumberremainingtext ">(剩余{{CollectCardInfo.cardTypeCount-CollectCardInfo.cardTypeCollectedCount}}张解锁奖励)</text>
<span class="prizetipsprize1text ">奖品标题奖品标题</span> <text class="prizetipsprize1text ">{{prizeList[0].name}}</text>
<span class="prizetipsprize2text ">奖品标题奖品标题</span> <text class="prizetipsprize2text ">{{prizeList[1].name}}</text>
<image class="prizetipsclosebtn " src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} /> <image class="prizetipsclosebtn " onTap="hiddenPanelEvent" data-value="prizetipspanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
<image class="prizetipsprize1 " src={{resList['5f6be607-9f63-4603-8f12-acbee3d95d46'].url}} /> <image class="prizetipsprize1 " src={{prizeList[0].image}} />
<image class="prizetipsprize2 " src={{resList['5f6be607-9f63-4603-8f12-acbee3d95d46'].url}} /> <image class="prizetipsprize2 " src={{prizeList[1].image}} />
<span class="prizetipstips ">数量有限,先到先得</span> <text class="prizetipstips ">数量有限,先到先得</text>
</view> </view>
\ No newline at end of file \ No newline at end of file
'use strict'; 'use strict';
import { DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {},
methods: {}, methods: {
hiddenPanelEvent(e){
onInit(props) { this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
console.log(DataCenter.CollectCardInfo,DataCenter.CollectCardInfo.cardTypeCount,DataCenter.CollectCardInfo.cardTypeCollectedCount)
this.setData({ this.setData({
resList: resList resList: resList,
prizeList:DataCenter.prizeList,
CollectCardInfo: DataCenter.CollectCardInfo
}); });
} }
}); });
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="rulepanel"> <view class="rulepanel">
<image class="dim1131 " src={{resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url}} /> <image class="dim1131 " src={{resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url}} />
<view class="ruletext "> <view class="ruletext ">
活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则 {{rule}}
</view> </view>
<image class="ruleclosebtn " onTap="hiddenPanelEvent" data-value="{{'rulepanel'}}" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} /> <image class="ruleclosebtn " onTap="hiddenPanelEvent" data-value="rulepanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
</view> </view>
'use strict'; 'use strict';
import { DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
...@@ -12,9 +13,9 @@ Component({ ...@@ -12,9 +13,9 @@ Component({
}, },
didMount(props) { didMount(props) {
console.log("603034bb-2c7d-42c4-9be4-60aea30e0820",resList['603034bb-2c7d-42c4-9be4-60aea30e0820'].url)
this.setData({ this.setData({
resList: resList resList: resList,
rule:DataCenter.rule
}); });
}, },
......
/* 程序样式 */
@import './your.acss';
.taskpanel { .taskpanel {
width: 716rpx; width: 716rpx;
height: 939rpx; height: 939rpx;
......
<view class="taskpanel "> <view class="taskpanel ">
<image class="dim9 " src={{resList['c6f83af8-a064-426a-bb3c-60d7e9dd1c0b'].url}} /> <image class="dim9 " src={{resList['c6f83af8-a064-426a-bb3c-60d7e9dd1c0b'].url}} />
<view class="taskbody "> <view class="taskbody ">
<view class="taskitem "> <view class="taskitem " a:for={{TaskList}}>
<image class="dim8 " src={{resList['e670f6a8-3dee-493b-a55f-c61229c85cb5'].url}} /> <image class="dim8 " src={{resList['e670f6a8-3dee-493b-a55f-c61229c85cb5'].url}} />
<image class="taskicon " src={{resList['6ec4da36-beba-4eea-ba56-e5d59c1e77dd'].url}} /> <image class="taskicon " src={{localData[item.taskType].icon}} />
<image class="tasknonebuybtn " src={{resList['befa9414-7e21-4e4a-a4d6-d42324525cd2'].url}} />
<image class="tasknonegotobtn " src={{resList['f4a40fdc-4ac7-4917-bdca-704ac6e293d6'].url}} /> <view a:if(item.status=="3")>
<image class="taskoverbtn " src={{resList['60e755c5-16de-469e-b54b-d1254d4fdd13'].url}} /> <!-- 去购买 -->
<image class="taskreadybtn " src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} /> <image class="tasknonebuybtn "
<image class="tasknonetofocusbtn " src={{resList['ba2793d6-94cd-4fe1-ae3d-11278e0a66f8'].url}} /> a:if=={{(item.taskType=="orderGoods"||item.taskType=="orderDepositGoods")}}
<image class="tasknonetobrowsebtn " src={{resList['8473ab9f-df8e-4c4e-b249-8d1cad9f04ae'].url}} /> src={{resList['befa9414-7e21-4e4a-a4d6-d42324525cd2'].url}} />
<image class="taskovertomorrowbtn " src={{resList['a3b76ef9-f877-4aa1-b07a-b1c971fd8c6d'].url}} /> <!-- 去关注 -->
<view class="taskitemtext "> <image class="tasknonetofocusbtn "
<span class="taskitemtitle ">关注店铺</span> a:elif=={{(item.taskType=="follow")}}
<span class="taskitemcontent ">翻牌次数 +10</span> src={{resList['ba2793d6-94cd-4fe1-ae3d-11278e0a66f8'].url}} />
<!-- 去浏览 -->
<image class="tasknonetobrowsebtn "
a:elif=={{(item.taskType=="jumpLink")}}
src={{resList['8473ab9f-df8e-4c4e-b249-8d1cad9f04ae'].url}} />
<!-- 去完成 -->
<image class="tasknonegotobtn "
a:else
src={{resList['f4a40fdc-4ac7-4917-bdca-704ac6e293d6'].url}} />
</view>
<!-- 待领取 -->
<image a:if={{(item.status=="2")}} class="taskreadybtn " src={{resList['00c28c88-7e7c-4c9b-a708-f0254dab619a'].url}} />
<view a:if={{(item.status=="3")}}>
<!-- 已完成 -->
<image class="taskoverbtn " a:if={{(item.taskRateType=="1")}} src={{resList['60e755c5-16de-469e-b54b-d1254d4fdd13'].url}} />
<!-- 明日再来 -->
<image class="taskovertomorrowbtn " a:if={{(item.taskRateType=="2")}} src={{resList['a3b76ef9-f877-4aa1-b07a-b1c971fd8c6d'].url}} />
</view> </view>
<view class="taskitemtext ">
<text class="taskitemtitle ">{{item.title}}</text>
<text class="taskitemcontent ">{{localData[item.taskType].text}} <text class="taskitemcontent2 ">+{{item.rewards}}</text></text>
</view> </view>
</view> </view>
<image class="taskpanelclosebtn " src={{resList['17952009-08e1-4439-b51f-3e4e1e66333f'].url}} />
</view> </view>
<image class="taskpanelclosebtn " onTap="hiddenPanelEvent" data-value="taskpanel" src={{resList['17952009-08e1-4439-b51f-3e4e1e66333f'].url}} />
</view>
\ No newline at end of file
'use strict'; 'use strict';
import { DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
Component({ Component({
props: {}, props: {},
data: {}, data: {
methods: {}, localData:{
//关注店铺
onInit(props) { follow:{
icon:"",
text:"翻牌次数",
},
//群聊
groupChat:{
icon:"",
text:"翻牌次数",
},
//加入会员
member:{
icon:"",
text:"翻牌次数",
},
//下单商品
orderGoods:{
icon:"",
text:"每下单一个商品,翻牌次数",
},
//收藏商品
collectGoods:{
icon:"",
text:"每收藏一个商品,翻牌次数",
},
//下单定金商品
orderDepositGoods:{
icon:"",
text:"每下一笔定金,翻牌次数",
},
//邀请
invites:{
icon:"",
text:"每邀请一位,翻牌次数",
},
//跳转页面
jumpLink:{
icon:"",
text:"翻牌次数",
},
}
},
methods: {
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
this.setData({ this.setData({
resList: resList resList: resList,
TaskList:DataCenter.TaskList
}); });
} },
}); });
\ No newline at end of file
.taskpanel{
position:absolute !important;
top:auto !important;
bottom:0rpx !important;
left:0rpx !important;
margin-left:0rpx!important;
}
.taskpanel .taskbody .taskitem{
position:relative!important;
margin-bottom:20rpx;
}
.taskitemcontent2{
color:#ff7006;
padding-left:10rpx;
}
.taskpanel .taskbody .taskitem .taskitemtext .taskitemcontent{
width:314rpx!important;
font-size:22rpx!important;
}
.taskpanel .taskbody{
overflow-y:scroll;
}
\ No newline at end of file
<view class="win_bg" a:if={{showWinLists.length>0}}> <view class="win_bg" a:if={{showWinLists.length>0}}>
<rulepanel a:if={{showWinLists.indexOf("rulepanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" /> <rulepanel a:if={{showWinLists.indexOf("rulepanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<getcardpanel a:if={{showWinLists.indexOf("getcardpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" /> <getcardpanel a:if={{showWinLists.indexOf("getcardpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<joinmemberpanel a:if={{showWinLists.indexOf("joinmemberpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<nonumberpanel a:if={{showWinLists.indexOf("nonumberpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<mycardpanel a:if={{showWinLists.indexOf("mycardpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<taskpanel a:if={{showWinLists.indexOf("taskpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<prizetipspanel a:if={{showWinLists.indexOf("prizetipspanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
</view> </view>
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"rulepanel":"../../components/comrulepanel/comrulepanel", "rulepanel":"../../components/comrulepanel/comrulepanel",
"getcardpanel":"../../components/comgetcardpanel/comgetcardpanel" "getcardpanel":"../../components/comgetcardpanel/comgetcardpanel",
"joinmemberpanel":"../../components/comjoinmemberpanel/comjoinmemberpanel",
"nonumberpanel":"../../components/comnonumberpanel/comnonumberpanel",
"mycardpanel":"../../components/commycardpanel/commycardpanel",
"taskpanel":"../../components/comtaskpanel/comtaskpanel",
"prizetipspanel":"../../components/comprizetipspanel/comprizetipspanel"
} }
} }
\ No newline at end of file
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
<image class="indexcarditem " src={{resList['582957e3-5fb8-4079-a2a3-78e40bb8950b'].url}} /> <image class="indexcarditem " src={{resList['582957e3-5fb8-4079-a2a3-78e40bb8950b'].url}} />
</view> </view>
<view class="indexunlockprizesbody "> <view class="indexunlockprizesbody ">
<view class="indexunlockprizesitem " a:for={{collectedCardTypePrizeList}}> <view class="indexunlockprizesitem "
a:for={{collectedCardTypePrizeList}}
onTap='showOptions' data-value={{index}}
>
<image a:if={{item.status == 3}} class="unlockover " src={{resList['26336845-54c5-4a6f-a97e-f3f13d3fef27'].url}} /> <image a:if={{item.status == 3}} class="unlockover " src={{resList['26336845-54c5-4a6f-a97e-f3f13d3fef27'].url}} />
<view a:if={{item.status == 2}} class="unlockready "> <view a:if={{item.status == 2}} class="unlockready ">
<image class="unlockreadyicon " src={{resList['a2bdbf64-229d-46a1-89df-43b3537ab255'].url}} /> <image class="unlockreadyicon " src={{resList['a2bdbf64-229d-46a1-89df-43b3537ab255'].url}} />
...@@ -49,12 +52,12 @@ ...@@ -49,12 +52,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="indexmycardbtn btn"> <view class="indexmycardbtn btn" onTap="openMyCard">
<image class="indexmycardbtnbg " src={{resList['0f9fe800-6f3a-4a3d-a76c-93378a58e261'].url}} /> <image class="indexmycardbtnbg " src={{resList['0f9fe800-6f3a-4a3d-a76c-93378a58e261'].url}} />
<view class="indexmycardbtncount fontVerticalCenter">{{cardTypeCollectedCount}}/{{cardTypeCount}} </view> <view class="indexmycardbtncount fontVerticalCenter">{{cardTypeCollectedCount}}/{{cardTypeCount}} </view>
</view> </view>
<image class="indextaskbtn btn" src={{resList['ddece383-122a-4ed6-b035-dc695987650d'].url}} /> <image class="indextaskbtn btn" onTap="openTaskPanel" src={{resList['ddece383-122a-4ed6-b035-dc695987650d'].url}} />
// <view class="indexjoinbtn btn" onTap="doJoin"> <view class="indexjoinbtn btn" onTap="doJoin">
<image class="indexjoinbtnbg " src={{resList['1f2538c3-c2fb-4792-9c6d-7cd756ed64ba'].url}} /> <image class="indexjoinbtnbg " src={{resList['1f2538c3-c2fb-4792-9c6d-7cd756ed64ba'].url}} />
<view class="indexjoinbtncount "> <view class="indexjoinbtncount ">
<image class="indexjoinbtncountbg " src={{resList['c7838e10-23c7-4127-b5c6-c137c88aa26e'].url}} /> <image class="indexjoinbtncountbg " src={{resList['c7838e10-23c7-4127-b5c6-c137c88aa26e'].url}} />
...@@ -65,12 +68,14 @@ ...@@ -65,12 +68,14 @@
<image class="indextipsbg " src={{resList['56a14158-6000-4af4-85ec-d664ac69e769'].url}} /> <image class="indextipsbg " src={{resList['56a14158-6000-4af4-85ec-d664ac69e769'].url}} />
<view class="indextipstext ">收集不同卡牌,解锁更多福利</view> <view class="indextipstext ">收集不同卡牌,解锁更多福利</view>
</view> </view>
<view class="indexpropbody "> <view class="indexpropbody " a:if={{CarouselListNow}}>
<image class="indexpropbg " src={{resList['6339ed53-138d-44ff-944a-ba6999851277'].url}} /> <image class="indexpropbg " src={{resList['6339ed53-138d-44ff-944a-ba6999851277'].url}} />
<view class={{opacityState}}>
<image class="indexpropavatar " src={{CarouselListNow.avatar}} /> <image class="indexpropavatar " src={{CarouselListNow.avatar}} />
<view class="indexpropuname textOverflow">{{CarouselListNow.userNick}}</view> <view class="indexpropuname textOverflow">{{CarouselListNow.userNick}}</view>
<view class="indexproptext textOverflow">获得{{CarouselListNow.name}}</view> <view class="indexproptext textOverflow">获得{{CarouselListNow.name}}</view>
</view> </view>
</view>
<image class="indexrulebtn " onTap="showPanelEvent" data-value="{{'rulepanel'}}" src={{resList['abc5f112-fa04-42fa-bfec-f633567807c8'].url}} /> <image class="indexrulebtn " onTap="showPanelEvent" data-value="{{'rulepanel'}}" src={{resList['abc5f112-fa04-42fa-bfec-f633567807c8'].url}} />
<image class="indexrecordbtn " src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} /> <image class="indexrecordbtn " src={{resList['5a6679e0-89f7-4582-a89b-116a35e9750a'].url}} />
</view> </view>
......
...@@ -6,13 +6,15 @@ const app = getApp(); ...@@ -6,13 +6,15 @@ const app = getApp();
const { tbcc } = app; const { tbcc } = app;
const { SHARE_CONFIG, REDIRECT_URL } = tbcc.constants; const { SHARE_CONFIG, REDIRECT_URL } = tbcc.constants;
import API from '../../api'; import API from '../../api';
import { DataCenter } from '../../DataCenter';
const { commonToast, getAuthUserInfo, navigateToOutside } = tbcc.tb; const { commonToast, getAuthUserInfo, navigateToOutside } = tbcc.tb;
let time1,time2
Page({ Page({
data: { data: {
// showWinLists:["rulepanel","getcardpanel"], showWinLists:[],
showWinLists:[] opacityState:"opacityShow"
}, },
onLoad(props) { onLoad(props) {
...@@ -32,6 +34,10 @@ Page({ ...@@ -32,6 +34,10 @@ Page({
let BaseInfo = await API.getActivityBaseInfoById({ activityId }).catch(res => { let BaseInfo = await API.getActivityBaseInfoById({ activityId }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
let { rule }=BaseInfo.data;
DataCenter.rule=rule;
//获取首页基础信息 //获取首页基础信息
let CollectCardInfo = await API.getCollectCardInfo({ activityId }).catch(res => { let CollectCardInfo = await API.getCollectCardInfo({ activityId }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
...@@ -46,6 +52,9 @@ Page({ ...@@ -46,6 +52,9 @@ Page({
joinedTimes joinedTimes
} = CollectCardInfo.data; } = CollectCardInfo.data;
DataCenter.CollectCardInfo = CollectCardInfo.data;
this.setData({ this.setData({
BaseInfo, BaseInfo,
CollectCardInfo, CollectCardInfo,
...@@ -59,6 +68,7 @@ Page({ ...@@ -59,6 +68,7 @@ Page({
this.setCarouselList() this.setCarouselList()
}, },
//奖品轮播
async setCarouselList(){ async setCarouselList(){
const { activityId } = getApp(); const { activityId } = getApp();
//获取中奖轮播 //获取中奖轮播
...@@ -71,16 +81,59 @@ Page({ ...@@ -71,16 +81,59 @@ Page({
CarouselListNow:list[0] CarouselListNow:list[0]
}) })
let i=0 let i=0
setInterval(()=>{ this.setData({
opacityState:"opacityShow"
})
clearInterval(time1)
clearTimeout(time2)
time1=setInterval(()=>{
if(list[i]){ if(list[i]){
i++ i++
}else{ }else{
i=0 i=0
} }
this.setData({
opacityState:"opacityShow"
})
this.setData({ this.setData({
CarouselListNow:list[i] CarouselListNow:list[i]
}) })
},1000) time2=setTimeout(() => {
this.setData({
opacityState:"opacityHide"
})
}, 1500);
},2000)
},
//展示不可领取礼盒中的奖励
async showOptions(e){
let i=e.target.dataset.value;
DataCenter.prizeList=this.data.collectedCardTypePrizeList[i].prizeList;
this.showPanel("prizetipspanel")
},
//打开我的卡牌弹窗
async openMyCard(){
const { activityId } = getApp();
//获取中奖轮播
let MyCardsInfo = await API.getMyCardsInfo({ activityId }).catch(res => {
commonToast(res && res.message);
}) || {};
if(MyCardsInfo&&MyCardsInfo.success){
DataCenter.MyCardsInfo=MyCardsInfo.data.list;
this.showPanel("mycardpanel")
}
},
//打开任务面板弹窗
async openTaskPanel(){
const { activityId } = getApp();
//获取中奖轮播
let TaskList = await API.getTaskList({ activityId }).catch(res => {
commonToast(res && res.message);
}) || {};
if(TaskList&&TaskList.success){
DataCenter.TaskList=TaskList.data.list;
this.showPanel("taskpanel")
}
}, },
/** /**
...@@ -90,17 +143,28 @@ Page({ ...@@ -90,17 +143,28 @@ Page({
let name = e.target.dataset.value; let name = e.target.dataset.value;
this.showPanel(name) this.showPanel(name)
}, },
//立即翻拍
async doJoin(){ async doJoin(){
//抽卡 //抽卡
const { activityId } = getApp(); const { activityId } = getApp();
let doJoin = await API.doJoin({ activityId }).catch(res => { let doJoin = await API.doJoin({ activityId }).catch(res => {
console.log(res)
if(res.code=="310003"){
//需要加入会员
this.showPanel("joinmemberpanel");
}else if(res.code=="730004"){
//没有抽卡次数
this.showPanel("nonumberpanel");
}else{
commonToast(res && res.message); commonToast(res && res.message);
}
}) || {}; }) || {};
this.setData({ if(doJoin&&doJoin.success){
doJoinData:doJoin DataCenter.doJoinData=doJoin;
}) this.showPanel("getcardpanel");
this.showPanel("getcardpanel") }
}, },
/** /**
* 点击关闭弹窗 * 点击关闭弹窗
......
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
display: inline-block !important; display: inline-block !important;
} }
.opacityShow{
opacity:1;
transition: 0.5s;
}
.opacityHide{
opacity:0;
transition: 0.5s;
}
.indexpage .indexcontent .indexpropbody .indexpropavatar{ .indexpage .indexcontent .indexpropbody .indexpropavatar{
border-radius:50% border-radius:50%
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment