Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
9b79369c
Commit
9b79369c
authored
Oct 15, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
01eccadc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
pagegamemain.js
taobao_jn/client/pages/pagegamemain/pagegamemain.js
+23
-8
No files found.
taobao_jn/client/pages/pagegamemain/pagegamemain.js
View file @
9b79369c
...
...
@@ -17,11 +17,11 @@ const {
getSystemInfo
}
=
tbcc
.
tb
;
let
updateact
=
1
;
//请求
cons
t
gameatime
=
100
;
//活动倒计时,100,
le
t
gameatime
=
100
;
//活动倒计时,100,
const
toolwarm
=
1
;
//升温道具+温度值
const
taskwarm
=
1
;
//任务+温度值
const
invitewarm
=
1
;
//邀请+温度值
const
toolcd
=
5
;
//
let
g
toolcd
=
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
=
g
toolcd
*
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
{
//倒计时中
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment