feat(camel-oil): 新增骆驼提前拉单管理页面
- 修改首页菜单,恢复并增强骆驼token管理模块,增加提前拉单管理入口 - 新增AlipayPrefetchPage处理器,提供提前拉单管理页面数据支持 - 添加对应路由/jd-alipay-prefetch.html - 创建camelOilPrefetch.html页面,嵌入iframe展示提前拉单内容 - 通过token参数和portalHost动态构建iframe地址完成认证和展示
This commit is contained in:
@@ -1 +1 @@
|
||||
golang 1.25.2
|
||||
golang 1.25.5
|
||||
|
||||
23
CLAUDE.md
23
CLAUDE.md
@@ -122,6 +122,29 @@ The application uses MySQL with the following connection details configured in `
|
||||
- **Portal Service**: `127.0.0.1:12400` - User portal integration
|
||||
- **Backend Service**: `kami_backend:12401` - Backend API for configuration
|
||||
|
||||
## Deployment
|
||||
|
||||
### Docker Development
|
||||
```bash
|
||||
# Build and run with Docker Compose
|
||||
docker-compose -f deploy/docker-compose-local.yaml up -d --build
|
||||
|
||||
# Production deployment
|
||||
docker-compose -f deploy/docker-compose.yaml up -d --build
|
||||
```
|
||||
|
||||
### Docker Configuration
|
||||
- Multi-stage build with Go 1.24 builder and Alpine Linux runtime
|
||||
- Support for Chinese proxy configuration (`USE_PROXY=1`)
|
||||
- Automatic SSL certificate installation for external services
|
||||
- Wait-for-it script ensures MySQL is available before startup
|
||||
- Application runs on port 12306
|
||||
|
||||
### Jenkins CI/CD
|
||||
- Automated pipeline in `Jenkinsfile` for building and deploying
|
||||
- Supports container orchestration and restart functionality
|
||||
- Build failures don't block subsequent stages
|
||||
|
||||
## Key Features
|
||||
- Merchant management and deployment
|
||||
- Payment channel (road) management
|
||||
|
||||
@@ -387,3 +387,12 @@ func (c *PageAuthController) AlipayOrderPage() {
|
||||
c.Data["portalHost"] = config.GetPortalHost()
|
||||
c.TplName = "camel-oil/order.html"
|
||||
}
|
||||
|
||||
func (c *PageAuthController) AlipayPrefetchPage() {
|
||||
userID, _ := c.GetSession("userID").(string)
|
||||
ctx := c.Ctx.Request.Context()
|
||||
tokenService := service.NewTokenService()
|
||||
c.Data["token"] = tokenService.GetToken(ctx, userID)
|
||||
c.Data["portalHost"] = config.GetPortalHost()
|
||||
c.TplName = "camel-oil/camelOilPrefetch.html"
|
||||
}
|
||||
|
||||
@@ -73,4 +73,5 @@ func init() {
|
||||
beego.Router("/jd-alipay-token.html", &controllers.PageAuthController{}, "*:AlipayTokenPage")
|
||||
beego.Router("/jd-alipay-account.html", &controllers.PageAuthController{}, "*:AlipayAccountPage")
|
||||
beego.Router("/jd-alipay-order.html", &controllers.PageAuthController{}, "*:AlipayOrderPage")
|
||||
beego.Router("/jd-alipay-prefetch.html", &controllers.PageAuthController{}, "*:AlipayPrefetchPage")
|
||||
}
|
||||
|
||||
21
views/camel-oil/camelOilPrefetch.html
Normal file
21
views/camel-oil/camelOilPrefetch.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/camelOilPrefetch?token={{.token}}";
|
||||
// 链接添加至到iframe中
|
||||
document.getElementsByTagName("iframe")[0].src = url;
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -334,19 +334,20 @@
|
||||
<a href="#" onclick='loadMainContent("/recharge-apple-card-order.html")'><span>充值订单管理</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <a href="#" class="first-menu">-->
|
||||
<!-- <span class="glyphicon glyphicon-user"></span>-->
|
||||
<!-- <span class="first-title">骆驼 token 管理</span>-->
|
||||
<!-- <span class="glyphicon glyphicon-plus last-glyphicon"></span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <div class="second-menu">-->
|
||||
<!-- <a href="#" onclick='loadMainContent("/jd-alipay-token.html")'><span>骆驼支付宝支付管理</span></a>-->
|
||||
<!-- <a href="#"-->
|
||||
<!-- onclick='loadMainContent("/jd-alipay-account.html")'><span>骆驼账户管理</span></a>-->
|
||||
<!-- <a href="#" onclick='loadMainContent("/jd-alipay-order.html")'><span>骆驼订单管理</span></a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<a href="#" class="first-menu">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<span class="first-title">骆驼 token 管理</span>
|
||||
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
|
||||
</a>
|
||||
<div class="second-menu">
|
||||
<a href="#" onclick='loadMainContent("/jd-alipay-token.html")'><span>骆驼token管理</span></a>
|
||||
<a href="#" onclick='loadMainContent("/jd-alipay-prefetch.html")'><span>骆驼提前拉单管理</span></a>
|
||||
<a href="#"
|
||||
onclick='loadMainContent("/jd-alipay-account.html")'><span>骆驼账户管理</span></a>
|
||||
<a href="#" onclick='loadMainContent("/jd-alipay-order.html")'><span>骆驼订单管理</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a href="#" class="first-menu">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
|
||||
Reference in New Issue
Block a user