做双端审批流
This commit is contained in:
1 parent
5b4dbb2b46
commit
ffaadc26ae
69 files changed
+6662
-1071
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"server/models"
|
||||
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
@@ -552,6 +553,32 @@ func (c *PlatformWebsitePageController) Get() {
|
||||
websiteOK(&c.Controller, row)
|
||||
}
|
||||
|
||||
// GetByPath GET /platform/website/page/path/:path — 按路径读取单页(平台端独立接口)
|
||||
func (c *PlatformWebsitePageController) GetByPath() {
|
||||
if _, ok := websiteAuth(&c.Controller); !ok {
|
||||
return
|
||||
}
|
||||
path := normalizePath(c.Ctx.Input.Param(":path"))
|
||||
if path == "" {
|
||||
jsonErr(&c.Controller, 400, 400, "路径标识不能为空")
|
||||
return
|
||||
}
|
||||
var row models.PlatformWebsitePage
|
||||
err := models.Orm.QueryTable(new(models.PlatformWebsitePage)).
|
||||
Filter("path", path).
|
||||
Filter("delete_time__isnull", true).
|
||||
One(&row)
|
||||
if err == orm.ErrNoRows {
|
||||
websiteOK(&c.Controller, nil)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
jsonErr(&c.Controller, 500, 500, "获取单页失败: "+err.Error())
|
||||
return
|
||||
}
|
||||
websiteOK(&c.Controller, row)
|
||||
}
|
||||
|
||||
// Create POST /platform/website/page
|
||||
func (c *PlatformWebsitePageController) Create() {
|
||||
if _, ok := websiteAuth(&c.Controller); !ok {
|
||||
|
||||
Reference in new issue
Block a user