增加Hipy的t4示例

This commit is contained in:
晚风拂柳颜 2024-01-07 05:44:52 +08:00
parent dac88375eb
commit 285df75e44
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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: