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
46e37e29
Commit
46e37e29
authored
Apr 05, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.jiuaoedu.com:hewenhao/GeekLearnMathWeapp
parents
5c9dedd5
30e65cfb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
group.ts
src/api/group.ts
+5
-5
index.tsx
src/pages/group/index.tsx
+1
-1
main.tsx
src/pages/main/main.tsx
+5
-6
index.tsx
src/pages/prepare/index.tsx
+2
-1
No files found.
src/api/group.ts
View file @
46e37e29
...
...
@@ -35,16 +35,16 @@ export const postTribePoint = ({ type }: Pick<PointType, 'type'>) => {
}
// 加入部落
export
const
joinTribe
=
({
groupId
,
memberId
,
memberName
}:
{
groupId
:
number
,
memberId
:
number
,
memberName
:
string
})
=>
{
return
requestAfterSilentLogin
<
{},
{
memberName
:
string
,
groupId
:
number
,
memberId
:
number
}
>
({
export
const
joinTribe
=
({
groupId
}:
{
groupId
:
number
})
=>
{
return
requestAfterSilentLogin
<
{},
{
groupId
:
number
}
>
((
userInfo
)
=>
({
url
:
'/service-idea/group/joinTribe'
,
method
:
'POST'
,
data
:
{
groupId
,
memberId
,
memberName
memberId
:
userInfo
?.
userId
,
memberName
:
userInfo
?.
nickname
||
'爹🐂'
}
})
})
)
}
export
type
PointType
=
{
...
...
src/pages/group/index.tsx
View file @
46e37e29
...
...
@@ -40,7 +40,7 @@ const Group = () => {
useShareAppMessage
(()
=>
{
return
{
title
:
'来看看这个有趣的页面!'
,
path
:
`pages/main/main?groupId=
${
tribeInfo
?.
id
}
&
memberId
=
$
{
userInfo
.
userId
}
&
memberName
=
$
{
userInfo
.
nickname
}
`,
path
:
`pages/main/main?groupId=
${
tribeInfo
?.
id
}
&
inviteId
=
$
{
userInfo
.
userId
}
`,
imageUrl: 'https://picx.zhimg.com/v2-7b7b072d4bebd5ccf48c04ec1146e844_1440w.jpg?',
}
})
...
...
src/pages/main/main.tsx
View file @
46e37e29
...
...
@@ -21,8 +21,8 @@ const MainPage = () => {
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
[
nav
]
=
useState
(
getMenuButtonBoundingClientRect
())
const
router
=
useRouter
<
{
groupId
:
string
,
memberId
:
string
,
memberName
:
string
}
>
()
const
{
groupId
,
memberId
,
memberName
}
=
router
.
params
const
router
=
useRouter
<
{
groupId
:
string
,
inviteId
:
string
}
>
()
const
{
groupId
,
inviteId
}
=
router
.
params
const
{
run
}
=
useRequest
(
joinTribe
,
{
immediate
:
false
,
...
...
@@ -62,16 +62,15 @@ const MainPage = () => {
})
const
joinTribeByCode
=
useCallback
(()
=>
{
if
(
groupId
&&
memberId
&&
+
memberId
!==
userInfo
.
userId
)
{
showToast
({
title
:
`
${
groupId
}
-
${
memberId
}
-
${
memberName
}
`
})
if
(
groupId
&&
inviteId
&&
+
inviteId
!==
userInfo
.
userId
)
{
showModal
({
title
:
'加入部落'
,
success
:
(
res
)
=>
{
res
.
confirm
&&
run
({
groupId
:
+
groupId
,
memberId
:
+
memberId
,
memberName
:
memberName
||
'🐂'
})
res
.
confirm
&&
run
({
groupId
:
+
groupId
})
}
})
}
},
[
groupId
,
memberId
,
memberName
])
},
[
groupId
,
inviteId
])
return
(
<>
...
...
src/pages/prepare/index.tsx
View file @
46e37e29
...
...
@@ -74,7 +74,8 @@ const Prepare = () => {
useShareAppMessage
(()
=>
{
return
{
title
:
'来看看这个有趣的页面!'
,
path
:
`pages/main/main?groupId=
${
tribeInfo
?.
id
}
&
userId
=
$
{
userInfo
.
userId
}
`,
path
:
`pages/main/main?groupId=
${
tribeInfo
?.
id
}
&
inviteId
=
$
{
userInfo
.
userId
}
`,
imageUrl: 'https://picx.zhimg.com/v2-7b7b072d4bebd5ccf48c04ec1146e844_1440w.jpg?',
}
})
...
...
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