🍺 添加用户管理界面
This commit is contained in:
@@ -124,6 +124,25 @@ func (c *PageAuthController) OrderSummary() {
|
||||
c.TplName = "order_summary.html"
|
||||
}
|
||||
|
||||
func (c *PageAuthController) UserManagement() {
|
||||
token := ""
|
||||
// 获取当前时间的时间戳
|
||||
currentTime := time.Now()
|
||||
targetMinute := (currentTime.Minute() / 10) * 10
|
||||
targetTime := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day(), currentTime.Hour(), targetMinute, 0, 0, currentTime.Location())
|
||||
now := strconv.Itoa(int(targetTime.Unix()))
|
||||
secretCfg := config.GetSecret()
|
||||
tokenB, err := utils.AesCBCEncrypt([]byte(now), []byte(secretCfg.Key), []byte(secretCfg.IV))
|
||||
if err == nil {
|
||||
//base64编码
|
||||
token = base64.URLEncoding.EncodeToString(tokenB)
|
||||
}
|
||||
c.Data["token"] = token
|
||||
c.Data["portalHost"] = config.GetPortalHost()
|
||||
c.Data["roadUid"] = c.GetString("roadUid")
|
||||
c.TplName = "user/management.html"
|
||||
}
|
||||
|
||||
func (c *PageAuthController) RechargeAppleOrderPage() {
|
||||
token := ""
|
||||
// 获取当前时间的时间戳
|
||||
|
||||
@@ -21,6 +21,8 @@ func init() {
|
||||
beego.Router("/merchant.html", &controllers.PageAuthController{}, "*:MerchantPage")
|
||||
beego.Router("/merchant_v2.html", &controllers.PageAuthController{}, "*:MerchantV2Page")
|
||||
|
||||
beego.Router("/customerUserManagement.html", &controllers.PageAuthController{}, "*:UserManagement")
|
||||
|
||||
beego.Router("/order-summary-info.html", &controllers.PageAuthController{}, "*:OrderSummary")
|
||||
beego.Router("/recharge-apple-card-account.html", &controllers.PageAuthController{}, "*:RechargeAppleAccountPage")
|
||||
beego.Router("/recharge-apple-card-order.html", &controllers.PageAuthController{}, "*:RechargeAppleOrderPage")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
|
||||
<body>
|
||||
<iframe src="">
|
||||
</iframe>
|
||||
@@ -17,5 +16,4 @@
|
||||
// 链接添加至到iframe中
|
||||
document.getElementsByTagName("iframe")[0].src = url;
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
@@ -15,7 +14,6 @@
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.middle {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
@@ -33,16 +31,13 @@
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.middle .sider-left .sider-bar {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle .sider-left li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.middle .sider-right {
|
||||
float: right;
|
||||
bottom: 30px;
|
||||
@@ -52,16 +47,13 @@
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.middle .sider-right .main {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.middle .sider-left .divider {
|
||||
border-top: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.middle .sider-left .first-menu {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
@@ -75,7 +67,6 @@
|
||||
border-top: 1px solid #e7e7e7;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.middle .sider-left .first-menu-main {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
@@ -89,18 +80,15 @@
|
||||
border-top: 1px solid #e7e7e7;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.middle .sider-left .first-menu .first-title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.middle .sider-left .last-glyphicon {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.middle .sider-left .second-menu a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -111,11 +99,9 @@
|
||||
font-size: 13px;
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
.middle .sider-left .second-menu a:last-child {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
border: 2px solid #e7e7e7;
|
||||
@@ -125,9 +111,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- 更改密码的模态框 -->
|
||||
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
data-keyboard="false">
|
||||
@@ -139,7 +123,6 @@
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">用户密码更改</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p class="color-red text-center">温馨提示:新密码字为8~16个字符,字母和数字组成。</p>
|
||||
<div class="row margin-top-20">
|
||||
@@ -183,7 +166,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="totpModal" tabindex="-1" role="dialog" aria-labelledby="myTotpLabel"
|
||||
data-keyboard="false">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -225,10 +207,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 导航栏 -->
|
||||
<div class="self-nav">
|
||||
|
||||
</div>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" id="navbar-inverse">
|
||||
<div class="container-fluid">
|
||||
@@ -307,6 +287,7 @@
|
||||
<div class="second-menu">
|
||||
<a href="#" onclick='loadMainContent("/merchant.html")'><span>商户配置</span></a>
|
||||
<a href="#" onclick='loadMainContent("/merchant_v2.html")'><span>商户配置(V2)</span></a>
|
||||
<a href="#" onclick='loadMainContent("/customerUserManagement.html")'>供销客户管理</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -511,7 +492,6 @@
|
||||
setError(".new-error", msg);
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "/update/password",
|
||||
data: {
|
||||
@@ -519,7 +499,6 @@
|
||||
newPassword: newPassword,
|
||||
twicePassword: twicePassword
|
||||
},
|
||||
|
||||
success: function (res) {
|
||||
if (res.Code == 200) {
|
||||
//将模态框关闭
|
||||
@@ -553,13 +532,11 @@
|
||||
alert("系统异常,退出失败!");
|
||||
}
|
||||
},
|
||||
|
||||
error: function (e) {
|
||||
alert("系统异常!");
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(".first-menu").click(function (event) {
|
||||
//判断右边图标箭头是向右,还是向下;如果当前的图片是向下,那么变为向右;有所的兄弟图标全部变为向右。
|
||||
if ($(this).children(".last-glyphicon").hasClass("glyphicon-plus")) {
|
||||
@@ -666,7 +643,6 @@
|
||||
margin-right: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.totp-body {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
19
views/user/management.html
Normal file
19
views/user/management.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<body>
|
||||
<iframe src="">
|
||||
</iframe>
|
||||
</body>
|
||||
<style>
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 90vh;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
// 构建链接
|
||||
const url = "{{.portalHost}}" + "/iframe/users?token={{.token}}";
|
||||
// 链接添加至到iframe中
|
||||
document.getElementsByTagName("iframe")[0].src = url;
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user