Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
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
frontend
GeekLearnMathWeapp
Commits
8e81da7c
Commit
8e81da7c
authored
Apr 12, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
0c073857
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
index.tsx
src/pages/group/index.tsx
+15
-6
No files found.
src/pages/group/index.tsx
View file @
8e81da7c
...
@@ -48,19 +48,28 @@ const Group = () => {
...
@@ -48,19 +48,28 @@ const Group = () => {
const
getGroupNo
=
useCallback
(()
=>
{
const
getGroupNo
=
useCallback
(()
=>
{
const
{
noun
,
adj
}
=
dataRef
.
current
const
{
noun
,
adj
}
=
dataRef
.
current
const
nam
=
`
${
randomPick
(
adj
)}${
randomPick
(
noun
)}
`
const
nam
=
[
randomPick
(
adj
),
randomPick
(
noun
)].
filter
(
Boolean
).
join
(
''
)
setGroupNo
(
nam
)
setGroupNo
(
nam
)
},
[])
},
[])
useEffect
(()
=>
{
const
getWords
=
useCallback
(
async
()
=>
{
const
fn
=
async
()
=>
{
const
words
=
await
getNickNameWords
(
'words'
)
const
words
=
await
getNickNameWords
(
'words'
)
dataRef
.
current
=
words
dataRef
.
current
=
words
getGroupNo
()
getGroupNo
()
}
fn
()
},
[
getGroupNo
])
},
[
getGroupNo
])
const
_genGroundNo
=
useCallback
(()
=>
{
if
(
dataRef
.
current
.
adj
.
length
<
1
)
{
getWords
()
}
else
{
getGroupNo
()
}
},
[
getGroupNo
,
getWords
])
useEffect
(()
=>
{
getWords
()
},
[
getWords
])
useDidShow
(
async
()
=>
{
useDidShow
(
async
()
=>
{
const
tabbar
=
getTabBar
<
TabbarRef
>
(
page
)
const
tabbar
=
getTabBar
<
TabbarRef
>
(
page
)
tabbar
?.
setSelected
(
1
)
tabbar
?.
setSelected
(
1
)
...
@@ -137,7 +146,7 @@ const Group = () => {
...
@@ -137,7 +146,7 @@ const Group = () => {
<
Modal
isVisible=
{
isVisible
}
tilte=
"学习部落名"
onClose=
{
setFalse
}
>
<
Modal
isVisible=
{
isVisible
}
tilte=
"学习部落名"
onClose=
{
setFalse
}
>
<
View
className=
{
styles
.
modal
}
>
<
View
className=
{
styles
.
modal
}
>
<
View
className=
{
styles
.
modal_body
}
onClick=
{
getGroup
No
}
>
<
View
className=
{
styles
.
modal_body
}
onClick=
{
_genGround
No
}
>
<
Input
className=
{
styles
.
modal_input
}
disabled
value=
{
groupNo
}
/>
<
Input
className=
{
styles
.
modal_input
}
disabled
value=
{
groupNo
}
/>
<
Image
className=
{
styles
.
modal_refresh
}
mode=
"widthFix"
src=
{
assets
[
'refresh.png'
].
u
}
/>
<
Image
className=
{
styles
.
modal_refresh
}
mode=
"widthFix"
src=
{
assets
[
'refresh.png'
].
u
}
/>
</
View
>
</
View
>
...
...
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