Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19444021
authored
Aug 19, 2023
by
xiaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员积分和会员签到模块todo修改
parent
f8a4df8b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
30 deletions
+28
-30
src/api/point/config/index.ts
+2
-2
src/api/point/record/index.ts
+1
-1
src/api/point/signInConfig/index.ts
+6
-6
src/api/point/signInRecord/index.ts
+2
-2
src/views/member/point/record/index.vue
+5
-5
src/views/member/signin/config/SignInConfigForm.vue
+2
-0
src/views/member/signin/config/index.vue
+6
-10
src/views/member/signin/record/index.vue
+4
-4
No files found.
src/api/point/config/index.ts
View file @
19444021
...
@@ -10,10 +10,10 @@ export interface ConfigVO {
...
@@ -10,10 +10,10 @@ export interface ConfigVO {
// 查询积分设置详情
// 查询积分设置详情
export
const
getConfig
=
async
()
=>
{
export
const
getConfig
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/point/config/get`
})
return
await
request
.
get
({
url
:
`/
member/
point/config/get`
})
}
}
// 新增修改积分设置
// 新增修改积分设置
export
const
saveConfig
=
async
(
data
:
ConfigVO
)
=>
{
export
const
saveConfig
=
async
(
data
:
ConfigVO
)
=>
{
return
await
request
.
put
({
url
:
`/point/config/save`
,
data
})
return
await
request
.
put
({
url
:
`/
member/
point/config/save`
,
data
})
}
}
src/api/point/record/index.ts
View file @
19444021
...
@@ -17,5 +17,5 @@ export interface RecordVO {
...
@@ -17,5 +17,5 @@ export interface RecordVO {
// 查询用户积分记录列表
// 查询用户积分记录列表
export
const
getRecordPage
=
async
(
params
)
=>
{
export
const
getRecordPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/point/record/page`
,
params
})
return
await
request
.
get
({
url
:
`/
member/
point/record/page`
,
params
})
}
}
src/api/point/signInConfig/index.ts
View file @
19444021
...
@@ -4,30 +4,30 @@ export interface SignInConfigVO {
...
@@ -4,30 +4,30 @@ export interface SignInConfigVO {
id
:
number
id
:
number
day
:
number
|
null
day
:
number
|
null
point
:
number
|
null
point
:
number
|
null
isE
nable
:
boolean
|
null
e
nable
:
boolean
|
null
}
}
// 查询积分签到规则列表
// 查询积分签到规则列表
export
const
getSignInConfigPage
=
async
()
=>
{
export
const
getSignInConfigPage
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/point/sign-in-config/list`
})
return
await
request
.
get
({
url
:
`/
member/
point/sign-in-config/list`
})
}
}
// 查询积分签到规则详情
// 查询积分签到规则详情
export
const
getSignInConfig
=
async
(
id
:
number
)
=>
{
export
const
getSignInConfig
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
`/point/sign-in-config/get?id=`
+
id
})
return
await
request
.
get
({
url
:
`/
member/
point/sign-in-config/get?id=`
+
id
})
}
}
// 新增积分签到规则
// 新增积分签到规则
export
const
createSignInConfig
=
async
(
data
:
SignInConfigVO
)
=>
{
export
const
createSignInConfig
=
async
(
data
:
SignInConfigVO
)
=>
{
return
await
request
.
post
({
url
:
`/point/sign-in-config/create`
,
data
})
return
await
request
.
post
({
url
:
`/
member/
point/sign-in-config/create`
,
data
})
}
}
// 修改积分签到规则
// 修改积分签到规则
export
const
updateSignInConfig
=
async
(
data
:
SignInConfigVO
)
=>
{
export
const
updateSignInConfig
=
async
(
data
:
SignInConfigVO
)
=>
{
return
await
request
.
put
({
url
:
`/point/sign-in-config/update`
,
data
})
return
await
request
.
put
({
url
:
`/
member/
point/sign-in-config/update`
,
data
})
}
}
// 删除积分签到规则
// 删除积分签到规则
export
const
deleteSignInConfig
=
async
(
id
:
number
)
=>
{
export
const
deleteSignInConfig
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
`/point/sign-in-config/delete?id=`
+
id
})
return
await
request
.
delete
({
url
:
`/
member/
point/sign-in-config/delete?id=`
+
id
})
}
}
src/api/point/signInRecord/index.ts
View file @
19444021
...
@@ -9,10 +9,10 @@ export interface SignInRecordVO {
...
@@ -9,10 +9,10 @@ export interface SignInRecordVO {
// 查询用户签到积分列表
// 查询用户签到积分列表
export
const
getSignInRecordPage
=
async
(
params
)
=>
{
export
const
getSignInRecordPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/point/sign-in-record/page`
,
params
})
return
await
request
.
get
({
url
:
`/
member/
point/sign-in-record/page`
,
params
})
}
}
// 导出用户签到积分 Excel
// 导出用户签到积分 Excel
export
const
exportSignInRecord
=
async
(
params
)
=>
{
export
const
exportSignInRecord
=
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/point/sign-in-record/export-excel`
,
params
})
return
await
request
.
download
({
url
:
`/
member/
point/sign-in-record/export-excel`
,
params
})
}
}
src/views/member/point/record/index.vue
View file @
19444021
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
:inline=
"true"
:inline=
"true"
label-width=
"68px"
label-width=
"68px"
>
>
<el-form-item
label=
"用户"
prop=
"nick
N
ame"
>
<el-form-item
label=
"用户"
prop=
"nick
n
ame"
>
<el-input
<el-input
v-model=
"queryParams.nick
N
ame"
v-model=
"queryParams.nick
n
ame"
placeholder=
"请输入用户昵称"
placeholder=
"请输入用户昵称"
clearable
clearable
@
keyup
.
enter=
"handleQuery"
@
keyup
.
enter=
"handleQuery"
...
@@ -79,13 +79,13 @@
...
@@ -79,13 +79,13 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"用户"
align=
"center"
prop=
"nick
N
ame"
/>
<el-table-column
label=
"用户"
align=
"center"
prop=
"nick
n
ame"
/>
<el-table-column
label=
"积分标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"积分标题"
align=
"center"
prop=
"title"
/>
<el-table-column
label=
"积分描述"
align=
"center"
prop=
"description"
/>
<el-table-column
label=
"积分描述"
align=
"center"
prop=
"description"
/>
<el-table-column
<el-table-column
label=
"获得时间"
label=
"获得时间"
align=
"center"
align=
"center"
prop=
"create
Dat
e"
prop=
"create
Tim
e"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
label=
"积分"
align=
"center"
prop=
"point"
>
<el-table-column
label=
"积分"
align=
"center"
prop=
"point"
>
...
@@ -147,7 +147,7 @@ const list = ref([]) // 列表的数据
...
@@ -147,7 +147,7 @@ const list = ref([]) // 列表的数据
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
nick
N
ame
:
null
,
nick
n
ame
:
null
,
bizType
:
null
,
bizType
:
null
,
type
:
null
,
type
:
null
,
title
:
null
,
title
:
null
,
...
...
src/views/member/signin/config/SignInConfigForm.vue
View file @
19444021
...
@@ -71,6 +71,8 @@ const submitForm = async () => {
...
@@ -71,6 +71,8 @@ const submitForm = async () => {
try
{
try
{
const
data
=
formData
.
value
as
unknown
as
SignInConfigApi
.
SignInConfigVO
const
data
=
formData
.
value
as
unknown
as
SignInConfigApi
.
SignInConfigVO
if
(
formType
.
value
===
'create'
)
{
if
(
formType
.
value
===
'create'
)
{
//默认新创建的自动启动
data
.
enable
=
true
await
SignInConfigApi
.
createSignInConfig
(
data
)
await
SignInConfigApi
.
createSignInConfig
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
message
.
success
(
t
(
'common.createSuccess'
))
}
else
{
}
else
{
...
...
src/views/member/signin/config/index.vue
View file @
19444021
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<div>
<div>
<el-switch
<el-switch
v-model=
"scope.row.
isE
nable"
v-model=
"scope.row.
e
nable"
@
change=
"handleSwitchChange(scope.row
.id
, $event)"
@
change=
"handleSwitchChange(scope.row, $event)"
inline-prompt
inline-prompt
active-text=
"开启"
active-text=
"开启"
inactive-text=
"关闭"
inactive-text=
"关闭"
...
@@ -105,15 +105,11 @@ const handleDelete = async (id: number) => {
...
@@ -105,15 +105,11 @@ const handleDelete = async (id: number) => {
}
catch
{}
}
catch
{}
}
}
const
handleSwitchChange
=
async
(
id
,
e
)
=>
{
const
handleSwitchChange
=
async
(
row
,
e
)
=>
{
console
.
log
(
'开关状态变更,id:'
,
id
,
'新状态:'
,
e
)
console
.
log
(
'开关状态变更,id:'
,
row
,
'新状态:'
,
e
)
// 创建对象
// 创建对象
const
signInConfig
:
SignInConfigVO
=
{
const
signInConfig
:
SignInConfigVO
=
{
enable
:
e
}
id
:
id
,
;({
id
:
signInConfig
.
id
,
day
:
signInConfig
.
day
,
point
:
signInConfig
.
point
,
enable
:
e
}
=
row
)
day
:
null
,
point
:
null
,
isEnable
:
e
}
await
SignInConfigApi
.
updateSignInConfig
(
signInConfig
)
await
SignInConfigApi
.
updateSignInConfig
(
signInConfig
)
}
}
...
...
src/views/member/signin/record/index.vue
View file @
19444021
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
:inline=
"true"
:inline=
"true"
label-width=
"68px"
label-width=
"68px"
>
>
<el-form-item
label=
"签到用户"
prop=
"nick
N
ame"
>
<el-form-item
label=
"签到用户"
prop=
"nick
n
ame"
>
<el-input
<el-input
v-model=
"queryParams.nick
N
ame"
v-model=
"queryParams.nick
n
ame"
placeholder=
"请输入签到用户"
placeholder=
"请输入签到用户"
clearable
clearable
@
keyup
.
enter=
"handleQuery"
@
keyup
.
enter=
"handleQuery"
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<!-- TODO @xiaqing:展示用户昵称 -->
<!-- TODO @xiaqing:展示用户昵称 -->
<el-table-column
label=
"签到用户"
align=
"center"
prop=
"nick
N
ame"
/>
<el-table-column
label=
"签到用户"
align=
"center"
prop=
"nick
n
ame"
/>
<el-table-column
<el-table-column
label=
"签到天数"
label=
"签到天数"
align=
"center"
align=
"center"
...
@@ -101,7 +101,7 @@ const list = ref([]) // 列表的数据
...
@@ -101,7 +101,7 @@ const list = ref([]) // 列表的数据
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
nick
N
ame
:
null
,
nick
n
ame
:
null
,
day
:
null
,
day
:
null
,
createTime
:
[]
createTime
:
[]
})
})
...
...
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