Commit b83bc7b0 authored by Edwise's avatar Edwise 🍷

111

parent 02e54595
......@@ -3,13 +3,13 @@
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
data: {
resList: resList
},
methods: {},
onInit(props) {
this.setData({
resList: resList
});
didMount(){
}
});
\ 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(){
......
......@@ -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>
......@@ -26,13 +26,13 @@ Page({
/**弹窗状态 */
modalStatus: 0,
/**当前温暖值 */
curWarms:'',
curWarms: '',
/**当前排名 */
curRank:'',
curRank: '',
/**当前游戏阶段 */
curGameStep:1,
curGameStep: 1,
/**活动结束后排行榜奖励信息 */
rankPrize:{}
rankPrize: {}
},
onLoad(props) {
......@@ -60,7 +60,7 @@ Page({
const dpr = my.getSystemInfoSync().pixelRatio
const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight;
ccc.width = windowWidth * dpr + dpr;//重新修改会有误差
ccc.width = windowWidth * dpr + dpr; //重新修改会有误差
ccc.height = windowHeight * dpr + dpr;
r(ccc);
}
......@@ -72,8 +72,8 @@ Page({
//建舞台
var stage = new FYGE.Stage(
canvas,
750,//设计宽度,按设计搞给的就行
1624,//设计高度
750, //设计宽度,按设计搞给的就行
1624, //设计高度
sysInfo && sysInfo.windowWidth || document.body.clientWidth,
sysInfo && sysInfo.windowHeight || document.body.clientHeight,
FYGE.RENDERER_TYPE.CANVAS
......@@ -83,11 +83,11 @@ Page({
SvgaParser.loadSvga(
fireSrc,
(v) => {
console.log("svga"+v);
var mv =stage.addChild(new FYGE.MovieClip(v));
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 275;
mv.y = 785;
console.log("svgmv",mv)
console.log("svgmv", mv)
},
(err) => {
......@@ -97,11 +97,11 @@ Page({
SvgaParser.loadSvga(
snowSrc,
(v) => {
console.log("svga"+v);
var mv =stage.addChild(new FYGE.MovieClip(v));
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 175;
mv.y = 585;
console.log("svgmv",mv)
console.log("svgmv", mv)
},
(err) => {
......@@ -113,6 +113,7 @@ Page({
//循环
loop();
function loop() {
FYGE.Tween.flush()
stage.flush();
......@@ -157,25 +158,47 @@ 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() {
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();
}
......@@ -198,7 +221,7 @@ Page({
})
},
/**点击跳转页面 */
navigateTo(e){
navigateTo(e) {
const {
item
} = e.target.dataset;
......
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": {
"myRankInfo": {
"rank": "560",
"rank": "450",
"warms": "1",
"userNick": "caoxingru12"
},
......
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