File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 33
33
## v2.2 升级日志
34
34
35
35
- [x] 使用` go mod ` 方式管理程序的包依赖(建议二次开发的朋友把go开发环境升级到支持` go mod ` 的go版本)
36
- - [x] APP下载单页管理
37
- - [x] 书籍信息设置页,支持增加文字广告功能
36
+ - [x] APP下载单页配置管理
37
+ - [x] 书籍信息设置页,支持增加文字广告功能,并增加 APP 跳转页
38
38
- [x] 电子书是否登录才能下载
39
39
- [x] 移动端横幅尺寸控制(由于移动端横幅展示,为了不使横幅变形,以及能够灵活控制移动端横幅宽高比例显示)
40
40
- [x] 支持` 项目设置 ` 给项目内容增加全局文字小广告功能,比如添加原作者赞助二维码链接或者是原作者实体书购买地址等,以便支持开源作者
Original file line number Diff line number Diff line change 7
7
"strings"
8
8
"time"
9
9
10
+ "github.com/TruthHun/BookStack/models"
11
+
10
12
"github.com/TruthHun/BookStack/models/store"
11
13
"github.com/TruthHun/BookStack/utils"
12
14
"github.com/astaxie/beego"
@@ -16,6 +18,14 @@ type StaticController struct {
16
18
beego.Controller
17
19
}
18
20
21
+ func (this * StaticController ) APP () {
22
+ link := strings .TrimSpace (models .GetOptionValue ("APP_PAGE" , "" ))
23
+ if link != "" {
24
+ this .Redirect (link , 302 )
25
+ }
26
+ this .Abort ("404" )
27
+ }
28
+
19
29
//静态文件,这个加在路由的最后
20
30
func (this * StaticController ) StaticFile () {
21
31
file := this .GetString (":splat" )
Original file line number Diff line number Diff line change 7
7
8
8
func webRouter () {
9
9
beego .Router ("/" , & controllers.CateController {}, "get:Index" )
10
+ beego .Router ("/app" , & controllers.StaticController {}, "get:APP" )
10
11
beego .Router ("/cate" , & controllers.CateController {}, "get:List" )
11
12
//beego.Router("/", &controllers.HomeController{}, "*:Index")
12
13
beego .Router ("/explore" , & controllers.HomeController {}, "*:Index" )
Original file line number Diff line number Diff line change 21
21
< li > < a href ="https://www.bookstack.cn/read/help/opensource.md " title ="BookStack开源 " target ="_blank "> < i class ="fa fa-code "> </ i > 开源</ a > </ li >
22
22
{{end}}
23
23
{{if .APP_PAGE}}
24
- < li > < a href ="{{.APP_PAGE}} " title ="手机APP下载 " target ="_blank "> < i class ="fa fa-paper-plane-o "> </ i > APP下载</ a > </ li >
24
+ {{/* "/app" 会自动根据后台配置的APP单页地址跳转过去 */}}
25
+ < li > < a href ="/app " title ="手机APP下载 " target ="_blank "> < i class ="fa fa-paper-plane-o "> </ i > APP下载</ a > </ li >
25
26
{{end}}
26
27
{{if gt .Member.MemberId 0}}
27
28
< li >
81
82
< li class ="hidden-sm "> < a href ="https://www.bookstack.cn/read/help/opensource.md " title ="BookStack开源 " target ="_blank "> < i class ="fa fa-code "> </ i > 开源</ a > </ li >
82
83
{{end}}
83
84
{{if .APP_PAGE}}
84
- < li > < a href ="{{.APP_PAGE}} " title ="手机APP下载 " target ="_blank "> < i class ="fa fa-paper-plane-o "> </ i > APP下载</ a > </ li >
85
+ {{/* "/app" 会自动根据后台配置的APP单页地址跳转过去 */}}
86
+ < li > < a href ="/app " title ="手机APP下载 " target ="_blank "> < i class ="fa fa-paper-plane-o "> </ i > APP下载</ a > </ li >
85
87
{{end}}
86
88
{{if .IsSearch}}
87
89
< li class ="active ">
You can’t perform that action at this time.
0 commit comments