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
Hide 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'>) => {
...
@@ -35,16 +35,16 @@ export const postTribePoint = ({ type }: Pick<PointType, 'type'>) => {
}
}
// 加入部落
// 加入部落
export
const
joinTribe
=
({
groupId
,
memberId
,
memberName
}:
{
groupId
:
number
,
memberId
:
number
,
memberName
:
string
})
=>
{
export
const
joinTribe
=
({
groupId
}:
{
groupId
:
number
})
=>
{
return
requestAfterSilentLogin
<
{},
{
memberName
:
string
,
groupId
:
number
,
memberId
:
number
}
>
({
return
requestAfterSilentLogin
<
{},
{
groupId
:
number
}
>
((
userInfo
)
=>
({
url
:
'/service-idea/group/joinTribe'
,
url
:
'/service-idea/group/joinTribe'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
groupId
,
groupId
,
memberId
,
memberId
:
userInfo
?.
userId
,
memberName
memberName
:
userInfo
?.
nickname
||
'爹🐂'
}
}
})
})
)
}
}
export
type
PointType
=
{
export
type
PointType
=
{
...
...
src/pages/group/index.tsx
View file @
46e37e29
...
@@ -40,7 +40,7 @@ const Group = () => {
...
@@ -40,7 +40,7 @@ const Group = () => {
useShareAppMessage
(()
=>
{
useShareAppMessage
(()
=>
{
return
{
return
{
title
:
'来看看这个有趣的页面!'
,
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?',
imageUrl: 'https://picx.zhimg.com/v2-7b7b072d4bebd5ccf48c04ec1146e844_1440w.jpg?',
}
}
})
})
...
...
src/pages/main/main.tsx
View file @
46e37e29
...
@@ -21,8 +21,8 @@ const MainPage = () => {
...
@@ -21,8 +21,8 @@ const MainPage = () => {
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
const
stageList
=
useStoreState
(
state
=>
state
.
mainModel
.
stageList
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
[
nav
]
=
useState
(
getMenuButtonBoundingClientRect
())
const
[
nav
]
=
useState
(
getMenuButtonBoundingClientRect
())
const
router
=
useRouter
<
{
groupId
:
string
,
memberId
:
string
,
memberName
:
string
}
>
()
const
router
=
useRouter
<
{
groupId
:
string
,
inviteId
:
string
}
>
()
const
{
groupId
,
memberId
,
memberName
}
=
router
.
params
const
{
groupId
,
inviteId
}
=
router
.
params
const
{
run
}
=
useRequest
(
joinTribe
,
{
const
{
run
}
=
useRequest
(
joinTribe
,
{
immediate
:
false
,
immediate
:
false
,
...
@@ -62,16 +62,15 @@ const MainPage = () => {
...
@@ -62,16 +62,15 @@ const MainPage = () => {
})
})
const
joinTribeByCode
=
useCallback
(()
=>
{
const
joinTribeByCode
=
useCallback
(()
=>
{
if
(
groupId
&&
memberId
&&
+
memberId
!==
userInfo
.
userId
)
{
if
(
groupId
&&
inviteId
&&
+
inviteId
!==
userInfo
.
userId
)
{
showToast
({
title
:
`
${
groupId
}
-
${
memberId
}
-
${
memberName
}
`
})
showModal
({
showModal
({
title
:
'加入部落'
,
title
:
'加入部落'
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
res
.
confirm
&&
run
({
groupId
:
+
groupId
,
memberId
:
+
memberId
,
memberName
:
memberName
||
'🐂'
})
res
.
confirm
&&
run
({
groupId
:
+
groupId
})
}
}
})
})
}
}
},
[
groupId
,
memberId
,
memberName
])
},
[
groupId
,
inviteId
])
return
(
return
(
<>
<>
...
...
src/pages/prepare/index.tsx
View file @
46e37e29
...
@@ -74,7 +74,8 @@ const Prepare = () => {
...
@@ -74,7 +74,8 @@ const Prepare = () => {
useShareAppMessage
(()
=>
{
useShareAppMessage
(()
=>
{
return
{
return
{
title
:
'来看看这个有趣的页面!'
,
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?',
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