From 285df75e441185767739549610adf93dcd7ba838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=9A=E9=A3=8E=E6=8B=82=E6=9F=B3=E9=A2=9C?= <434857005@qq.com> Date: Sun, 7 Jan 2024 05:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Hipy=E7=9A=84t4=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/custom.conf | 10 ++++++++++ controllers/cms.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/base/custom.conf b/base/custom.conf index 4062459..60f2ef7 100644 --- a/base/custom.conf +++ b/base/custom.conf @@ -19,6 +19,16 @@ "quickSearch":1, "filterable":0 }, + { + "key":"hipy_cctv", + "name":"hipy_cctv", + "type":4, + "api":"http://192.168.31.49:5707/api/v1/vod/cctv_spider?api_ext=./cctv_spider.json", + "searchable":1, + "quickSearch":1, + "filterable":1, + "ext":"api的扩展,可以是字符串", + }, {"key":"Test_jsapi","name":"Test_jsapi(drpy)","type":3,"api":"{{host}}/libs/drpy2.min.js","searchable":2,"quickSearch":0,"filterable":0,"ext":"{{host}}/js/jsapi.js","jar":"{{host}}/libs/jar/custom_jsapi.jar"}, # 缓存js diff --git a/controllers/cms.py b/controllers/cms.py index c5f89bb..774a5b3 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -1354,7 +1354,7 @@ class CMS: cnt_ctx = {} # exec(f'cnt_pg={cnt_page}', cnt_ctx) safe_eval(f'cnt_pg={cnt_page}', cnt_ctx) - cnt_pg = str(cnt_ctx['cnt_pg']) if cnt_ctx.get('cnt_pg') else 1 # 计算表达式的结果 + cnt_pg = str(cnt_ctx['cnt_pg']) if cnt_ctx.get('cnt_pg') else 1 # 计算表达式的结果 url = url.replace(url_rep, str(cnt_pg)).replace('(', '').replace(')', '') # print(url) else: