Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a47ae16

Browse files
committed
小程序不加载广告
1 parent 97cc7ba commit a47ae16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

http/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,10 @@ func Render(ctx echo.Context, contentTpl string, data map[string]interface{}) er
262262

263263
if strings.Contains(ctx.Request().UserAgent(), "miniProgram") {
264264
data["min_program"] = true
265+
} else {
266+
data["pos_ad"] = logic.DefaultAd.FindAll(context.EchoContext(ctx), ctx.Path())
265267
}
266268

267-
data["pos_ad"] = logic.DefaultAd.FindAll(context.EchoContext(ctx), ctx.Path())
268269
data["cur_time"] = times.Format("Y-m-d H:i:s")
269270
data["path"] = ctx.Path()
270271
data["filter"] = false

0 commit comments

Comments
 (0)