From 789f61e4b057419ed252b2585b6986e6a07d26e6 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Mon, 3 Oct 2022 19:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=B2=E6=9F=93=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/rules.db | Bin 86016 -> 86016 bytes controllers/home.py | 12 ++++++------ js/version.txt | 2 +- templates/config.txt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/rules.db b/base/rules.db index 91a31eb6744e7f65616d38d195c06b7be2d7c6d6..39dcb9aa211fb13ea9ff353cfcbb1e5992ea15c6 100644 GIT binary patch delta 22 ecmZozz}m2Yb%HeG%ZW11j4vA#wk9wx@CN{5cnF{X delta 22 ecmZozz}m2Yb%HeG^NBLfjL#brwk9wx@CN{5P6(U; diff --git a/controllers/home.py b/controllers/home.py index 624959b..82e3853 100644 --- a/controllers/home.py +++ b/controllers/home.py @@ -213,8 +213,8 @@ def config_render(mode): host = getHost(mode) # ali_token = lsg.getItem('ALI_TOKEN') ali_token = new_conf.ALI_TOKEN - js_mode = new_conf.JS_MODE - print('jsmode:',js_mode) + js_mode = int(new_conf.JS_MODE or 0) + print(f'{type(js_mode)} jsmode:{js_mode}') # print(ali_token) customConfig = getCustonDict(host,ali_token) # print(customConfig) @@ -250,8 +250,8 @@ def config_gen(): store_conf_dict = lsg.getStoreConfDict() new_conf.update(store_conf_dict) try: - lsg = storage_service() use_py = lsg.getItem('USE_PY') + js_mode = int(new_conf.JS_MODE or 0) pys = getPys() if use_py else False alists = getAlist() alists_str = json.dumps(alists,ensure_ascii=False) @@ -259,14 +259,14 @@ def config_gen(): rules = get_multi_rules(rules) host0 = getHost(0) jxs = getJxs(host=host0) - set_local = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,0),mode=0,host=host0,jxs=jxs) + set_local = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,0),mode=0,js_mode=js_mode,host=host0,jxs=jxs) # print(set_local) host1 = getHost(1) jxs = getJxs(host=host1) - set_area = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,1),mode=1,host=host1,jxs=jxs) + set_area = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,1),mode=1,js_mode=js_mode,host=host1,jxs=jxs) host2 = getHost(2) jxs = getJxs(host=host2) - set_online = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,2),mode=1,host=host2,jxs=jxs) + set_online = render_template('config.txt',pys=pys,rules=rules,alists=alists,alists_str=alists_str,live_url=get_live_url(new_conf,2),mode=1,js_mode=js_mode,host=host2,jxs=jxs) ali_token = new_conf.ALI_TOKEN with open('txt/pycms0.json','w+',encoding='utf-8') as f: customConfig = getCustonDict(host0,ali_token) diff --git a/js/version.txt b/js/version.txt index 9973f9b..f867a57 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.7.19beta2 \ No newline at end of file +3.7.19beta3 \ No newline at end of file diff --git a/templates/config.txt b/templates/config.txt index b0024c5..11e5245 100644 --- a/templates/config.txt +++ b/templates/config.txt @@ -5,7 +5,7 @@ "spider": "{{ host }}/liveslib", {% if alists|length > 0 %}"drives": {{alists_str}},{% endif %} "homepage":"https://gitcode.net/qq_32394351/dr_py", -"sites": [{% for rule in rules.list %}{% if js_mode == 0 %} +"sites": [{% for rule in rules.list %}{% if js_mode != 1 %} { "key":"dr_{{ rule.name }}", "name":"{{ rule.name }}(道长)", -- GitLab