Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
be0a9ec2
Commit
be0a9ec2
authored
Sep 04, 2023
by
yaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加邀请码管理
parent
47c7013b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
153 additions
and
0 deletions
+153
-0
src/api/business/invite.js
src/api/business/invite.js
+9
-0
src/router/index.js
src/router/index.js
+11
-0
src/views/user/inviteList.vue
src/views/user/inviteList.vue
+133
-0
No files found.
src/api/business/invite.js
0 → 100644
View file @
be0a9ec2
import
request
from
'
@/utils/request
'
export
function
fetchList
(
params
)
{
return
request
({
url
:
'
/invitationCode/findList
'
,
method
:
'
post
'
,
data
:
params
})
}
src/router/index.js
View file @
be0a9ec2
...
...
@@ -143,6 +143,17 @@ export const asyncRouterMap = [
icon
:
'
message
'
,
noCache
:
true
}
},
{
path
:
'
inviteList
'
,
component
:
()
=>
import
(
'
@/views/user/inviteList
'
),
name
:
'
inviteList
'
,
meta
:
{
perms
:
[
'
POST /admin/invitationCode/findList
'
],
title
:
'
邀请码管理
'
,
icon
:
'
user
'
,
noCache
:
true
}
}
]
},
...
...
src/views/user/inviteList.vue
0 → 100644
View file @
be0a9ec2
<
template
>
<div
class=
"page_invite"
>
<div
class=
"filter-container"
>
<el-button
size=
"mini"
class=
"filter-item"
type=
"primary"
@
click=
"handleAdd"
>
生成邀请码
</el-button>
</div>
<!-- 查询结果 -->
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
width=
"100px"
label=
"邀请码ID"
prop=
"id"
sortable
/>
<el-table-column
align=
"center"
label=
"邀请码"
prop=
"code"
/>
<el-table-column
align=
"center"
label=
"可邀请人数"
prop=
"enabledNum"
/>
<el-table-column
align=
"center"
label=
"使用人数"
prop=
"applicant"
/>
<el-table-column
align=
"center"
label=
"状态"
prop=
"stateName"
/>
<el-table-column
align=
"center"
label=
"有效时间"
prop=
"effectiveStartTime"
width=
"300"
>
<template
slot-scope=
"scope"
>
{{
`${scope.row.effectiveStartTime
}
至${scope.row.effectiveEndTime
}
`
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
创建时间
"
prop
=
"
createTime
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
300
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
v
-
permission
=
"
['GET /admin/user/detailApprove']
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
详情
<
/el-button
>
<
el
-
button
v
-
permission
=
"
['POST /admin/user/approveAgency']
"
type
=
"
primary
"
size
=
"
mini
"
style
=
"
width: 100px
"
@
click
=
"
handleCopyCode(scope.row)
"
>
复制邀请码
<
/el-button
>
<
el
-
button
v
-
permission
=
"
['GET /admin/user/detailApprove']
"
type
=
"
primary
"
size
=
"
mini
"
>
失效
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
fetchList
}
from
'
@/api/business/invite
'
import
Pagination
from
'
@/components/Pagination
'
export
default
{
name
:
'
InviteList
'
,
components
:
{
Pagination
}
,
data
()
{
return
{
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
handleAdd
()
{
}
,
handleToDetail
()
{
}
,
handleCopyCode
()
{
}
,
getList
()
{
this
.
listLoading
=
true
fetchList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
/* this.list = (response.data.data.dataList || []).map((e, index) => {
let imageList = e.images || []
if (e.topImage && imageList.indexOf(e.topImage) === -1) {
imageList = [e.topImage].concat(imageList)
}
return {
...e,
imageList: imageList
}
}
)*/
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
}
}
<
/script
>
<
style
scoped
>
.
page_invite
{
padding
:
20
px
;
}
.
filter
-
container
{
text
-
align
:
end
;
}
<
/style
>
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