Commit 3b67e376 authored by Edwise's avatar Edwise 🍷

pk结束弹窗增加

parent 129cd2c8
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import './compkfailnoprizemodal.less';
class Compkfailnoprizemodal extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
render() {
return (
<div className="pkfailnoprizemodal ">
<img className="pkfailnoprizebg " src={this.state.resList['d968742a-852e-4f47-9657-a18b3ea15e04'].url} />
<img className="pkfailnoprizebtn " src={this.state.resList['9a1b9fb4-4087-4082-9160-e0085ba2b12d'].url} />
<img className="pkfailnoprizeclose " src={this.state.resList['78ed2fc7-6125-47e5-8120-15fd90f36c0d'].url} />
</div>
);
}
}
export default Compkfailnoprizemodal;
\ No newline at end of file
.pkfailnoprizemodal {
width: 527px;
height: 579px;
opacity: 1;
left: 112px;
top: 375px;
position: absolute;
transform-origin: 0px 0px 0px;
.pkfailnoprizebg {
width: 527px;
height: 477px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.pkfailnoprizebtn {
width: 363px;
height: 73px;
opacity: 1;
left: 82px;
top: 345px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.pkfailnoprizeclose {
width: 72px;
height: 72px;
opacity: 1;
left: 227px;
top: 507px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import './compksuccessnoprizemodal.less';
class Compksuccessnoprizemodal extends Component {
constructor(props) {
super(props);
this.state = { resList: resList };
}
render() {
return (
<div className="pksuccessnoprizemodal ">
<img className="pksuccessnoprizebg " src={this.state.resList['9db83ecb-f8c3-4392-9d92-7c5ce5572b8b'].url} />
<img className="pksuccessnoprizebtn " src={this.state.resList['ede003f5-0f75-4175-8113-d8492f58fbd0'].url} />
<img className="pksuccessnoprizeclose " src={this.state.resList['01587dc4-48e2-4a53-ba37-14a5c2026791'].url} />
</div>
);
}
}
export default Compksuccessnoprizemodal;
.pksuccessnoprizemodal {
width: 527px;
height: 470px;
opacity: 1;
left: 112px;
top: 375px;
position: absolute;
transform-origin: 0px 0px 0px;
.pksuccessnoprizebg {
width: 527px;
height: 367px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.pksuccessnoprizebtn {
width: 363px;
height: 73px;
opacity: 1;
left: 82px;
top: 232px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.pksuccessnoprizeclose {
width: 72px;
height: 72px;
opacity: 1;
left: 227px;
top: 398px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
.pkfailnoprizemodal {
width: 527rpx;
height: 579rpx;
opacity: 1;
left: 112rpx;
top: 505rpx;
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.pkfailnoprizemodal .pkfailnoprizebg {
width: 527rpx;
height: 477rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pkfailnoprizemodal .pkfailnoprizebtn {
width: 363rpx;
height: 73rpx;
opacity: 1;
left: 82rpx;
top: 345rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pkfailnoprizemodal .pkfailnoprizeclose {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 227rpx;
top: 507rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
<view class="pkfailnoprizemodal modal-animate-zoom-in">
<image class="pkfailnoprizebg " src={{resList['d968742a-852e-4f47-9657-a18b3ea15e04'].url}} />
<image class="pkfailnoprizebtn " onTap="redirectToIndex" src={{resList['9a1b9fb4-4087-4082-9160-e0085ba2b12d'].url}} />
<image class="pkfailnoprizeclose " onTap="redirectToIndex" src={{resList['78ed2fc7-6125-47e5-8120-15fd90f36c0d'].url}} />
</view>
\ No newline at end of file
'use strict';
import resList from '../../resconfig/resList';
Component({
props: {},
data: {
resList: resList
},
methods: {
redirectToIndex(){
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
onModalClose(){
}
},
});
\ No newline at end of file
......@@ -69,12 +69,26 @@
color: #000000;
text-align: center;
}
.pksuccessmodal .pksuccessmodaltext .pkfailedtitle {
width: 527rpx;
height: 23rpx;
opacity: 1;
left: -68rpx;
top: 178rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #000000;
text-align: center;
}
.pksuccessmodal .pksuccessmodaltext .pksuccessitemname {
width: 390rpx;
height: 29rpx;
opacity: 1;
left: 0rpx;
top: 524rpx;
top: 518rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 30rpx;
......@@ -111,3 +125,13 @@
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pksuccessmodal .pkPrizeImg {
width: 260rpx;
height: 260rpx;
opacity: 1;
display: block;
left: 132rpx;
top: 286rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
<view class="pksuccessmodal modal-animate-zoom-in">
<image class="pksuccessbg " src={{resList['3f303d14-42ae-4007-9f98-b0eed2d2ff65'].url}} />
<view class="pksuccessmodaltext ">
<label class="pksuccesstitle2 ">游戏已结束</label>
<label class="pksuccesstitle1 ">{{isWinTitle}}</label>
<label class="pksuccesstemp " a:if="{{isWin}}">{{warmText}}</label>
<label class="pksuccesslw " a:if="{{isWin}}">蕉内送您一份小礼物</label>
<label class="pksuccessitemname ">{{prizeName}}</label>
<label class="pksuccessp ">奖品可在 我的奖品 中查看</label>
<label class="pkfailedtitle" a:if="{{!isWin}}">继续加油,蕉内送您一份小礼物</label>
</view>
<image class="pksuccessmodalbtn " onTap="redirectToIndex" src={{resList['75801bab-c16e-4814-ab19-081933e4abc5'].url}} />
<image class="pksuccessmodalclose " onTap="redirectToIndex" src={{resList['5eee69bb-482c-4ce0-beb1-c7c38cdb6fe4'].url}} />
<image class="pkPrizeImg " src={{prizeImg}} />
</view>
'use strict';
import resList from '../../resconfig/resList';
import API from '../../api';
const app = getApp();
const {
tbcc
} = app;
const {
commonToast
} = tbcc.tb;
Component({
props: {
gameOverData:{
warms:100,
isWin:true,
prize:{
name:'商品名称',
image: '//yun.duiba.com.cn/spark/assets/万能卡图片.a958c11565bbdb955ee73dd03532a6bbe86cfb1f.png'
}
}
},
data: {
resList: resList,
isWinTitle:'',
isWin:false,
prizeName:'',
prizeImg:'',
warmText:''
},
methods: {
redirectToIndex(){
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
},
didMount(){
const {warms,isWin,prize} = this.props.gameOverData;
let str = '';
let str1 = '';
if(isWin){
str = '恭喜您PK成功';
str1 = '体感温度高达'+warms+'℃,是最高温队伍'
}else{
str = '很遗憾PK失败'
}
this.setData({
isWinTitle:str,
isWin:isWin,
prizeName:prize.name,
prizeImg:prize.image,
warmText:str1
})
}
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="pksuccessmodal ">
<image class="pksuccessbg " src={{resList['3f303d14-42ae-4007-9f98-b0eed2d2ff65'].url}} />
<view class="pksuccessmodaltext ">
<span class="pksuccesstitle2 ">游戏已结束</span>
<span class="pksuccesstitle1 ">恭喜您PK成功</span>
<span class="pksuccesstemp ">体感温度高达56℃,是最高温队伍</span>
<span class="pksuccesslw ">蕉内送您一份小礼物</span>
<span class="pksuccessitemname ">产品六字名称</span>
<span class="pksuccessp ">奖品可在 我的奖品 中查看</span>
</view>
<image class="pksuccessmodalbtn " src={{resList['75801bab-c16e-4814-ab19-081933e4abc5'].url}} />
<image class="pksuccessmodalclose " src={{resList['5eee69bb-482c-4ce0-beb1-c7c38cdb6fe4'].url}} />
</view>
\ No newline at end of file
.pksuccessnoprizemodal {
width: 527rpx;
height: 470rpx;
opacity: 1;
left: 112rpx;
top: 505rpx;
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.pksuccessnoprizemodal .pksuccessnoprizebg {
width: 527rpx;
height: 367rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pksuccessnoprizemodal .pksuccessnoprizebtn {
width: 363rpx;
height: 73rpx;
opacity: 1;
left: 82rpx;
top: 232rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pksuccessnoprizemodal .pksuccessnoprizeclose {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 227rpx;
top: 398rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
<view class="pksuccessnoprizemodal modal-animate-zoom-in">
<image class="pksuccessnoprizebg " src={{resList['9db83ecb-f8c3-4392-9d92-7c5ce5572b8b'].url}} />
<image class="pksuccessnoprizebtn " onTap="redirectToIndex" src={{resList['ede003f5-0f75-4175-8113-d8492f58fbd0'].url}} />
<image class="pksuccessnoprizeclose " onTap="redirectToIndex" src={{resList['01587dc4-48e2-4a53-ba37-14a5c2026791'].url}} />
</view>
\ No newline at end of file
......@@ -3,13 +3,14 @@
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
onInit(props) {
this.setData({
resList: resList
});
}
data: {resList: resList},
methods: {
redirectToIndex(){
my.redirectTo({url:'/pages/pagepageindex/pagepageindex'})
},
onModalClose(){
}
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -84,4 +84,9 @@
<image class="gamemppimg4" src={{resList['e1e081d9-bda3-4cba-bef3-85bebd352ee2'].url}} />
</view>
</view>
</view>
\ No newline at end of file
</view>
<!-- <view class="popcontainer"><pkprize-modal></pkprizeModal></view> -->
<view class="popcontainer"><pkfailnoprize-modal></pkfailnoprize-modal></view>
<!-- <view class="popcontainer"><pksuccessnoprize-modal></pksuccessnoprize-modal></view> -->
{
"usingComponents": {}
"usingComponents": {
"pkprize-modal": "/components/compkprizemodal/compkprizemodal",
"pknoprize-modal": "/components/compknoprizemodal/compknoprizemodal",
"pkfailnoprize-modal": "/components/compkfailnoprizemodal/compkfailnoprizemodal",
"pksuccessnoprize-modal": "/components/compksuccessnoprizemodal/compksuccessnoprizemodal"
}
}
\ No newline at end of file
......@@ -454,6 +454,43 @@ const resList = {
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/gamembtn.08993a3117406e668fa32fe0ebe844aa29ec5868.png',
uuid: 'e1e081d9-bda3-4cba-bef3-85bebd352ee2',
},
'9db83ecb-f8c3-4392-9d92-7c5ce5572b8b': {
name: 'pksuccessNoPrizeBg',
ext: '.png',
uuid: '9db83ecb-f8c3-4392-9d92-7c5ce5572b8b',
url: '//yun.duiba.com.cn/spark/assets/dd903604828653501409fe895a5a427f0d9a655c.png'
},
'ede003f5-0f75-4175-8113-d8492f58fbd0': {
name: 'pksuccessNoPrizeBtn',
ext: '.png',
uuid: 'ede003f5-0f75-4175-8113-d8492f58fbd0',
url: '//yun.duiba.com.cn/spark/assets/247ca5d4a478f800713a5e46ec59bf9fdaafc09d.png'
},
'01587dc4-48e2-4a53-ba37-14a5c2026791': {
name: 'pksuccessNoPrizeClose',
ext: '.png',
uuid: '01587dc4-48e2-4a53-ba37-14a5c2026791',
url: '//yun.duiba.com.cn/spark/assets/e5d745b7b64877323cbe22be1c9e0f7ef00f145c.png'
},
'd968742a-852e-4f47-9657-a18b3ea15e04': {
name: 'pkNoPrizeBg',
ext: '.png',
uuid: 'd968742a-852e-4f47-9657-a18b3ea15e04',
url: '//yun.duiba.com.cn/spark/assets/1d54a4432973187f764e15694e2047f63039f5ec.png'
},
'9a1b9fb4-4087-4082-9160-e0085ba2b12d': {
name: 'pkNoPrizeBtn',
ext: '.png',
uuid: '9a1b9fb4-4087-4082-9160-e0085ba2b12d',
url: '//yun.duiba.com.cn/spark/assets/247ca5d4a478f800713a5e46ec59bf9fdaafc09d.png'
},
'78ed2fc7-6125-47e5-8120-15fd90f36c0d': {
name: 'pkNoPrizeClose',
ext: '.png',
uuid: '78ed2fc7-6125-47e5-8120-15fd90f36c0d',
url: '//yun.duiba.com.cn/spark/assets/e5d745b7b64877323cbe22be1c9e0f7ef00f145c.png'
}
};
export default resList;
\ No newline at end of file
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