Commit 9b79369c authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent 01eccadc
......@@ -17,11 +17,11 @@ const {
getSystemInfo
} = tbcc.tb;
let updateact = 1;//请求
const gameatime = 100;//活动倒计时,100,
let gameatime = 100;//活动倒计时,100,
const toolwarm = 1;//升温道具+温度值
const taskwarm = 1;//任务+温度值
const invitewarm = 1;//邀请+温度值
const toolcd = 5;//
let gtoolcd = 5;//
const paple1 = "cloud://1C47337C3D86F381913E3741232B26EB//paple1.svga";
const paple2 = "cloud://6E5D893BA34F99343C702D9FAA543C21//paple2.svga";
......@@ -48,6 +48,8 @@ Page({
],//实际展示的list
iswin: false,//
step: 1,//阶段
startime:0,
endtime:0,
//我的消息通知
linvite: {
count: 0,
......@@ -112,16 +114,25 @@ Page({
onLoad(query) {
// console.log("onLoad========>", app, props);
let isnewdata = my.getStorageSync({
key: 'jn_' + app.openId + "_new"
key: 'jn_' + app.openId + '_new'
});
let isnew = isnewdata.data ? 0 : 1;
this.setData({
isnew: isnew
});
if(isnew!=0){
my.setStorageSync({
key: 'jn_' + app.openId + '_new',
data: 1
});
}
console.log("新手", isnew, query);
let step = 1;
let sucgl = 70;
let {end,gl,start,step,toolcd} = query;
step = Number(step);
gameatime = Math.floor((Number(end)-Number(start))/1000);
gtoolcd = Number(toolcd);
let sucgl = Number(gl);
let nranksuc = Math.random() * 100;
let canwin = false;
if (nranksuc < sucgl) {//能赢
......@@ -152,6 +163,10 @@ Page({
showattionlist: [],
canwin: canwin,
isfirst: true,
gametime:gameatime,
tooltime:0,
startime:Number(start),
endtime:Number(end),
});
this.changePashow();
},
......@@ -176,7 +191,7 @@ Page({
doact = true;
}
let i = 1;
let i = 0;
if (doact) {
let isfirst = this.data.isfirst;
if (isfirst) {
......@@ -263,7 +278,7 @@ Page({
let lesstime = this.data.gametime * 1000;
let itime1 = Number((Math.random() * chatime).toFixed(2)) * 1000;
let nexttooltime = toolcd * 1000 + itime1;
let nexttooltime = gtoolcd * 1000 + itime1;
if (nexttooltime < lesstime) {
return this.aiuseTool(nexttooltime, i, chatime);
}
......@@ -492,7 +507,7 @@ Page({
if (success) {
this.updateActInfo();
this.setData({
tooltime: 5
tooltime: gtoolcd
});
}
} else {//倒计时中
......
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