feat(recharge): 添加携程充值管理功能
- 新增携程账号管理和订单管理页面 - 实现携程充值相关的页面控制器和路由 - 添加携程充值所需的模板文件
This commit is contained in:
@@ -218,6 +218,42 @@ func (c *PageAuthController) WalmartAccountPage() {
|
|||||||
c.TplName = "walmart-card/account.html"
|
c.TplName = "walmart-card/account.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *PageAuthController) CTripOrderPage() {
|
||||||
|
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.TplName = "c-trip-card/order.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PageAuthController) CTripAccountPage() {
|
||||||
|
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.TplName = "c-trip-card/account.html"
|
||||||
|
}
|
||||||
|
|
||||||
func (c *PageAuthController) RechargeTMallGameShopOrderPage() {
|
func (c *PageAuthController) RechargeTMallGameShopOrderPage() {
|
||||||
token := ""
|
token := ""
|
||||||
// 获取当前时间的时间戳
|
// 获取当前时间的时间戳
|
||||||
|
|||||||
@@ -232,7 +232,6 @@ func (c *UpdateController) UpdateOrderStatus() {
|
|||||||
}
|
}
|
||||||
_ = c.ServeJSON()
|
_ = c.ServeJSON()
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
userInfo := user.GetUserInfoByUserID(userID)
|
userInfo := user.GetUserInfoByUserID(userID)
|
||||||
if userInfo.UserId == "" {
|
if userInfo.UserId == "" {
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ func init() {
|
|||||||
beego.Router("/recharge-walmart-account.html", &controllers.PageAuthController{}, "*:WalmartAccountPage")
|
beego.Router("/recharge-walmart-account.html", &controllers.PageAuthController{}, "*:WalmartAccountPage")
|
||||||
beego.Router("/recharge-walmart-order.html", &controllers.PageAuthController{}, "*:WalmartOrderPage")
|
beego.Router("/recharge-walmart-order.html", &controllers.PageAuthController{}, "*:WalmartOrderPage")
|
||||||
|
|
||||||
|
beego.Router("/recharge-c-trip-account.html", &controllers.PageAuthController{}, "*:CTripAccountPage")
|
||||||
|
beego.Router("/recharge-c-trip-order.html", &controllers.PageAuthController{}, "*:CTripOrderPage")
|
||||||
|
|
||||||
beego.Router("/recharge-t-mall-game-account.html", &controllers.PageAuthController{}, "*:RechargeTMallGameAccountPage")
|
beego.Router("/recharge-t-mall-game-account.html", &controllers.PageAuthController{}, "*:RechargeTMallGameAccountPage")
|
||||||
beego.Router("/recharge-t-mall-game-order.html", &controllers.PageAuthController{}, "*:RechargeTMallGameOrderPage")
|
beego.Router("/recharge-t-mall-game-order.html", &controllers.PageAuthController{}, "*:RechargeTMallGameOrderPage")
|
||||||
beego.Router("/recharge-t-mall-game-shop-order.html", &controllers.PageAuthController{}, "*:RechargeTMallGameShopOrderPage")
|
beego.Router("/recharge-t-mall-game-shop-order.html", &controllers.PageAuthController{}, "*:RechargeTMallGameShopOrderPage")
|
||||||
|
|||||||
19
views/c-trip-card/account.html
Normal file
19
views/c-trip-card/account.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/CTripAccount?token={{.token}}";
|
||||||
|
// 链接添加至到iframe中
|
||||||
|
document.getElementsByTagName("iframe")[0].src = url;
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
21
views/c-trip-card/order.html
Normal file
21
views/c-trip-card/order.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<iframe src="">
|
||||||
|
</iframe>
|
||||||
|
</body>
|
||||||
|
<style>
|
||||||
|
iframe {
|
||||||
|
width: 100%;
|
||||||
|
height: 90vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
// 构建链接
|
||||||
|
const url = "{{.portalHost}}" + "/iframe/CTripOrder?token={{.token}}";
|
||||||
|
// 链接添加至到iframe中
|
||||||
|
document.getElementsByTagName("iframe")[0].src = url;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -382,17 +382,21 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>-->
|
<div>
|
||||||
<!-- <a href="#" class="first-menu">-->
|
<a href="#" class="first-menu">
|
||||||
<!-- <span class="glyphicon glyphicon-console"></span>-->
|
<span class="glyphicon glyphicon-user"></span>
|
||||||
<!-- <span class="first-title">代理管理</span>-->
|
<span class="first-title">携程充值管理</span>
|
||||||
<!-- <span class="glyphicon glyphicon-plus last-glyphicon"></span>-->
|
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
|
||||||
<!-- </a>-->
|
</a>
|
||||||
<!-- <div class="second-menu">-->
|
<div class="second-menu">
|
||||||
<!-- <a href="#" onclick='loadMainContent("/create_agent.html")'>创建代理</a>-->
|
<a href="#" onclick='loadMainContent("/recharge-c-trip-account.html")'>
|
||||||
<!-- <a href="#" onclick='loadMainContent("/agent_to_merchant.html")'><span>代理商户映射列表</span></a>-->
|
<span>账号管理</span>
|
||||||
<!-- </div>-->
|
</a>
|
||||||
<!-- </div>-->
|
<a href="#" onclick='loadMainContent("/recharge-c-trip-order.html")'>
|
||||||
|
<span>订单管理</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="#" class="first-menu">
|
<a href="#" class="first-menu">
|
||||||
<span class="glyphicon glyphicon-folder-open"></span>
|
<span class="glyphicon glyphicon-folder-open"></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user