Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
courseSign
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
courseSign
Commits
71e79bbf
Commit
71e79bbf
authored
Nov 28, 2024
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
adaea545
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
137 additions
and
72 deletions
+137
-72
course_action_users.go
server/api/v1/course/course_action_users.go
+21
-38
package.json
web/package.json
+10
-1
main.js
web/src/main.js
+1
-4
courseList.vue
web/src/view/courseList/courseList.vue
+0
-0
courseSignup.vue
web/src/view/courseSignup/courseSignup.vue
+85
-3
index.vue
web/src/view/dashboard/index.vue
+0
-6
index.vue
web/src/view/login/index.vue
+17
-17
person.vue
web/src/view/person/person.vue
+3
-3
No files found.
server/api/v1/course/course_action_users.go
View file @
71e79bbf
...
@@ -346,7 +346,16 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignAction(c *gin.Context)
...
@@ -346,7 +346,16 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignAction(c *gin.Context)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
return
return
}
}
// 检查课程活动 信息
if
!*
actionInfo
.
IsShow
{
response
.
FailWithMessage
(
"活动已下线"
,
c
)
return
}
if
actionInfo
.
ActionEnd
.
Unix
()
<
time
.
Now
()
.
Unix
()
{
response
.
FailWithMessage
(
"活动已结束"
,
c
)
return
}
user
,
err
:=
courseUsersService
.
GetCourseUsersByAddr
(
claims
.
Username
)
user
,
err
:=
courseUsersService
.
GetCourseUsersByAddr
(
claims
.
Username
)
if
err
!=
nil
{
if
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
...
@@ -370,25 +379,6 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignAction(c *gin.Context)
...
@@ -370,25 +379,6 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignAction(c *gin.Context)
return
return
}
}
// 检查课程活动 信息
courseAction
,
err
:=
courseActionService
.
GetCourseAction
(
uint
(
*
actionInfo
.
Cid
))
if
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
return
}
if
!*
courseAction
.
IsShow
{
response
.
FailWithMessage
(
"活动已下线"
,
c
)
return
}
if
courseAction
.
ActionEnd
.
Unix
()
<
time
.
Now
()
.
Unix
()
{
response
.
FailWithMessage
(
"活动已结束"
,
c
)
return
}
courseSign
,
err
:=
courseSignupService
.
GetCourseSignupByUidAndCid
(
uint
(
*
actionInfo
.
Cid
),
user
.
ID
)
courseSign
,
err
:=
courseSignupService
.
GetCourseSignupByUidAndCid
(
uint
(
*
actionInfo
.
Cid
),
user
.
ID
)
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
...
@@ -450,6 +440,18 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
...
@@ -450,6 +440,18 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
return
return
}
}
// 检查课程活动 信息
if
!*
actionInfo
.
IsShow
{
response
.
FailWithMessage
(
"活动已下线"
,
c
)
return
}
if
actionInfo
.
ActionEnd
.
Unix
()
<
time
.
Now
()
.
Unix
()
{
response
.
FailWithMessage
(
"活动已结束"
,
c
)
return
}
user
,
err
:=
courseUsersService
.
GetCourseUsersByAddr
(
address
)
user
,
err
:=
courseUsersService
.
GetCourseUsersByAddr
(
address
)
if
err
!=
nil
{
if
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
...
@@ -473,25 +475,6 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
...
@@ -473,25 +475,6 @@ func (courseActionUsersApi *CourseActionUsersApi) WebSignActionSimple(c *gin.Con
return
return
}
}
// 检查课程活动 信息
courseAction
,
err
:=
courseActionService
.
GetCourseAction
(
uint
(
*
actionInfo
.
Cid
))
if
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
return
}
if
!*
courseAction
.
IsShow
{
response
.
FailWithMessage
(
"活动已下线"
,
c
)
return
}
if
courseAction
.
ActionEnd
.
Unix
()
<
time
.
Now
()
.
Unix
()
{
response
.
FailWithMessage
(
"活动已结束"
,
c
)
return
}
courseSign
,
err
:=
courseSignupService
.
GetCourseSignupByUidAndCid
(
uint
(
*
actionInfo
.
Cid
),
user
.
ID
)
courseSign
,
err
:=
courseSignupService
.
GetCourseSignupByUidAndCid
(
uint
(
*
actionInfo
.
Cid
),
user
.
ID
)
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
response
.
FailWithMessage
(
err
.
Error
(),
c
)
...
...
web/package.json
View file @
71e79bbf
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"@element-plus/icons-vue"
:
"^0.2.7"
,
"@element-plus/icons-vue"
:
"^0.2.7"
,
"@vueup/vue-quill"
:
"^1.2.0"
,
"@wangeditor/editor"
:
"^5.1.23"
,
"@wangeditor/editor-for-vue"
:
"^5.1.12"
,
"axios"
:
"^0.19.2"
,
"axios"
:
"^0.19.2"
,
"core-js"
:
"^3.6.5"
,
"core-js"
:
"^3.6.5"
,
"echarts"
:
"5.3.2"
,
"echarts"
:
"5.3.2"
,
...
@@ -27,7 +30,8 @@
...
@@ -27,7 +30,8 @@
"spark-md5"
:
"^3.0.1"
,
"spark-md5"
:
"^3.0.1"
,
"vue"
:
"^3.2.25"
,
"vue"
:
"^3.2.25"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^4.0.0-0"
"vue-router"
:
"^4.0.0-0"
,
"vue2-editor"
:
"^2.10.3"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@vitejs/plugin-legacy"
:
"^2.0.0"
,
"@vitejs/plugin-legacy"
:
"^2.0.0"
,
...
@@ -51,5 +55,10 @@
...
@@ -51,5 +55,10 @@
"vite"
:
"^3.0.1"
,
"vite"
:
"^3.0.1"
,
"vite-plugin-banner"
:
"^0.1.3"
,
"vite-plugin-banner"
:
"^0.1.3"
,
"vite-plugin-importer"
:
"^0.2.5"
"vite-plugin-importer"
:
"^0.2.5"
},
"eslintConfig"
:
{
"env"
:
{
"vue/setup-compiler-macros"
:
true
}
}
}
}
}
web/src/main.js
View file @
71e79bbf
...
@@ -14,9 +14,7 @@ import 'element-plus/es/components/loading/style/css'
...
@@ -14,9 +14,7 @@ import 'element-plus/es/components/loading/style/css'
import
'element-plus/es/components/notification/style/css'
import
'element-plus/es/components/notification/style/css'
import
'element-plus/es/components/message-box/style/css'
import
'element-plus/es/components/message-box/style/css'
import
'./style/element_visiable.scss'
import
'./style/element_visiable.scss'
//
import
VueQuillEditor
from
'vue-quill-editor'
import
'quill/dist/quill.snow.css'
initDom
()
initDom
()
/**
/**
...
@@ -40,7 +38,6 @@ app
...
@@ -40,7 +38,6 @@ app
.
use
(
store
)
.
use
(
store
)
.
use
(
auth
)
.
use
(
auth
)
.
use
(
router
)
.
use
(
router
)
.
use
(
VueQuillEditor
)
.
mount
(
'#app'
)
.
mount
(
'#app'
)
export
default
app
export
default
app
web/src/view/courseList/courseList.vue
View file @
71e79bbf
This diff is collapsed.
Click to expand it.
web/src/view/courseSignup/courseSignup.vue
View file @
71e79bbf
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
</el-table-column>
</el-table-column>
<el-table-column
align=
"left"
label=
"按钮组"
>
<el-table-column
align=
"left"
label=
"按钮组"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
v-if=
"!scope.row.isPass"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseSignupFunc(scope.row)"
>
审核
</el-button>
<el-button
type=
"primary"
v-if=
"!scope.row.isPass
&& !scope.row.isFrozen
"
link
icon=
"edit"
class=
"table-button"
@
click=
"updateCourseSignupFunc(scope.row)"
>
审核
</el-button>
<!--
<el-button
type=
"primary"
link
icon=
"delete"
@
click=
"deleteRow(scope.row)"
>
删除
</el-button>
--
>
<el-button
type=
"primary"
v-if=
"!scope.row.isFrozen"
link
icon=
"edit"
@
click=
"frozenSign(scope.row)"
>
冻结
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
<el-switch
v-model=
"formData.isPass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
<el-switch
v-model=
"formData.isPass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
</el-form-item>
</el-form-item>
<el-form-item
label=
"冻结:"
prop=
"isFrozen"
>
<el-form-item
label=
"冻结:"
prop=
"isFrozen"
>
<el-switch
v-model=
"formData.isFrozen"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
<el-switch
v-model=
"formData.isFrozen"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
disabled
></el-switch>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<
template
#
footer
>
<
template
#
footer
>
...
@@ -107,6 +107,38 @@
...
@@ -107,6 +107,38 @@
</div>
</div>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
<el-dialog
v-model=
"dialogFormVisibleTwo"
:before-close=
"closeDialogTwo"
title=
"冻结操作"
>
<el-form
:model=
"formData"
label-position=
"right"
ref=
"elFormRef"
:rules=
"rule"
label-width=
"80px"
>
<el-form-item
label=
"用户:"
prop=
"addr"
>
<el-input
v-model=
"formData.addr"
:clearable=
"false"
placeholder=
"请输入"
disabled
/>
</el-form-item>
<el-form-item
label=
"性别 0 女性 1 男性:"
prop=
"sex"
>
<el-switch
v-model=
"formData.sex"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
disabled
></el-switch>
</el-form-item>
<el-form-item
label=
"年龄:"
prop=
"age"
>
<el-input
v-model
.
number=
"formData.age"
placeholder=
"请输入"
disabled
/>
</el-form-item>
<el-form-item
label=
"公司:"
prop=
"company"
>
<el-input
v-model
.
number=
"formData.company"
placeholder=
"请输入"
disabled
/>
</el-form-item>
<el-form-item
label=
"头像:"
prop=
"photo"
>
<img
v-if=
"formData.photo"
alt=
"头像"
class=
"header-img-box"
:src=
"(formData.photo && formData.photo.slice(0, 4) !== 'http')?path+formData.photo:formData.photo"
>
</el-form-item>
<el-form-item
label=
"通过:"
prop=
"isPass"
>
<el-switch
v-model=
"formData.isPass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
disabled
></el-switch>
</el-form-item>
<el-form-item
label=
"冻结:"
prop=
"isFrozen"
>
<el-switch
v-model=
"formData.isFrozen"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
active-text=
"是"
inactive-text=
"否"
clearable
></el-switch>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialogTwo"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"enterDialogTwo"
>
确 定
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -266,6 +298,16 @@ const updateCourseSignupFunc = async(row) => {
...
@@ -266,6 +298,16 @@ const updateCourseSignupFunc = async(row) => {
}
}
}
}
// 更新行
const
frozenSign
=
async
(
row
)
=>
{
const
res
=
await
findCourseSignup
({
ID
:
row
.
ID
})
type
.
value
=
'update'
if
(
res
.
code
===
0
)
{
formData
.
value
=
res
.
data
.
recourseSignup
dialogFormVisibleTwo
.
value
=
true
}
}
// 删除行
// 删除行
const
deleteCourseSignupFunc
=
async
(
row
)
=>
{
const
deleteCourseSignupFunc
=
async
(
row
)
=>
{
...
@@ -284,6 +326,7 @@ const deleteCourseSignupFunc = async (row) => {
...
@@ -284,6 +326,7 @@ const deleteCourseSignupFunc = async (row) => {
// 弹窗控制标记
// 弹窗控制标记
const
dialogFormVisible
=
ref
(
false
)
const
dialogFormVisible
=
ref
(
false
)
const
dialogFormVisibleTwo
=
ref
(
false
)
// 打开弹窗
// 打开弹窗
const
openDialog
=
()
=>
{
const
openDialog
=
()
=>
{
...
@@ -291,6 +334,12 @@ const openDialog = () => {
...
@@ -291,6 +334,12 @@ const openDialog = () => {
dialogFormVisible
.
value
=
true
dialogFormVisible
.
value
=
true
}
}
// 打开弹窗
const
openDialogTwo
=
()
=>
{
type
.
value
=
'edit'
dialogFormVisible
.
value
=
true
}
// 关闭弹窗
// 关闭弹窗
const
closeDialog
=
()
=>
{
const
closeDialog
=
()
=>
{
dialogFormVisible
.
value
=
false
dialogFormVisible
.
value
=
false
...
@@ -300,6 +349,15 @@ const closeDialog = () => {
...
@@ -300,6 +349,15 @@ const closeDialog = () => {
isPass
:
false
,
isPass
:
false
,
}
}
}
}
const
closeDialogTwo
=
()
=>
{
dialogFormVisibleTwo
.
value
=
false
formData
.
value
=
{
uid
:
0
,
cid
:
0
,
isPass
:
false
,
}
}
// 弹窗确定
// 弹窗确定
const
enterDialog
=
async
()
=>
{
const
enterDialog
=
async
()
=>
{
elFormRef
.
value
?.
validate
(
async
(
valid
)
=>
{
elFormRef
.
value
?.
validate
(
async
(
valid
)
=>
{
...
@@ -326,6 +384,30 @@ const enterDialog = async () => {
...
@@ -326,6 +384,30 @@ const enterDialog = async () => {
}
}
})
})
}
}
// 弹窗确定
const
enterDialogTwo
=
async
()
=>
{
elFormRef
.
value
?.
validate
(
async
(
valid
)
=>
{
if
(
!
valid
)
return
let
res
switch
(
type
.
value
)
{
case
'update'
:
res
=
await
updateCourseSignup
(
formData
.
value
)
break
default
:
res
=
await
createCourseSignup
(
formData
.
value
)
break
}
if
(
res
.
code
===
0
)
{
ElMessage
({
type
:
'success'
,
message
:
'创建/更改成功'
})
closeDialogTwo
()
getTableData
()
}
})
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
web/src/view/dashboard/index.vue
View file @
71e79bbf
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<img
src=
"@/assets/air.png"
alt
>
<a
style=
"color:#409EFF"
target=
"view_window"
href=
"https://mainnet.bityuan.com/address/1QBGDgy6CRPJj1mCFE1S2MYNfqDuGq3bJu"
>
查询余额
</a>
<!--
<div
class=
"gva-card-box"
>
-->
<!--
<div
class=
"gva-card-box"
>
-->
<!--
<div
class=
"gva-card gva-top-card"
>
-->
<!--
<div
class=
"gva-card gva-top-card"
>
-->
<!--
<div
class=
"gva-top-card-left"
>
-->
<!--
<div
class=
"gva-top-card-left"
>
-->
...
...
web/src/view/login/index.vue
View file @
71e79bbf
...
@@ -70,23 +70,23 @@
...
@@ -70,23 +70,23 @@
</div>
</div>
<div
class=
"login_panel_right"
/>
<div
class=
"login_panel_right"
/>
<div
class=
"login_panel_foot"
>
<div
class=
"login_panel_foot"
>
<div
class=
"links"
>
<!--
<div
class=
"links"
>
--
>
<a
href=
"http://doc.henrongyi.top/"
target=
"_blank"
>
<!--
<a
href=
"http://doc.henrongyi.top/"
target=
"_blank"
>
--
>
<img
src=
"@/assets/docs.png"
class=
"link-icon"
alt=
"文档"
>
<!--
<img
src=
"@/assets/docs.png"
class=
"link-icon"
alt=
"文档"
>
--
>
</a
>
<!--
</a>
--
>
<a
href=
"https://support.qq.com/product/371961"
target=
"_blank"
>
<!--
<a
href=
"https://support.qq.com/product/371961"
target=
"_blank"
>
--
>
<img
src=
"@/assets/kefu.png"
class=
"link-icon"
alt=
"客服"
>
<!--
<img
src=
"@/assets/kefu.png"
class=
"link-icon"
alt=
"客服"
>
--
>
</a
>
<!--
</a>
--
>
<a
<!--
<a-->
href=
"https://reward"
<!-- href="https://reward"-->
target=
"_blank"
<!-- target="_blank"-->
>
<!-- >--
>
<img
src=
"@/assets/github.png"
class=
"link-icon"
alt=
"github"
>
<!--
<img
src=
"@/assets/github.png"
class=
"link-icon"
alt=
"github"
>
--
>
</a
>
<!--
</a>
--
>
<a
href=
"https://space.bilibili.com/322210472"
target=
"_blank"
>
<!--
<a
href=
"https://space.bilibili.com/322210472"
target=
"_blank"
>
--
>
<img
src=
"@/assets/video.png"
class=
"link-icon"
alt=
"视频站"
>
<!--
<img
src=
"@/assets/video.png"
class=
"link-icon"
alt=
"视频站"
>
--
>
</a
>
<!--
</a>
--
>
</div
>
<!--
</div>
--
>
<div
class=
"copyright"
>
<div
class=
"copyright"
>
<BottomInfo
/>
<BottomInfo
/>
</div>
</div>
...
...
web/src/view/person/person.vue
View file @
71e79bbf
...
@@ -52,21 +52,21 @@
...
@@ -52,21 +52,21 @@
<el-tooltip
<el-tooltip
class=
"item"
class=
"item"
effect=
"light"
effect=
"light"
content=
"
北京反转极光科技有限公司-技术部-前端事业群
"
content=
"
技术部
"
placement=
"top"
placement=
"top"
>
>
<li>
<li>
<el-icon>
<el-icon>
<data-analysis
/>
<data-analysis
/>
</el-icon>
</el-icon>
北京反转极光科技有限公司-技术部-前端事业群
技术部-前端
</li>
</li>
</el-tooltip>
</el-tooltip>
<li>
<li>
<el-icon>
<el-icon>
<video-camera
/>
<video-camera
/>
</el-icon>
</el-icon>
中国
·北京市·朝阳区
中国
</li>
</li>
<el-tooltip
<el-tooltip
class=
"item"
class=
"item"
...
...
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