Commit b05082d1 authored by Edwise's avatar Edwise 🍷

1

parent 3d42a078
...@@ -299,7 +299,7 @@ export class MainScene extends Scene { ...@@ -299,7 +299,7 @@ export class MainScene extends Scene {
/**显示页面时重新计算时间恢复精力 */ /**显示页面时重新计算时间恢复精力 */
showPageEnergyUp(){ showPageEnergyUp(){
} }
/**时间到的时候拿取精力值 */ /**时间到的时候拿取精力值 */
......
...@@ -29,7 +29,9 @@ App({ ...@@ -29,7 +29,9 @@ App({
const { activityId } = query; const { activityId } = query;
// this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然 // this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
// this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1 // this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1
this.activityId = activityId || '5f8d47218e6a0888fc426fad'; //小婷2 this.activityId = activityId || '5f8d47218e6a0888fc426fad'; //小婷2zhengshi
// this.activityId = activityId || '5f87e8a29897b4e0ce0ada02'; //ceshi
} }
}); });
...@@ -2221,7 +2221,7 @@ var Ins = (function () { ...@@ -2221,7 +2221,7 @@ var Ins = (function () {
label.text = data.text ? data.text : ""; label.text = data.text ? data.text : "";
return label; return label;
}; };
Ins.recoverEnergy = 3 * 60 * 1000; Ins.recoverEnergy = 10 * 60 * 1000;
return Ins; return Ins;
}()); }());
exports.Ins = Ins; exports.Ins = Ins;
...@@ -47084,7 +47084,7 @@ var MainScene = (function (_super) { ...@@ -47084,7 +47084,7 @@ var MainScene = (function (_super) {
that.energyGroup.addChild(that.energyDeco); that.energyGroup.addChild(that.energyDeco);
that.energyDialog = Ins_1.Ins.initSprite("69009eb9-4593-4a43-a9d7-a6356ebd6d04", 174, -60); that.energyDialog = Ins_1.Ins.initSprite("69009eb9-4593-4a43-a9d7-a6356ebd6d04", 174, -60);
that.energyGroup.addChild(that.energyDialog); that.energyGroup.addChild(that.energyDialog);
that.energyDialogLabel = Ins_1.Ins.initLabel({ size: 26, text: "每3分钟恢复1点精力" }); that.energyDialogLabel = Ins_1.Ins.initLabel({ size: 26, text: "每10分钟恢复1点精力" });
that.energyDialog.addChild(that.energyDialogLabel); that.energyDialog.addChild(that.energyDialogLabel);
that.energyDialogLabel.x = (that.energyDialog.width - that.energyDialogLabel.textWidth) * 0.5; that.energyDialogLabel.x = (that.energyDialog.width - that.energyDialogLabel.textWidth) * 0.5;
that.energyDialogLabel.y = (that.energyDialog.height - that.energyDialogLabel.textHeight) * 0.5 - 6; that.energyDialogLabel.y = (that.energyDialog.height - that.energyDialogLabel.textHeight) * 0.5 - 6;
...@@ -47297,6 +47297,8 @@ var MainScene = (function (_super) { ...@@ -47297,6 +47297,8 @@ var MainScene = (function (_super) {
MainScene.prototype.onHide = function () { MainScene.prototype.onHide = function () {
console.log("canvas页面显示, isShow设置为false"); console.log("canvas页面显示, isShow设置为false");
this.isShow = false; this.isShow = false;
if (this.recoverEnergyHandler)
clearInterval(this.recoverEnergyHandler);
}; };
MainScene.prototype.initEvents = function () { MainScene.prototype.initEvents = function () {
var that = this; var that = this;
...@@ -301,6 +301,7 @@ Page({ ...@@ -301,6 +301,7 @@ Page({
}, },
onShow() { onShow() {
console.log("页面显示啦")
// 页面显示 // 页面显示
if (this.main) { if (this.main) {
this.main.run(); this.main.run();
...@@ -310,6 +311,7 @@ Page({ ...@@ -310,6 +311,7 @@ Page({
}, },
onHide() { onHide() {
console.log("页面隐藏啦")
// 页面隐藏 // 页面隐藏
if (this.main) { if (this.main) {
this.main.pause(); this.main.pause();
...@@ -359,11 +361,11 @@ Page({ ...@@ -359,11 +361,11 @@ Page({
if (success) { if (success) {
my.hideLoading(); my.hideLoading();
app.openId = data.openId; app.openId = data.openId;
if(data.customValue != 1){ if(data.loadValue != 1){
this.initCanvas(); this.initCanvas();
} }
this.setData({ this.setData({
customValue:data.customValue customValue:data.loadValue
}) })
this.getActivityBaseInfoById(); this.getActivityBaseInfoById();
} }
......
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