Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
59770ad2
Commit
59770ad2
authored
Nov 25, 2024
by
袁玲利
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏排行榜点击事件
parent
7fb39e95
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
32 deletions
+6
-32
src/pages/gameOrder/gameOrder.vue
src/pages/gameOrder/gameOrder.vue
+6
-32
No files found.
src/pages/gameOrder/gameOrder.vue
View file @
59770ad2
...
@@ -115,36 +115,18 @@ export default {
...
@@ -115,36 +115,18 @@ export default {
second
:
0
,
second
:
0
,
};
};
},
},
onShow
()
{
uni
.
$on
(
"
refreshPage
"
,
(
data
)
=>
{
console
.
log
(
data
,
"
ttttttttttttt
"
);
if
(
data
.
reload
)
{
this
.
init
();
}
});
},
mounted
()
{
mounted
()
{
this
.
games
.
sort
(()
=>
0.5
-
Math
.
random
());
this
.
params
.
userid
=
this
.
getQueryParams
(
"
userId
"
);
this
.
params
.
sessionid
=
this
.
getQueryParams
(
"
sessionid
"
);
this
.
params
.
behavior
=
"
viewPage
"
;
this
.
params
.
data
=
"
gameOrder
"
;
this
.
GameStatistics
();
this
.
init
();
this
.
init
();
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
const
self
=
this
;
const
self
=
this
;
this
.
games
.
sort
(()
=>
0.5
-
Math
.
random
());
this
.
params
.
userid
=
this
.
getQueryParams
(
"
userId
"
)
||
uni
.
getStorageSync
(
"
userid
"
);
this
.
params
.
sessionid
=
this
.
getQueryParams
(
"
sessionid
"
)
||
uni
.
getStorageSync
(
"
sessionid
"
);
this
.
params
.
behavior
=
"
viewPage
"
;
this
.
params
.
data
=
"
gameOrder
"
;
this
.
GameStatistics
();
if
(
this
.
params
.
userid
)
{
uni
.
setStorageSync
(
"
userid
"
,
this
.
params
.
userid
);
}
if
(
this
.
params
.
sessionid
)
{
uni
.
setStorageSync
(
"
sessionid
"
,
this
.
params
.
sessionid
);
}
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
second
+=
1
;
this
.
second
+=
1
;
if
(
this
.
second
==
5
)
{
if
(
this
.
second
==
5
)
{
...
@@ -239,12 +221,6 @@ export default {
...
@@ -239,12 +221,6 @@ export default {
// uni.navigateToMiniProgram({
// uni.navigateToMiniProgram({
// appId: game.appId,
// appId: game.appId,
// });
// });
this
.
params
.
userid
=
this
.
getQueryParams
(
"
userId
"
)
||
uni
.
getStorageSync
(
"
userid
"
);
this
.
params
.
sessionid
=
this
.
getQueryParams
(
"
sessionid
"
)
||
uni
.
getStorageSync
(
"
sessionid
"
);
console
.
log
(
this
.
params
.
userid
,
"
zzzzzzzuserid
"
);
console
.
log
(
this
.
params
.
sessionid
,
"
zzzzzzzsessionid
"
);
this
.
params
.
behavior
=
"
click
"
;
this
.
params
.
behavior
=
"
click
"
;
this
.
params
.
data
=
game
.
appId
;
this
.
params
.
data
=
game
.
appId
;
this
.
GameStatistics
();
this
.
GameStatistics
();
...
@@ -262,8 +238,6 @@ export default {
...
@@ -262,8 +238,6 @@ export default {
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
this
.
timer
=
null
;
}
}
// 移除监听,避免内存泄露
uni
.
$off
(
"
refreshPage
"
);
},
},
};
};
</
script
>
</
script
>
...
...
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