feature: update flask to 3.0.0
This commit is contained in:
+321
-265
@@ -1,308 +1,364 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>个人资料</title>
|
||||
<style>
|
||||
.pear-container {
|
||||
background-color: whitesmoke;
|
||||
margin: 10px;
|
||||
}
|
||||
.pear-container {
|
||||
background-color: whitesmoke;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
padding: 25px;
|
||||
}
|
||||
.layui-body {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.user-info-head {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
line-height: 110px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.user-info-head {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
line-height: 110px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.layui-line-dash {
|
||||
border-bottom: 1px dashed #ccc;
|
||||
margin: 15px 0;
|
||||
}
|
||||
.layui-line-dash {
|
||||
border-bottom: 1px dashed #ccc;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
position: absolute;
|
||||
bottom: 3px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: dimgray;
|
||||
}
|
||||
.comment {
|
||||
position: absolute;
|
||||
bottom: 3px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: dimgray;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-left: 13px;
|
||||
font-size: 13px;
|
||||
color: dimgray;
|
||||
}
|
||||
.content {
|
||||
padding-left: 13px;
|
||||
font-size: 13px;
|
||||
color: dimgray;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-left: 13.5px;
|
||||
}
|
||||
.title {
|
||||
padding-left: 13.5px;
|
||||
}
|
||||
|
||||
.layui-tab-title {
|
||||
border-bottom: none;
|
||||
}
|
||||
.layui-tab-title {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.fl-item {
|
||||
height: 30px;
|
||||
font-size: 13.5;
|
||||
}
|
||||
.fl-item {
|
||||
height: 30px;
|
||||
font-size: 13.5;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50px;
|
||||
background-color: gray;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50px;
|
||||
background-color: gray;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.list .list-item {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
color: gray;
|
||||
padding: 5px;
|
||||
padding-left: 15px;
|
||||
border-radius: 4px;
|
||||
margin-top: 5.2px;
|
||||
}
|
||||
.list .list-item {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
color: gray;
|
||||
padding: 5px;
|
||||
padding-left: 15px;
|
||||
border-radius: 4px;
|
||||
margin-top: 5.2px;
|
||||
}
|
||||
|
||||
.list .list-item:hover {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
.list .list-item:hover {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
.list .list-item .title {
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
.list .list-item .title {
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list .list-item .footer {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.list .list-item .footer {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="pear-container">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md3">
|
||||
</head>
|
||||
<body class="pear-container">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 25px;">
|
||||
<div class="text-center layui-text">
|
||||
<div class="user-info-head" id="userInfoHead">
|
||||
<img src="/static/admin/images/avatar.jpg" id="userAvatar" width="115px" height="115px" alt="">
|
||||
</div>
|
||||
<h2 style="padding-top: 20px;font-size: 20px;">就眠仪式</h2>
|
||||
<p style="padding-top: 8px;margin-top: 10px;font-size: 13.5px;">China , 中国</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 45px;border-top: 1px whitesmoke solid;text-align: center;line-height: 45px;font-size: 13.5px;">
|
||||
<span>今日事 ,今日毕</span>
|
||||
<div class="layui-card-body" style="padding: 25px">
|
||||
<div class="text-center layui-text">
|
||||
<div class="user-info-head" id="userInfoHead">
|
||||
<img
|
||||
src="/static/admin/images/avatar.jpg"
|
||||
id="userAvatar"
|
||||
width="115px"
|
||||
height="115px"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<h2 style="padding-top: 20px; font-size: 20px">就眠仪式</h2>
|
||||
<p style="padding-top: 8px; margin-top: 10px; font-size: 13.5px">
|
||||
China , 中国
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
height: 45px;
|
||||
border-top: 1px whitesmoke solid;
|
||||
text-align: center;
|
||||
line-height: 45px;
|
||||
font-size: 13.5px;
|
||||
"
|
||||
>
|
||||
<span>今日事 ,今日毕</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
归档
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="list">
|
||||
<li class="list-item"><span class="title">优化代码格式</span><span
|
||||
class="footer">2020-06-04 11:28</span></li>
|
||||
<li class="list-item"><span class="title">新增消息组件</span><span
|
||||
class="footer">2020-06-01 04:23</span></li>
|
||||
<li class="list-item"><span class="title">移动端兼容</span><span
|
||||
class="footer">2020-05-22 21:38</span></li>
|
||||
<li class="list-item"><span class="title">系统布局优化</span><span
|
||||
class="footer">2020-05-15 14:26</span></li>
|
||||
<li class="list-item"><span class="title">兼容多系统菜单模式</span><span class="footer">2020-05-13 16:32</span>
|
||||
</li>
|
||||
<li class="list-item"><span class="title">兼容多标签页切换</span><span class="footer">2019-12-9 14:58</span>
|
||||
</li>
|
||||
<li class="list-item"><span class="title">扩展下拉组件</span><span
|
||||
class="footer">2019-12-7 9:06</span></li>
|
||||
<li class="list-item"><span class="title">扩展卡片样式</span><span
|
||||
class="footer">2019-12-1 10:26</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="layui-card-header">归档</div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="list">
|
||||
<li class="list-item">
|
||||
<span class="title">优化代码格式</span
|
||||
><span class="footer">2020-06-04 11:28</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">新增消息组件</span
|
||||
><span class="footer">2020-06-01 04:23</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">移动端兼容</span
|
||||
><span class="footer">2020-05-22 21:38</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">系统布局优化</span
|
||||
><span class="footer">2020-05-15 14:26</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">兼容多系统菜单模式</span
|
||||
><span class="footer">2020-05-13 16:32</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">兼容多标签页切换</span
|
||||
><span class="footer">2019-12-9 14:58</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">扩展下拉组件</span
|
||||
><span class="footer">2019-12-7 9:06</span>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<span class="title">扩展卡片样式</span
|
||||
><span class="footer">2019-12-1 10:26</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
我的文章
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px;">
|
||||
<div class="layui-col-md1">
|
||||
<img src="../../admin/images/act.jpg"
|
||||
style="width: 100%;height: 100%;border-radius: 5px;"/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px;">
|
||||
<div class="title">为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">2020-06-12 评论 5 点赞 12
|
||||
转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card-header">我的文章</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" style="margin: 15px">
|
||||
<div class="layui-col-md1">
|
||||
<img
|
||||
src="../../admin/images/act.jpg"
|
||||
style="width: 100%; height: 100%; border-radius: 5px"
|
||||
/>
|
||||
</div>
|
||||
<div class="layui-col-md11" style="height: 80px">
|
||||
<div class="title">
|
||||
为什么程序员们愿意在GitHub上开源自己的成果给别人免费使用和学习?
|
||||
</div>
|
||||
<div class="content">
|
||||
“Git的精髓在于让所有人的贡献无缝合并。而GitHub的天才之处,在于理解了Git的精髓。”来一句我们程序员们接地气的话:分享是一种快乐~
|
||||
</div>
|
||||
<div class="comment">
|
||||
2020-06-12 评论 5
|
||||
点赞 12 转发 4
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(['jquery', 'element', 'layer', 'convert'], function () {
|
||||
<script>
|
||||
layui.use(["jquery", "element", "layer", "convert"], function () {
|
||||
var element = layui.element,
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery,
|
||||
convert = layui.convert;
|
||||
layer = layui.layer,
|
||||
$ = layui.jquery,
|
||||
convert = layui.convert;
|
||||
|
||||
let MODULE_PATH = "operate/";
|
||||
|
||||
var image = new Image();
|
||||
image.src = "../../admin/images/avatar.jpg";
|
||||
image.onload = function () {
|
||||
$("#userAvatar").attr("src", convert.imageToBase64(image));
|
||||
}
|
||||
$("#userAvatar").attr("src", convert.imageToBase64(image));
|
||||
};
|
||||
|
||||
window.callback = function (data) {
|
||||
layer.close(data.index);
|
||||
$("#userAvatar").attr("src", data.newAvatar);
|
||||
}
|
||||
layer.close(data.index);
|
||||
$("#userAvatar").attr("src", data.newAvatar);
|
||||
};
|
||||
|
||||
$("#userAvatar").click(function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更换图片',
|
||||
shade: 0.1,
|
||||
area: ["900px", "500px"],
|
||||
content: MODULE_PATH + 'profile.html',
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index, layero) {
|
||||
window['layui-layer-iframe' + index].submitForm();
|
||||
}
|
||||
});
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "更换图片",
|
||||
shade: 0.1,
|
||||
area: ["900px", "500px"],
|
||||
content: MODULE_PATH + "profile.html",
|
||||
btn: ["确定", "取消"],
|
||||
yes: function (index, layero) {
|
||||
window["layui-layer-iframe" + index].submitForm();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,89 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Title</title>
|
||||
{% include 'includes/script.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-panel">
|
||||
<form class="layui-form" action="">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-panel">
|
||||
<form class="layui-form" action="">
|
||||
<div class="row" style="margin: 10px 5px">
|
||||
<ul id="role_rights" class="dtree" data-id="0"></ul>
|
||||
<ul id="role_rights" class="dtree" data-id="0"></ul>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit=""
|
||||
lay-filter="role-rights-save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button
|
||||
type="submit"
|
||||
class="layui-btn layui-btn-primary layui-btn-sm"
|
||||
lay-submit=""
|
||||
lay-filter="role-rights-save"
|
||||
>
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
layui.use(function () {
|
||||
<script>
|
||||
layui.use(function () {
|
||||
let tree = layui.tree;
|
||||
let form = layui.form;
|
||||
let $ = layui.jquery;
|
||||
|
||||
function get_id(list_tree_data) {
|
||||
if (Array.isArray(list_tree_data)) {
|
||||
let ret = []
|
||||
$.each(list_tree_data, function (index, item) {
|
||||
if (item?.children) {
|
||||
ret.push(...get_id(item.children))
|
||||
}
|
||||
ret.push(...get_id(item))
|
||||
})
|
||||
return ret
|
||||
} else {
|
||||
return [list_tree_data.id]
|
||||
}
|
||||
if (Array.isArray(list_tree_data)) {
|
||||
let ret = [];
|
||||
$.each(list_tree_data, function (index, item) {
|
||||
if (item?.children) {
|
||||
ret.push(...get_id(item.children));
|
||||
}
|
||||
ret.push(...get_id(item));
|
||||
});
|
||||
return ret;
|
||||
} else {
|
||||
return [list_tree_data.id];
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/api/v1/role/role_rights/{{ rid }}?type=tree',
|
||||
type: 'get',
|
||||
success: function (ret) {
|
||||
tree.render({
|
||||
elem: '#role_rights',
|
||||
id: 'role_rights',
|
||||
data: ret.data,
|
||||
showCheckbox: true,
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
form.on('submit(role-rights-save)', function (data) {
|
||||
let param = tree.getChecked('role_rights'); // 获取选中节点的数据
|
||||
let rights_ids = get_id(param).join();
|
||||
$.ajax({
|
||||
url: '/api/v1/role/role_rights/{{ rid }}',
|
||||
data: JSON.stringify({rights_ids: rights_ids}),
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'put',
|
||||
success: function (result) {
|
||||
if (result.code === 0) {
|
||||
layer.msg(result.message, {icon: 1, time: 1000}, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.message, {icon: 2, time: 1000});
|
||||
}
|
||||
},
|
||||
url: "/api/v1/rights?type=tree",
|
||||
type: "get",
|
||||
success: function (ret) {
|
||||
tree.render({
|
||||
elem: "#role_rights",
|
||||
id: "role_rights",
|
||||
data: ret.data,
|
||||
showCheckbox: true,
|
||||
});
|
||||
return false;
|
||||
$.ajax({
|
||||
url: "/api/v1/role/role_rights/{{ rid }}?type=tree",
|
||||
type: "get",
|
||||
success: function (ret) {
|
||||
tree.setChecked("role_rights", ret.data);
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
form.on("submit(role-rights-save)", function (data) {
|
||||
let param = tree.getChecked("role_rights"); // 获取选中节点的数据
|
||||
let rights_ids = get_id(param).join();
|
||||
$.ajax({
|
||||
url: "/api/v1/role/role_rights/{{ rid }}",
|
||||
data: JSON.stringify({ rights_ids: rights_ids }),
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
type: "put",
|
||||
success: function (result) {
|
||||
if (result.code === 0) {
|
||||
layer.msg(result.message, { icon: 1, time: 1000 }, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.message, { icon: 2, time: 1000 });
|
||||
}
|
||||
},
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user