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
69184621
Commit
69184621
authored
Oct 15, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
a522ea2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
pagegamemain.js
taobao_jn/client/pages/pagegamemain/pagegamemain.js
+24
-6
No files found.
taobao_jn/client/pages/pagegamemain/pagegamemain.js
View file @
69184621
...
@@ -109,8 +109,17 @@ Page({
...
@@ -109,8 +109,17 @@ Page({
avatar4
:
""
,
avatar4
:
""
,
canwin
:
false
canwin
:
false
},
},
onLoad
(
props
)
{
onLoad
(
query
)
{
console
.
log
(
"onLoad========>"
,
app
,
props
);
// console.log("onLoad========>", app, props);
let
isnewdata
=
my
.
getStorageSync
({
key
:
'jn_'
+
app
.
openId
+
"_new"
});
let
isnew
=
isnewdata
.
data
?
0
:
1
;
this
.
setData
({
isnew
:
isnew
});
console
.
log
(
"新手"
,
isnew
,
query
);
let
step
=
1
;
let
step
=
1
;
let
sucgl
=
70
;
let
sucgl
=
70
;
let
nranksuc
=
Math
.
random
()
*
100
;
let
nranksuc
=
Math
.
random
()
*
100
;
...
@@ -144,12 +153,16 @@ Page({
...
@@ -144,12 +153,16 @@ Page({
canwin
:
canwin
,
canwin
:
canwin
,
isfirst
:
true
,
isfirst
:
true
,
});
});
let
attiontxt1
=
"游戏开始啦,共有"
+
roomnums
+
"名玩家加入游戏,快来升温队伍拿奖励吧。"
;
this
.
addAttionTxt
(
attiontxt1
);
this
.
changePashow
();
this
.
changePashow
();
},
startGame
()
{
if
(
this
.
data
.
isnew
>
0
&&
this
.
data
.
isnew
<
7
)
{
return
;
}
console
.
log
(
"游戏开始逻辑"
);
let
attiontxt1
=
"游戏开始啦,共有"
+
this
.
data
.
roomnums
+
"名玩家加入游戏,快来升温队伍拿奖励吧。"
;
this
.
addAttionTxt
(
attiontxt1
);
this
.
updateAct
();
this
.
updateAct
();
// this.updateActInfo();
// this.doAiControl();
this
.
newAiControl
();
this
.
newAiControl
();
},
},
//新ai逻辑
//新ai逻辑
...
@@ -294,6 +307,9 @@ Page({
...
@@ -294,6 +307,9 @@ Page({
}
}
},
},
onShow
()
{
onShow
()
{
if
((
this
.
data
.
isnew
>
0
&&
this
.
data
.
isnew
<
7
)
||
this
.
data
.
show_v
!=
2
)
{
return
;
}
this
.
updateActInfo
();
this
.
updateActInfo
();
},
},
//更新活动信息
//更新活动信息
...
@@ -427,6 +443,7 @@ Page({
...
@@ -427,6 +443,7 @@ Page({
this
.
setData
({
this
.
setData
({
show_v
:
2
show_v
:
2
})
})
this
.
startGame
();
},
1000
);
},
1000
);
},
},
//新手下一步
//新手下一步
...
@@ -435,6 +452,7 @@ Page({
...
@@ -435,6 +452,7 @@ Page({
this
.
setData
({
this
.
setData
({
isnew
:
nguide
isnew
:
nguide
});
});
this
.
startGame
();
},
},
//使用道具
//使用道具
async
usetool
()
{
async
usetool
()
{
...
...
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