Commit 61f7815a authored by Edwise's avatar Edwise 🍷

pk结束相关弹窗

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