|
@@ -3,12 +3,13 @@ package controller
|
|
import (
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
"jybxseo/internal/service"
|
|
"jybxseo/internal/service"
|
|
"jybxseo/utility"
|
|
"jybxseo/utility"
|
|
)
|
|
)
|
|
|
|
|
|
func BiddingDetail(r *ghttp.Request) {
|
|
func BiddingDetail(r *ghttp.Request) {
|
|
- //classNode := service.JyBxSeoClassRoot.GetNodeByCode(code)
|
|
|
|
|
|
+ nameCode := getSubdomain(r.Request.Host)
|
|
isLogin := utility.JySessionLoginEd(r)
|
|
isLogin := utility.JySessionLoginEd(r)
|
|
seoId := r.Get("seoId").String()
|
|
seoId := r.Get("seoId").String()
|
|
if seoId == "" {
|
|
if seoId == "" {
|
|
@@ -16,9 +17,17 @@ func BiddingDetail(r *ghttp.Request) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
detail := service.JyBxSeoDetailRoot.GetDetail(r.Context(), seoId, isLogin)
|
|
detail := service.JyBxSeoDetailRoot.GetDetail(r.Context(), seoId, isLogin)
|
|
|
|
+
|
|
|
|
+ areaNode := service.JyBxSeoAreaRoot.GetNodeByCode(nameCode)
|
|
|
|
+ if areaNode == nil {
|
|
|
|
+ if areaName := gconv.String(detail["area"]); areaName != "" {
|
|
|
|
+ areaNode = service.JyBxSeoAreaRoot.GetNodeByName(areaName)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
utility.HtmlRender.Render(r, utility.GetCommonRenderPatch(r.Request.UserAgent(), "detail.html"),
|
|
utility.HtmlRender.Render(r, utility.GetCommonRenderPatch(r.Request.UserAgent(), "detail.html"),
|
|
g.Map{
|
|
g.Map{
|
|
- "detail": detail,
|
|
|
|
|
|
+ "areaNode": areaNode,
|
|
|
|
+ "detail": detail,
|
|
//"tdk": service.JySeoTdk.GetAreaIndexTdk(r.Context(), node.Name),
|
|
//"tdk": service.JySeoTdk.GetAreaIndexTdk(r.Context(), node.Name),
|
|
})
|
|
})
|
|
}
|
|
}
|