Commit 61f7815a authored by Edwise's avatar Edwise 🍷

pk结束相关弹窗

parent 612c56e2
......@@ -16,6 +16,10 @@ App({
tbcc,
onLaunch(options) {
this.handleQuery(options.query || {});
// my.setNavigationBar({
// title: '蕉内抱团取暖',
// backgroundColor: '#000000',
// });
},
onShow(options) {
// 从后台被 scheme 重新打开
......
......@@ -12,12 +12,13 @@ const {
Component({
props: {
gameOverData:{
warms:100,
isWin:true,
prize:{
name:'商品名称',
image: '//yun.duiba.com.cn/spark/assets/万能卡图片.a958c11565bbdb955ee73dd03532a6bbe86cfb1f.png'
}
// warms:100,
// isWin:true,
// prize:{
// name:'商品名称',
// image: '//yun.duiba.com.cn/spark/assets/万能卡图片.a958c11565bbdb955ee73dd03532a6bbe86cfb1f.png'
// },
// unLockStep:2
}
},
data: {
......@@ -30,7 +31,15 @@ Component({
},
methods: {
redirectToIndex(){
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
const {isWin,unLockStep} = this.props.gameOverData;
if(isWin&&unLockStep&&unLockStep>1){
const {onLockStep} = this.props;
onLockStep&&onLockStep(this.props.gameOverData)
}else{
const {onClose} = this.props;
onClose&&onClose();
// my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
}
},
},
......
......@@ -2,14 +2,22 @@
import resList from '../../resconfig/resList';
Component({
props: {},
props: {
gameOverData:{}
},
data: {resList: resList},
methods: {
redirectToIndex(){
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
onModalClose(){
const {isWin,unLockStep} = this.props.gameOverData;
console.log("获胜没有奖品",this.props.gameOverData)
if(isWin&&unLockStep&&unLockStep>1){
const {onLockStep} = this.props;
onLockStep&&onLockStep(this.props.gameOverData)
}else{
const {onClose} = this.props;
onClose&&onClose();
// my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
}
}
},
......
......@@ -30,7 +30,7 @@
left: 651rpx;
top: -91rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.task .taskmodaltitle {
width: 750rpx;
......
<view class="taskcontainer ">
<view class="task ">
<image class="task_bg " src={{resList['feaed213-a6d1-4e32-8444-5c823923f299'].url}} />
<image class="task_close " onTap="onModalClose" src={{resList['8797382d-2b38-432e-85d3-6a2160304723'].url}} />
<image class="task_close btn" onTap="onModalClose" src={{resList['8797382d-2b38-432e-85d3-6a2160304723'].url}} />
<label class="taskmodaltitle">任务中心</label>
<view class="task_list">
<view class="task_item " a:for="{{list}}">
......@@ -16,7 +16,8 @@
<image class="task_readicon " a:if="{{item.taskType=='browseGoods'}}" src={{resList['e3bef9e1-07a4-408d-b387-a9ac08c4b7f0'].url}} />
<image class="task_favoricon " a:if="{{item.taskType=='collectGoods'}}" src={{resList['a03d17c7-c4f0-42e0-9430-be61f5eb68d5'].url}} />
<label class="task_title ">{{item.title}}</label>
<label class="task_title " a:if="{{item.taskType!='sign'}}">{{item.title}}</label>
<label class="task_title " a:if="{{item.taskType=='sign'}}">{{item.title}}({{item.todayCompleteTimes}}/{{item.times}})</label>
<label class="task_award ">温暖值 +{{item.rewards}}</label>
<block>
<!-- <label class="task_progress " a:if="{{item.taskType=='invites'}}">(不限次数)</label>
......
......@@ -5,7 +5,7 @@
left: 111rpx;
top: 388rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.unlockstepmodal .unlockstepbg {
width: 527rpx;
......
<view class="unlockstepmodal ">
<view class="unlockstepmodal modal-animate-zoom-in">
<image class="unlockstepbg " src={{resList['cae8e0bb-e05f-4bc7-b77d-24b9f1e9492c'].url}} />
<view class="unlocksteptext ">
<label class="unlocksteptitle1 ">{{title1}}</label>
......
......@@ -18,18 +18,18 @@ Component({
},
methods: {
redirectToIndex(){
const {onCloseModal} = this.props;
onCloseModal&&onCloseModal();
const {onClose} = this.props;
onClose&&onClose();
// my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
navigateToGoodsDetail(){
const unLockStep = this.props.unLockStep;
const {unLockStep} = this.props.gameOverData;
let url = unLockStep==2?'https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687dPr2HpU&id=625400191293':'https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687dPr2HpU&id=627409975355'
navigateToOutside(url)
}
},
didMount(){
const unLockStep = this.props.unLockStep;
const {unLockStep,warms}= this.props.gameOverData;
let str = unLockStep==2?'恭喜您解锁5系赛段':'恭喜您解锁7系赛段';
let str1 = unLockStep==3?'进入三人场':'进入四人场';
this.setData({
......
......@@ -91,10 +91,10 @@
</view>
</view>
</scroll-view>
<view class="popcontainer" a:if="{{pkshow1_v}}"><pkprize-modal onClose="closetohome" gameOverData="{{pk1data}}"></pkprize-modal></view>
<view class="popcontainer" a:if="{{pkshow2_v}}"><pknoprize-modal onClose="closetohome" gameOverData="{{pk2data}}"></pknoprize-modal></view>
<view class="popcontainer" a:if="{{pkshow3_v}}"><pkfailnoprize-modal onClose="closetohome" gameOverData="{{pk3data}}"></pkfailnoprize-modal></view>
<view class="popcontainer" a:if="{{pkshow4_v}}"><pksuccessnoprize-modal onClose="closetohome" gameOverData="{{pk4data}}"></pksuccessnoprize-modal></view>
<view class="popcontainer" a:if="{{pkshow1_v}}"><pkprize-modal onClose="closetohome" onLockStep="openLockStep" gameOverData="{{pk1data}}"></pkprize-modal></view>
<view class="popcontainer" a:if="{{pkshow2_v}}"><pknoprize-modal onClose="closetohome" gameOverData="{{pk1data}}"></pknoprize-modal></view>
<view class="popcontainer" a:if="{{pkshow3_v}}"><pkfailnoprize-modal onClose="closetohome" gameOverData="{{pk1data}}"></pkfailnoprize-modal></view>
<view class="popcontainer" a:if="{{pkshow4_v}}"><pksuccessnoprize-modal onClose="closetohome" onLockStep="openLockStep" gameOverData="{{pk1data}}"></pksuccessnoprize-modal></view>
<view class="popcontainer" a:if="{{toolshow_v}}"><tempitem-modal onClose="usetool1"></tempitem-modal></view>
<view class="popcontainer_down" a:if="{{taskshow_v}}"><task-modal onClose="closeTask"></task-modal></view>
<view class="popcontainer" a:if="{{lockstepshow_v}}"><lockstep-modal onCloseModal="closetohome"></lockstep-modal></view>
\ No newline at end of file
<view class="popcontainer" a:if="{{lockstepshow_v}}"><lockstep-modal gameOverData="{{unLockPkData}}" onClose="closetohome"></lockstep-modal></view>
\ No newline at end of file
......@@ -73,6 +73,9 @@ Page({
pkshow4_v: false,
toolshow_v: false,
taskshow_v: false,
unLockPkData:{
},
pk1data: {
warms: 0,
isWin: false,
......@@ -273,7 +276,8 @@ Page({
})
const { success, data } = overdata;
if (success) {
const { warms, isWin, prize, unLockStep } = overdata;
const { warms, isWin, prize, unLockStep } = data;
console.log("over",data)
if (isWin) {
if (prize && prize.image && prize.image.length > 0) {
this.setData({
......@@ -281,12 +285,27 @@ Page({
})
this.openprize1();
} else {
this.setData({
pk1data: data
})
this.openprize4();
}
}else{
if (prize && prize.image && prize.image.length > 0) {
this.setData({
pk1data: data
})
this.openprize1();
} else {
this.setData({
pk1data: data
})
this.openprize3();
}
}
// console.log("结束数据", overdata);
}
this.openprize1();
// this.openprize1();
},
//匹配3s,切换活动
changePashow() {
......@@ -548,7 +567,10 @@ Page({
this.closeprize2();
this.closeprize3();
this.closeprize4();
my.navigateBack();
this.closeLockStep();
this.closeTask();
// my.navigateBack();
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
//打开道具页面
......@@ -618,8 +640,13 @@ Page({
})
},
openLockStep(){
openLockStep(data){
this.closeprize1();
this.closeprize2();
this.closeprize3();
this.closeprize4();
this.setData({
unLockPkData:data,
lockstepshow_v:true
})
},
......
......@@ -19,16 +19,15 @@
pointer-events: none;
}
.curWarms {
font-size: 36rpx;
}
.pageindex {
width: 750rpx;
height: 1624rpx;
opacity: 1;
position: absolute;
left: 50%;
top: 50%;
margin-left: -375rpx;
margin-top: -812rpx;
transform-origin: 0rpx 0rpx 0rpx;
}
.pageindex .bg {
......@@ -39,6 +38,15 @@
transform-origin: 0rpx 0rpx 0rpx;
z-index: 0;
}
.pageindex .jbLogo {
width: 239rpx;
height: 59rpx;
opacity: 1;
left: 256rpx;
top: 130rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pageindex .sai_duan {
width: 568rpx;
height: 188rpx;
......@@ -177,6 +185,7 @@
height: 35rpx;
opacity: 1;
left: -93rpx;
top: -10rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 36rpx;
......@@ -215,7 +224,7 @@
width: 32rpx;
height: 125rpx;
opacity: 1;
top: 210rpx;
top: 130rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
......@@ -224,7 +233,7 @@
height: 70rpx;
opacity: 1;
left: 678rpx;
top: 238rpx;
top: 158rpx;
position: absolute;
transform-origin: 100% 0rpx 0rpx;
}
<view class="pageindex ">
<image class="bg " src={{resList['3ee62d6c-3e44-470b-b2a5-fb805ec6a6c3'].url}} />
<image class="jbLogo " src={{resList['23b7797e-e924-48b1-8afa-7412722a0bc9'].url}} />
<view class="sai_duan ">
<image class="battle7 " a:if="{{curGameStep<3}}" src={{resList['bc577ab5-4214-43b4-93ff-e9e24c9cec62'].url}} />
<image class="battle5 " a:if="{{curGameStep<2}}" src={{resList['64d76df1-a48b-4d97-9c94-07164242403f'].url}} />
......@@ -22,8 +22,8 @@
<view class="wen_zi2 ">
<label class="superise ">赢2999元惊喜礼包</label>
<view class="lei_ji_sheng_chang ">
<label class="curtemp ">当前温暖值:{{curWarms}}</label>
<label class="currank ">排名位于第 {{curRank}}位</label>
<label class="curtemp ">当前温暖值:<text class="curWarms " style="size:{{'30rpx'}}">{{curWarms}}</text></label>
<label class="currank ">排名位于第 <text class="curWarms " style="size:{{'30rpx'}}">{{curRank}}</text> 位</label>
</view>
</view>
<image class="rankbtn btn" onTap="navigateTo" data-item="pagepagerank" src={{resList['c57b33fc-8a26-4f7c-9a62-d0d16cae3406'].url}} />
......
......@@ -114,7 +114,7 @@ Page({
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 275;
mv.y = 785;
mv.y = 755;
console.log("svgmv", mv)
},
......@@ -128,7 +128,7 @@ Page({
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 175;
mv.y = 585;
mv.y = 565;
console.log("svgmv", mv)
},
......@@ -203,12 +203,12 @@ Page({
success,
data
} = await API.getActivityBaseInfoById().catch(r => {
my.hideLoading();
// my.hideLoading();
commonToast(r && r.message)
}) || {};
if (success) {
my.hideLoading();
// my.hideLoading();
app.activityInfo = data;
this.judgeDoHelp();
}
......@@ -234,9 +234,10 @@ Page({
commonToast(r && r.message);
}) || {};
if (success) {
let str = data.rank>500?'500+':data.rank
this.setData({
curWarms: data.warms + '',
curRank: data.rank,
curRank: str,
curGameStep: data.step
})
my.hideLoading();
......@@ -261,6 +262,8 @@ Page({
commonToast("3s入会,即可为好友助力", 1500, () => {
navigateToOutside(data.url);
})
}else{
commonToast(message||'')
}
my.hideLoading();
}
......
......@@ -535,5 +535,11 @@ const resList = {
uuid: '90b5f539-4c56-4210-937e-8dd359fbb2b0',
url: '//yun.duiba.com.cn/spark/assets/e277525ee0fc79fd8ba839f2787c58dc4c94421b.png'
},
'23b7797e-e924-48b1-8afa-7412722a0bc9': {
name: 'jnlogo',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/jnlogo.9fc9cd6aec47a73db43f0c4f56da6c3c6f94a0bd.png',
uuid: '23b7797e-e924-48b1-8afa-7412722a0bc9'
},
};
export default resList;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@
"success": true,
"data": {
"unLockStep": 2,
"warms": 755717.7361683846,
"warms": 100,
"isWin": true,
"prize": {
"name": "qui amet",
......
......@@ -3,7 +3,7 @@
"success": true,
"data": {
"warms": 59,
"rank": "60",
"rank": 510,
"winTimes": 22180029.681882724,
"step": 2,
"openId": -56636935.38550403,
......
......@@ -11,7 +11,7 @@
"status": 3,
"completeTimes": 1,
"times": "3",
"todayCompleteTimes": 50139175.796117544,
"todayCompleteTimes": 1,
"itemIds": "fugiat et magna",
"url": "commodo incididunt in sunt"
},
......@@ -23,8 +23,8 @@
"waitReceive": -37886750.95893747,
"status": 1,
"completeTimes": 1,
"times": "3",
"todayCompleteTimes": 11323128.027142286,
"times": "1",
"todayCompleteTimes": 1,
"itemIds": "tempor sunt consequat consectetur ipsum",
"url": "laborum ad ex"
},
......@@ -37,7 +37,7 @@
"status": 1,
"completeTimes": 1,
"times": "3",
"todayCompleteTimes": -92181455.51032442,
"todayCompleteTimes": 1,
"itemIds": "ullamco enim ipsum eu",
"url": "irure sed"
},
......@@ -50,7 +50,7 @@
"status": 1,
"completeTimes": 3,
"times": "3",
"todayCompleteTimes": 76741045.15144086,
"todayCompleteTimes": 1,
"itemIds": "ullamco",
"url": "nisi occaecat aute sit ut"
}
......
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