Commit f760c225 authored by zhangjinzhou's avatar zhangjinzhou

Merge branch 'jiaoneiqunuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into jiaoneiqunuan

# Conflicts:
#	taobao_jn/client/pages/pagegamemain/pagegamemain.axml
parents c9d77862 bb92b6f9
'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
......@@ -3,13 +3,10 @@
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
data: {
resList: resList
},
methods: {},
onInit(props) {
this.setData({
resList: resList
});
}
});
\ 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
......@@ -23,20 +23,20 @@ Component({
*/
async getActivityBaseInfoById() {
my.showLoading();
const {
success,
data
} = await API.getActivityBaseInfoById().catch(r => {
my.hideLoading();
commonToast(r && r.message)
}) || {};
// const {
// success,
// data
// } = await API.getActivityBaseInfoById().catch(r => {
// my.hideLoading();
// commonToast(r && r.message)
// }) || {};
if (success) {
// if (success) {
my.hideLoading();
this.setData({
rule: data.rule
rule: app.activityInfo.rule
})
}
// }
},
},
didMount(){
......
This diff is collapsed.
{
"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
......@@ -38,6 +38,6 @@
<rule-modal a:if="{{modalStatus==1}}" onCloseModal="closeModal"></rule-modal>
</view>
<view class="popcontainer_down" a:if="{{modalStatus}}">
<view class="popcontainer_down" a:if="{{modalStatus==2}}">
<invitelist-modal a:if="{{modalStatus==2}}" onCloseModal="closeModal"></invitelist-modal>
</view>
'use strict';
import resList from '../../resconfig/resList';
import resList from '../../resconfig/resList';
import API from '../../api';
import * as FYGE from "fyge-tbmini";
import * as SvgaParser from "svga-parser";
......@@ -26,13 +26,13 @@ Page({
/**弹窗状态 */
modalStatus: 0,
/**当前温暖值 */
curWarms:'',
curWarms: '',
/**当前排名 */
curRank:'',
curRank: '',
/**当前游戏阶段 */
curGameStep:1,
curGameStep: 1,
/**活动结束后排行榜奖励信息 */
rankPrize:{}
rankPrize: {}
},
onLoad(props) {
......@@ -54,71 +54,72 @@ Page({
async createMain() {
console.log(123)
var canvas = await new Promise((r) => {
my.createCanvas({
id: 'canvas',
success: (ccc) => {
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr + dpr;//重新修改会有误差
ccc.height = windowHeight * dpr + dpr;
r(ccc);
}
})
my.createCanvas({
id: 'canvas',
success: (ccc) => {
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr + dpr; //重新修改会有误差
ccc.height = windowHeight * dpr + dpr;
r(ccc);
}
})
})
console.log(111)
FYGE.initedByCanvas(canvas)
var sysInfo = my.getSystemInfoSync()
//建舞台
var stage = new FYGE.Stage(
canvas,
750,//设计宽度,按设计搞给的就行
1624,//设计高度
sysInfo && sysInfo.windowWidth || document.body.clientWidth,
sysInfo && sysInfo.windowHeight || document.body.clientHeight,
FYGE.RENDERER_TYPE.CANVAS
canvas,
750, //设计宽度,按设计搞给的就行
1624, //设计高度
sysInfo && sysInfo.windowWidth || document.body.clientWidth,
sysInfo && sysInfo.windowHeight || document.body.clientHeight,
FYGE.RENDERER_TYPE.CANVAS
);
//stage初始化
stage.addEventListener(FYGE.Event.INIT_STAGE, () => {
SvgaParser.loadSvga(
fireSrc,
(v) => {
console.log("svga"+v);
var mv =stage.addChild(new FYGE.MovieClip(v));
mv.x = 275;
mv.y = 785;
console.log("svgmv",mv)
},
(err) => {
console.log(err);
}
)
SvgaParser.loadSvga(
snowSrc,
(v) => {
console.log("svga"+v);
var mv =stage.addChild(new FYGE.MovieClip(v));
mv.x = 175;
mv.y = 585;
console.log("svgmv",mv)
},
(err) => {
console.log(err);
}
)
SvgaParser.loadSvga(
fireSrc,
(v) => {
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 275;
mv.y = 785;
console.log("svgmv", mv)
},
(err) => {
console.log(err);
}
)
SvgaParser.loadSvga(
snowSrc,
(v) => {
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 175;
mv.y = 585;
console.log("svgmv", mv)
},
(err) => {
console.log(err);
}
)
}, this);
//循环
loop();
function loop() {
FYGE.Tween.flush()
stage.flush();
FYGE.getRequestAnimationFrame()(loop);
FYGE.Tween.flush()
stage.flush();
FYGE.getRequestAnimationFrame()(loop);
}
},
/**
* 获取用户授权信息
......@@ -157,29 +158,56 @@ Page({
}) || {};
if (success) {
this.getActivityBaseInfoById();
}
},
/*
* 获取活动信息
*/
async getActivityBaseInfoById() {
my.showLoading();
const {
success,
data
} = await API.getActivityBaseInfoById().catch(r => {
my.hideLoading();
commonToast(r && r.message)
}) || {};
if (success) {
my.hideLoading();
app.activityInfo = data;
this.judgeDoHelp();
}
},
/**判断是否是助力 */
judgeDoHelp(){
judgeDoHelp() {
setInterval(()=>{
},undefined);
console.log("aaa");
this.updateGameInfo();
},
/**更新游戏信息 */
async updateGameInfo(){
async updateGameInfo() {
my.showLoading();
const {success,data} = await API.getGameInfo().catch(r=>{
const {
success,
data
} = await API.getGameInfo().catch(r => {
my.hideLoading();
commonToast(r&&r.message);
})||{};
if(success){
commonToast(r && r.message);
}) || {};
if (success) {
this.setData({
curWarms:data.warms+'',
curRank:data.rank,
curGameStep:data.step
curWarms: data.warms + '',
curRank: data.rank,
curGameStep: data.step
})
my.hideLoading();
}
},
/**打开弹窗 */
openModal(e) {
......@@ -198,7 +226,7 @@ Page({
})
},
/**点击跳转页面 */
navigateTo(e){
navigateTo(e) {
const {
item
} = e.target.dataset;
......
......@@ -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
This diff is collapsed.
{
"code": -15559199.54038009,
"success": true,
"data": {
"joinGameEndTime": 45401690.52271202,
"joinGameStartTime": -54711633.18867665
}
}
\ No newline at end of file
{
"code": 67602235.4640744,
"success": true,
"data": {
"unLockStep": 2,
"warms": 755717.7361683846,
"isWin": true,
"prize": {
"name": "qui amet",
"type": 9463526.756141767,
"image": "in officia veniam nostrud",
"credits": 48315049.4276405
}
}
}
\ No newline at end of file
{
"code": 21840714.309697434,
"success": true,
"data": [
{
"openId": "ex laboris reprehenderit enim in",
"avatar": "aliqua incididunt nulla laborum fugiat",
"userNick": "sit consectetur enim"
},
{
"openId": "id Ut culpa",
"avatar": "consequat ex eu officia veniam",
"userNick": "cillum officia consequat in"
},
{
"openId": "id do esse",
"avatar": "Excepteur sit Lorem ipsum",
"userNick": "ut Ut fugiat"
},
{
"openId": "anim dolor",
"avatar": "ut irure dolor cillum aliqua",
"userNick": "non ex"
},
{
"openId": "eiusmod exercitation nisi sit laborum",
"avatar": "nostrud sunt laboris cupidatat minim",
"userNick": "est in"
},
{
"openId": "proident id reprehenderit Ut dolor",
"avatar": "sed in",
"userNick": "veniam"
},
{
"openId": "irure non ut",
"avatar": "in ullamco",
"userNick": "cupidatat"
},
{
"openId": "ullamco magna nisi",
"avatar": "id laboris aliqua reprehenderit pariatur",
"userNick": "pariatur dolore nisi"
},
{
"openId": "dolore occaecat elit",
"avatar": "aute ullamco",
"userNick": "Excepteur esse Ut voluptate est"
},
{
"openId": "occaecat",
"avatar": "veniam dolore Ut laborum",
"userNick": "in"
}
]
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
"success": true,
"data": {
"myRankInfo": {
"rank": "560",
"rank": "450",
"warms": "1",
"userNick": "caoxingru12"
},
......
{
"code": 84479393.0040682,
"success": true,
"data": {
"total": 23797510.558772445,
"list": [
{
"type": "follow",
"count": 71736628.84235147,
"warms": 31448271.838879377
},
{
"type": "follow",
"count": 74402080.91422823,
"warms": -66725690.75145462
},
{
"type": "follow",
"count": -59343034.60167052,
"warms": -18845556.91745086
},
{
"type": "tool",
"count": 71868834.65446723,
"warms": -30559758.690655768
},
{
"type": "invite",
"count": -50531894.123465456,
"warms": -14260662.376641572
}
]
}
}
\ No newline at end of file
{
"code": -10136272.713883355,
"success": true
}
\ 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