diff --git a/base/rules.db b/base/rules.db index 91a31eb6744e7f65616d38d195c06b7be2d7c6d6..39dcb9aa211fb13ea9ff353cfcbb1e5992ea15c6 100644 Binary files a/base/rules.db and b/base/rules.db differ diff --git a/controllers/home.py b/controllers/home.py index 624959ba068d2e6dca265b78de3d01a8e1e8470e..82e38531a8e5c358ab9532c3429d97a0632d62d9 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 9973f9bb0abc07aa151220a1d48af3876935023d..f867a57a6be407c06d124db65b57915ea22f8a1d 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 b0024c5a4ebb825f79678e4c8666f95e8629f605..11e5245f90bb7747a31829beb6144bff09396fc0 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 }}(道长)",