Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
1e0e0765
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1e0e0765
编写于
2月 11, 2022
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加用户自行修改手机号邮箱功能
上级
64ca2a48
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
131 addition
and
7 deletion
+131
-7
server/source/system/api.go
server/source/system/api.go
+2
-2
web/src/style/element_visiable.scss
web/src/style/element_visiable.scss
+0
-1
web/src/view/person/person.vue
web/src/view/person/person.vue
+129
-4
未找到文件。
server/source/system/api.go
浏览文件 @
1e0e0765
...
...
@@ -22,13 +22,13 @@ func (a *api) Initialize() error {
{
ApiGroup
:
"jwt"
,
Method
:
"POST"
,
Path
:
"/jwt/jsonInBlacklist"
,
Description
:
"jwt加入黑名单(退出,必选)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"DELETE"
,
Path
:
"/user/deleteUser"
,
Description
:
"删除用户"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/register"
,
Description
:
"用户注册
(必选)
"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/register"
,
Description
:
"用户注册"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/getUserList"
,
Description
:
"获取用户列表"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"PUT"
,
Path
:
"/user/setUserInfo"
,
Description
:
"设置用户信息"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"PUT"
,
Path
:
"/user/setSelfInfo"
,
Description
:
"设置自身信息(必选)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"GET"
,
Path
:
"/user/getUserInfo"
,
Description
:
"获取自身信息(必选)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/setUserAuthorities"
,
Description
:
"设置权限组"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/changePassword"
,
Description
:
"修改密码(建
(
选择)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/changePassword"
,
Description
:
"修改密码(建
议
选择)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/setUserAuthority"
,
Description
:
"修改用户角色(必选)"
},
{
ApiGroup
:
"系统用户"
,
Method
:
"POST"
,
Path
:
"/user/resetPassword"
,
Description
:
"重置用户密码"
},
...
...
web/src/style/element_visiable.scss
浏览文件 @
1e0e0765
...
...
@@ -154,7 +154,6 @@
.el-button--small
{
min-height
:
32px
;
font-size
:
12px
!
important
;
line-height
:
32px
;
}
.el-checkbox
{
...
...
web/src/view/person/person.vue
浏览文件 @
1e0e0765
...
...
@@ -94,15 +94,15 @@
<li>
<p
class=
"title"
>
密保手机
</p>
<p
class=
"desc"
>
已绑定手机:
1245678910
<a
href=
"javascript:void(0)"
>
立即修改
</a>
已绑定手机:
{{
userStore
.
userInfo
.
phone
}}
<a
href=
"javascript:void(0)"
@
click=
"changePhoneFlag = true"
>
立即修改
</a>
</p>
</li>
<li>
<p
class=
"title"
>
密保邮箱
</p>
<p
class=
"desc"
>
已绑定邮箱:
gin-vue-admin@google.com.cn
<a
href=
"javascript:void(0)"
>
立即修改
</a>
已绑定邮箱:
{{
userStore
.
userInfo
.
email
}}
<a
href=
"javascript:void(0)"
@
click=
"changeEmailFlag = true"
>
立即修改
</a>
</p>
</li>
<li>
...
...
@@ -167,6 +167,60 @@
</div>
</
template
>
</el-dialog>
<el-dialog
v-model=
"changePhoneFlag"
title=
"绑定手机"
width=
"600px"
>
<el-form
:model=
"phoneForm"
>
<el-form-item
label=
"手机号"
label-width=
"120px"
>
<el-input
v-model=
"phoneForm.phone"
placeholder=
"请输入手机号"
autocomplete=
"off"
/>
</el-form-item>
<el-form-item
label=
"验证码"
label-width=
"120px"
>
<div
class=
"code-box"
>
<el-input
v-model=
"phoneForm.code"
autocomplete=
"off"
placeholder=
"请自行设计短信服务,此处为模拟随便写"
style=
"width:300px"
/>
<el-button
size=
"small"
type=
"primary"
:disabled=
"time>0"
@
click=
"getCode"
>
{{ time>0?`(${time}s)后重新获取`:'获取验证码' }}
</el-button>
</div>
</el-form-item>
</el-form>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"closeChangePhone"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"changePhone"
>
更改
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"changeEmailFlag"
title=
"绑定邮箱"
width=
"600px"
>
<el-form
:model=
"emailForm"
>
<el-form-item
label=
"邮箱"
label-width=
"120px"
>
<el-input
v-model=
"emailForm.email"
placeholder=
"请输入邮箱"
autocomplete=
"off"
/>
</el-form-item>
<el-form-item
label=
"验证码"
label-width=
"120px"
>
<div
class=
"code-box"
>
<el-input
v-model=
"emailForm.code"
placeholder=
"请自行设计邮件服务,此处为模拟随便写"
autocomplete=
"off"
style=
"width:300px"
/>
<el-button
size=
"small"
type=
"primary"
:disabled=
"emailTime>0"
@
click=
"getEmailCode"
>
{{ emailTime>0?`(${emailTime}s)后重新获取`:'获取验证码' }}
</el-button>
</div>
</el-form-item>
</el-form>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"closeChangeEmail"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"changeEmail"
>
更改
</el-button>
</span>
</
template
>
</el-dialog>
</div>
</template>
...
...
@@ -288,6 +342,73 @@ const enterEdit = async() => {
const
handleClick
=
(
tab
,
event
)
=>
{
console
.
log
(
tab
,
event
)
}
const
changePhoneFlag
=
ref
(
false
)
const
time
=
ref
(
0
)
const
phoneForm
=
reactive
({
phone
:
''
,
code
:
''
})
const
getCode
=
async
()
=>
{
time
.
value
=
60
let
timer
=
setInterval
(()
=>
{
time
.
value
--
if
(
time
.
value
<=
0
)
{
clearInterval
(
timer
)
timer
=
null
}
},
1000
)
}
const
closeChangePhone
=
()
=>
{
changePhoneFlag
.
value
=
false
phoneForm
.
phone
=
''
phoneForm
.
code
=
''
}
const
changePhone
=
async
()
=>
{
const
res
=
await
setSelfInfo
({
phone
:
phoneForm
.
phone
})
if
(
res
.
code
===
0
)
{
ElMessage
.
success
(
'
修改成功
'
)
userStore
.
ResetUserInfo
({
phone
:
phoneForm
.
phone
})
closeChangePhone
()
}
}
const
changeEmailFlag
=
ref
(
false
)
const
emailTime
=
ref
(
0
)
const
emailForm
=
reactive
({
email
:
''
,
code
:
''
})
const
getEmailCode
=
async
()
=>
{
emailTime
.
value
=
60
let
timer
=
setInterval
(()
=>
{
emailTime
.
value
--
if
(
emailTime
.
value
<=
0
)
{
clearInterval
(
timer
)
timer
=
null
}
},
1000
)
}
const
closeChangeEmail
=
()
=>
{
changeEmailFlag
.
value
=
false
emailForm
.
email
=
''
emailForm
.
code
=
''
}
const
changeEmail
=
async
()
=>
{
const
res
=
await
setSelfInfo
({
email
:
emailForm
.
email
})
if
(
res
.
code
===
0
)
{
ElMessage
.
success
(
'
修改成功
'
)
userStore
.
ResetUserInfo
({
email
:
emailForm
.
email
})
closeChangeEmail
()
}
}
</
script
>
<
style
lang=
"scss"
>
...
...
@@ -425,4 +546,8 @@ const handleClick = (tab, event) => {
.pointer
{
cursor
:
pointer
;
}
.code-box
{
display
:
flex
;
justify-content
:
space-between
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录